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

# Errors

> Status codes and the error object API v2 returns.

A failed call returns a non-`2xx` status and an error object:

```json theme={null}
{
  "error": {
    "code": "VALIDATION",
    "message": "Invalid arguments for `campaign_get`: campaignId: Required.",
    "hint": "What to do about it, when there is something to do."
  }
}
```

`code` is stable and safe to branch on. `message` and `hint` are written for people and may change wording.

## Status codes

| Status | `code` | Meaning | Retry? |
| - | - | - | - |
| `400` | `INVALID_JSON` | The body is not a JSON object. | After fixing the body. |
| `400` | `VALIDATION` | An argument is missing, has the wrong type, or is not one of the allowed values. | After fixing the arguments. |
| `400` | `TOOL_ERROR` | The request was understood and refused. The message says why. | After fixing the request. |
| `401` | `UNAUTHENTICATED` | No API key, or the key was rejected. It may have been rotated, or the account has no active plan. | With a valid key. |
| `403` | `FORBIDDEN` | Your permissions or access tier don't allow this, or a record you named belongs to another account. | No. |
| `403` | `PLAN_REQUIRED` | Your plan does not include this feature. | After upgrading. |
| `404` | `NOT_FOUND` | No such endpoint, or a record you named does not exist. | No. |
| `405` | `METHOD_NOT_ALLOWED` | Endpoints only accept `POST`. | Use `POST`. |
| `413` | `VALIDATION` | The body is larger than 10 MB. | With a smaller body. |
| `422` | `UPSTREAM` | The request was valid but the operation was refused, such as launching a campaign that is not ready. | After fixing what the message names. |
| `502` | `UPSTREAM` | The service failed or could not be reached. | Yes, with backoff. Reads are always safe to retry. |
| `504` | `UPSTREAM` | The operation timed out. | Read the record back first. A write may still have completed. |

## Retrying writes

Endpoints ending in `_update`, `_upsert` or `_set` write a fixed value, so repeating them is harmless. Endpoints that create something (`_create`, `_add`) make a second record if repeated, and destructive endpoints act again. After a `502` or `504` on one of those, read the state back before retrying.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.