# Errors

- Section: Help (TTF API reference)
- Source: https://ttf.bot/developers/docs/#errors
- The whole reference as one text: https://ttf.bot/developers/docs/llms-full.txt

When something goes wrong, the answer says what, why, and whether it cost anything.

Every error has the same shape:

```json
{
  "error": {
    "code": "rate_limited",
    "message": "API key credits used up per minute.",
    "doc_url": "https://ttf.bot/docs/errors/#rate_limited",
    "request_id": "3f2a9c0e5b7d4e18a6c1f0b2d9e8a7c6"
  }
}
```

Check `code` in your program (it never changes); show `message` to people. Quote `request_id` when you ask us for help.

| Code | What it means | How to fix it | Charged | Retry |
| --- | --- | --- | --- | --- |
| `bad_request` 400 | **Bad request** Something in the request is off: an unknown chain, an address that does not fit the chain, an unknown field or group, a group the chain does not serve, a bad option (interval, limit, cursor, fields), an address we do not serve (burn, router, wrapped coin, exchange), or a webhook body that is not a JSON object of valid text. | Fix the request: GET /v1/chains lists the chains, groups and fields; the message names what was wrong. | No | - |
| `unauthorized` 401 | **Missing or invalid key** No API key was sent, or the key is not valid (typo, revoked, malformed). | Send the key as `Authorization: Bearer ttfk_...` or `X-API-Key: ttfk_...`. Create or copy a key in the dashboard. | No | - |
| `payment_required` 402 | **Subscription ended** The subscription behind this key has run out. | Renew the plan in the dashboard; the same key works again right after. | No | - |
| `forbidden` 403 | **Not included in your plan** The key is valid but may not do this: its plan does not include the asked group, the account has no developer plan, the key is locked to other IP addresses, or it does not have the webhook permission the route needs. | Upgrade the plan (GET /v1/chains shows which groups exist), drop the group from `fields`, add this IP to the key's allow-list, or create a key with webhook access (read or write) in the dashboard. | No | - |
| `quota_exceeded` 403 | **Plan limit reached** Your plan's number of webhook endpoints, webhook rules or watched wallet addresses is used up, or this month's delivery quota is. | Delete something you no longer need or move to a larger plan; `error.limit` is the limit that was reached. | No | - |
| `account_suspended` 403 | **Account suspended** The account behind this key is suspended, so nothing can be changed. | Contact support and quote the request_id. | No | - |
| `plan_required` 403 | **Plan group needed** Your plan does not include the data a webhook rule of this type delivers. | Move to a plan that includes the group named in `error.group`, or use another rule type. | No | - |
| `not_found` 404 | **Not found** No data for this token (no market lists it, no holders, no price history, unknown deployer), your account has no webhook endpoint or rule with that id (never charged), the route does not exist, or the API is switched off. | Check the chain and the address (GET /v1/resolve finds where a token trades), or list your endpoints and rules for their ids. A brand-new token may simply not be listed yet. | 1 credit attempt fee | - |
| `method_not_allowed` 405 | **Method not allowed** The route exists but not with this HTTP method. Every data route is GET; the /v1/webhooks routes also take POST, PATCH and DELETE, each as its page says. | Use the method the route's page shows. | No | - |
| `request_timeout` 408 | **Body not received** The body of a webhook request did not arrive in time; nothing was changed. | Send the whole body at once with a correct Content-Length, then repeat the call. | No | - |
| `duplicate_url` 409 | **URL already used** This account already has a webhook endpoint with that URL. | Use the existing endpoint (GET /v1/webhooks/endpoints) or choose another URL. | No | - |
| `types_in_use` 409 | **Event types in use** Rules of this endpoint use an event type the change would remove. | Delete those rules first, or keep the event type. | No | - |
| `endpoint_paused` 409 | **Endpoint paused** The endpoint is paused or disabled, so it gets nothing, not even a test. | Switch it on first (PATCH the endpoint with `enabled` true). | No | - |
| `over_limit` 409 | **Endpoint over the plan limit** This endpoint is above your plan's number of endpoints, so it is paused. | Delete other endpoints or move to a larger plan. | No | - |
| `conflict` 409 | **Changed meanwhile** The same webhook secret was changed by another request at the same moment; this one changed nothing. | Read the endpoint again, then repeat the change only if it is still needed. | No | - |
| `too_large` 413 | **Body too large** The request body is larger than the route accepts (8 KB for an endpoint, 256 KB for a rule). | Send a smaller body; split a very long watchlist into more rules. | No | - |
| `unsupported_media_type` 415 | **Send JSON** A webhook route that takes a body got one that is not declared as JSON. | Send the header `Content-Type: application/json` and a JSON object. | No | - |
| `refused` 422 | **Token cannot be scanned** The address is a contract we cannot scan (for example a proxy, or not a token contract at all). | Nothing to retry: this is a property of the address. Check you used the token address, not a pair or a wallet. | 1 credit attempt fee | - |
| `url_not_allowed` 422 | **Webhook URL refused** The webhook URL cannot be used: it must be a public https address with a host name that resolves. | Use a public https URL on port 443 or 8443, without a user name or password. | No | - |
| `invalid_rule` 422 | **Invalid rule** A setting of the webhook rule is missing, unknown or out of range. | Fix the setting named in `error.field` (GET /v1/webhooks/schema lists every rule type and its limits). | No | - |
| `type_not_subscribed` 422 | **Event type not subscribed** The endpoint does not receive the event type this rule sends. | Add the type to the endpoint's `event_types` first, or pick another endpoint. | No | - |
| `rate_limited` 429 | **Slow down** Too many requests per second, too many at once, the credits of the minute / day / month (or of this key) are used up, too many webhook reads or changes for your account, or too many invalid keys came from your network. | Wait the Retry-After seconds, then retry. Watch X-RateLimit-Remaining; upgrade the plan for more credits. | No | Yes, after Retry-After |
| `capacity` 503 | **At capacity** The API's shared capacity for today is full (free and trial keys pause first). | Retry after Retry-After, or later today. Paid plans are served first. | No | Yes, after Retry-After |
| `busy` 503 | **Busy** The API or its data providers are busy right now (nothing was asked from a provider), or another change of your wallet rules is still in progress. | Retry after Retry-After (usually a couple of seconds). | No | Yes, after Retry-After |
| `unavailable` 503 | **Temporarily unavailable** The API cannot check its limits or your key's plan right now (an outage on our side), the key is not set up for metering yet, or the webhook service did not answer. | Retry after Retry-After. If it keeps happening for one key, contact support with the request_id. | No | Yes, after Retry-After |
| `not_configured` 503 | **Webhooks not set up** Webhooks cannot be created or delivered on this server right now; nothing was changed. | Try again later (Retry-After). If it lasts, contact support. | No | Yes, after Retry-After |
| `upstream` 502 | **Provider did not answer** A data provider behind the answer failed or returned nothing usable. | Retry in a moment. The attempt fee (1 credit) applies to core and the paid-provider groups. | 1 credit attempt fee | - |
| `timeout` 504 | **Took too long** The data did not arrive in time (a slow scan or provider). | Retry in a moment: a slow security scan often finishes in the background and the next call is a cache hit. | 1 credit attempt fee | - |
| `internal` 500 | **Internal error** An unexpected error on our side. | Retry; if it repeats, contact support and quote the request_id. | No | - |
| `error` any | **Request refused** Any other refusal of the HTTP layer (the status says which); rare. | Read the message and the status; quote the request_id if you contact support. | No | - |
