> For the complete documentation index, see [llms.txt](https://support.referralhero.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.referralhero.com/integrate/rest-api/errors.md).

# Errors

ReferralHero uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the  `2xx` range indicate success, codes in the `4xx` range indicate an error that failed given the information provided (e.g., a required parameter was omitted, an update failed, etc.), and codes in the `5xx` range indicate an error with ReferralHero's servers (these are rare).

When a request returns an error we always try to provide a clear explanation of what went wrong. Errors are returned as JSON files and follow the same structure:

```json
{
  status: "error",
  message: "Error explanation" // Eg: "Missing API token"
  code: "error_code" // Eg: no_token
}
```

### **Status**

Our API raises errors for many reasons and when this happens the "status" attribute will always be "error". We recommend writing code that gracefully handles all possible API exceptions.

### **Message**

A human-readable message providing more details about the error.

### **Code**

The type of error returned. See list of possible errors below:

| Error codes                    | Explanation                                                |
| ------------------------------ | ---------------------------------------------------------- |
| no\_token                      | "api\_token" parameter is missing or blank                 |
| invalid\_token                 | "api\_token" provided does not exist                       |
| inactive\_account              | Account associated with this API token is inactive         |
| too\_many\_calls               | Rate limit hit. Wait 60 minutes to reset the counter.      |
| no\_list\_uuid                 | "uuid" parameter is missing or blank                       |
| invalid\_list                  | "uuid" provided belongs is invalid                         |
| no\_subscriber\_id             | "subscriber\_id" parameter is missing or blank             |
| subscriber\_not\_found         | subscriber provided does not exist                         |
| no\_email\_address             | "email" parameter is missing or blank                      |
| invalid\_email\_address        | "email" provided is not a valid email.                     |
| no\_name                       | "name" parameter is missing or blank                       |
| no\_points                     | "points" parameter is missing or blankno\_hosting\_url     |
| no\_hosting\_url               | "hosting\_url" parameter is missing or blank               |
| error\_list\_creation          | Something went wrong when creating a new list.             |
| subscriber\_already\_promoted  | Subscriber's already been promoted                         |
| subscriber\_not\_promoted      | Subscriber is not promoted, hence it can't be "unpromoted" |
| bad\_request                   | Missing required params                                    |
| reward\_not\_found             | The provided reward does not exist                         |
| invalid\_status                | The provided 'status' does not exist                       |
| no\_coupons                    | The "coupons" parameter is missing or blank                |
| error\_coupon\_group\_creation | Errors occured while creating coupon                       |
| coupon\_group\_created         | Coupon created successfully                                |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://support.referralhero.com/integrate/rest-api/errors.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
