# Errors

> Every error the API returns carries a `code` and a `docs_url` pointing here. Each page says what the error means, why it happens and how to fix it.

| Code | Status | Meaning |
|---|---|---|
| [`bad_request`](https://usecommune.dev/errors/bad_request.md) | 400 | Something in the request itself is wrong: a query parameter, a header or the body. Change the request and send it again. |
| [`invalid_version`](https://usecommune.dev/errors/invalid_version.md) | 400 | The `Commune-Version` header names a contract version this API does not serve. Send one from `allowed_values`, or leave the header out. |
| [`unauthorized`](https://usecommune.dev/errors/unauthorized.md) | 401 | The request carried no credential the API accepts: none at all, a malformed one, or one that is unknown, revoked or expired. |
| [`forbidden`](https://usecommune.dev/errors/forbidden.md) | 403 | The credential is valid but cannot act on the newsletter you addressed, or on the key you tried to revoke. |
| [`insufficient_scope`](https://usecommune.dev/errors/insufficient_scope.md) | 403 | The credential reaches the newsletter but does not hold the permission this operation, filter or expansion needs. |
| [`payment_required`](https://usecommune.dev/errors/payment_required.md) | 402 | The credential may do this, but the newsletter's Commune plan does not include it. Reads outside insights stay free. |
| [`not_found`](https://usecommune.dev/errors/not_found.md) | 404 | Nothing this credential may see exists at that identifier. It may not exist at all, or your credential may not be allowed to know it does. |
| [`conflict`](https://usecommune.dev/errors/conflict.md) | 409 | The `Idempotency-Key` on this write was already used for a different request, or a request with the same key has not finished. |
| [`unprocessable`](https://usecommune.dev/errors/unprocessable.md) | 422 | The request is well formed, and the current state of what it addresses refuses it. The message says what is in the way. |
| [`not_commune_newsletter`](https://usecommune.dev/errors/not_commune_newsletter.md) | 422 | Articles can only be created or edited on a newsletter Commune publishes itself, one whose `esp` is `commune`. |
| [`rate_limited`](https://usecommune.dev/errors/rate_limited.md) | 429 | A rate limit budget or a daily send limit is spent. Wait `Retry-After` seconds; the message names which limit it was. |
| [`internal_error`](https://usecommune.dev/errors/internal_error.md) | 500 | Something failed inside Commune. Retry with backoff, reusing the same `Idempotency-Key` for a write, and quote the request id if it persists. |
| [`service_unavailable`](https://usecommune.dev/errors/service_unavailable.md) | 503 | A service this one operation depends on did not answer. The rest of the API is unaffected; retry this operation after `Retry-After`. |
