> ## Documentation Index
> Fetch the complete documentation index at: https://docs.revyops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# HTTP Response Codes

> What each status code from the RevyOps API means for your integration.

The API uses standard HTTP status codes. A non-2xx response usually includes a JSON body with a `detail` or `error` field describing what went wrong.

| Code  | Meaning                                                                                                                                                                             |
| ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `200` | OK. The request succeeded.                                                                                                                                                          |
| `201` | Created. A new record (contact, company, email, custom field, activity) was created.                                                                                                |
| `204` | No Content. The request succeeded and there is nothing to return, for example a delete.                                                                                             |
| `400` | Bad Request. The payload or query parameters failed validation. Check the response body for which field is invalid.                                                                 |
| `401` | Unauthorized. The API key is valid, but the record you asked for doesn't belong to that key's client (or agency, for master keys).                                                  |
| `403` | Forbidden. The request is missing the `X-API-KEY` header, or the key doesn't match any record. See [Authentication](/api-reference/authentication).                                 |
| `404` | Not Found. No record exists with the ID you supplied.                                                                                                                               |
| `409` | Conflict. You tried to create a contact or company that already exists for this client, matched by email, LinkedIn URL, or phone. The response includes the existing record's `id`. |
| `422` | Unprocessable Entity. Custom field values failed validation, for example a field name that isn't defined in your schema, or a value that doesn't match the field's type.            |
| `429` | Too Many Requests. This API key went over its [rate limit](/api-reference/rate-limits) of 90 requests per 10 seconds. The request was not processed; wait and retry.                |
| `500` | Internal Server Error. Something failed on RevyOps's side. Retry later; contact support if it persists.                                                                             |

## Example: 409 on a duplicate contact

```json theme={null}
{
  "id": 4821,
  "duplicate": "YES",
  "warning": "A contact with this email already exists for this client"
}
```

## Example: 422 on an invalid custom field

```json theme={null}
{
  "error": "Unprocessable Entity",
  "message": "The following custom field(s) are not defined in the master schema.",
  "invalid_fields": ["lead_score"],
  "hint": "Please add these fields to the master schema before creating a contact."
}
```

## Example: 400 on a type mismatch

```json theme={null}
{
  "error": "Validation failed",
  "invalid_fields": [
    { "field_name": "lead_score", "field_value": "high", "message": "..." }
  ]
}
```
