# Errors

An error comes as `{"detail": "text", "code": "code"}`. The `code` field is convenient for deciding what to do next in your program. An error in a parameter or body field comes differently — under the field name: `{"channels": ["Comma-separated channel numbers."]}`.

| Response | `code` | What happened |
|---|---|---|
| 400 | — | Invalid parameter or body field: the error is under the field name |
| 401 | `not_authenticated` | No key |
| 401 | `authentication_failed` | The key is wrong or revoked, the member’s access is suspended, or the organization is archived — the text says why |
| 403 | `tariff_required` | The method or period is closed by your plan — the text names the plan you need |
| 403 | `closed_channel` | Posts of private channels are not available via the API |
| 403 | `read_only_key` | The method changes something, but the key is read-only |
| 403 | `limit_reached` | A plan limit is reached (for example, the number of webhooks) |
| 403 | `manager_required` | A member’s key: only the organization’s owner or administrator can change webhooks |
| 404 | `not_found` | The channel, post or webhook does not exist, or the key cannot see it |
| 405 | `method_not_allowed` | The HTTP method doesn’t fit the address (for example, POST to the channel list) |
| 409 | `conflict` | The action is not possible right now (testing a disabled webhook, enabling a webhook disabled by staff) |
| 429 | `quota_exceeded` | The requests for the period are used up |
| 429 | `rate_limited` | More requests per second than your plan allows |
| 429 | `throttled` | Too many wrong keys from one address (30 per minute) or, while API plans are not on sale, more than 50 requests per second per organization |
| 503 | `timeout` | The request took too long — narrow the selection |
| 503 | — | The site is under maintenance (usually a few minutes): the response is an HTML page, not JSON; retry later |

!!! note
    With a 429 response, check the `Retry-After` header — how many seconds to wait before retrying. Remaining requests are in the `X-RateLimit-*` and `X-Quota-*` headers: they come when plan limits apply (the “Corporate” plan has contract limits — no headers).

Which errors a specific method returns is on its page in the [method reference](/en/api/methods/).
