# Errors

The error format, status codes, and the machine-readable codes you can act on.


Errors are JSON with a human-readable `error` and, where it helps, a stable `code`:

```json
{ "error": "This API key does not have the \"posts:write\" scope.", "code": "insufficient_scope", "required_scope": "posts:write" }
```

Unexpected server errors return a generic message and a `requestId`. Quote the `requestId` if you contact support.

## Status codes

| Status | Meaning |
|---|---|
| 200, 201, 204 | Success. |
| 400 | The request is invalid. Read the message. |
| 401 | The key is missing, wrong, disabled or expired (`invalid_api_key`). |
| 403 | The key lacks a scope (`insufficient_scope`), the plan does not allow it (`plan_required`), or a limit was reached (`schedule_limit_reached`). |
| 404 | The post, media or webhook does not exist (or belongs to someone else). |
| 409 | The post can no longer be changed (`not_editable`), an account needs reconnecting (`needs_reconnect`), or a request with the same `Idempotency-Key` is still running. |
| 422 | The request was understood but cannot be done, for example reusing an `Idempotency-Key` with a different body. |
| 429 | Too many requests. See `Retry-After`. |
| 5xx | Our side. Retry with the same `Idempotency-Key`. |

## Codes you will meet when scheduling

| `code` | What to do |
|---|---|
| `no_connected_account` | Connect that platform in the dashboard, or pass a valid `accountId`. |
| `needs_reconnect` | The connection expired or was revoked. Reconnect in Integrations. |
| `in_the_past` | `scheduledDatetime` must be in the future. |
| `schedule_limit_reached` | The plan's monthly scheduling limit is used up. |
| `media_unavailable` | The `mediaId` is not in your library. Upload it first. |
| `invalid_platform` | Unknown or not-yet-available platform name. |

