# Errors, rate limits and quotas · MMA Fight Data API reference

> Every error the MMA Fight Data API returns - the error envelope, HTTP statuses, each error code and what to do about it.

Canonical: https://mmadataapi.com/reference/errors

One error shape, a code for every failure, and a request id you can quote to support.

## The error envelope

```json
{
  "error": {
    "code": "tier_required",
    "message": "This endpoint needs the Pro or Business plan.",
    "request_id": "req_..."
  }
}
```

`code` is stable and machine-readable; `message` is for humans and may change. Quote `request_id` (also sent as the `x-request-id` header) when you write to api@ufcalendar.com: it identifies the exact request in our logs.

## Statuses

| Status | When | What to do |
| --- | --- | --- |
| `400` | A parameter is invalid (`invalid_*`, `filter_required`) | Fix the request; the message names the parameter |
| `401` | Missing or unknown key (`unauthorized`) | Send `Authorization: Bearer <key>` |
| `403` | The plan does not include this (`tier_required`, `subscription_required`) | Upgrade, or use an endpoint your plan includes |
| `404` | No such thing (`not_found`, `unsupported_org`) | Check the id or slug |
| `429` | Per-minute limit or monthly quota (`rate_limited`, `quota_exceeded`) | Wait `Retry-After` seconds; quotas reset monthly |
| `500` | Our fault (`internal_error`) | Retry with backoff; tell us the request id |

## Every code

| Code | Meaning |
| --- | --- |
| `unauthorized` | No key, or a key that does not exist or was revoked. |
| `subscription_required` | The endpoint needs a plan; this account has none. |
| `tier_required` | The endpoint needs a higher plan (most often Pro). |
| `direct_plan_required` | The endpoint is not available through a marketplace subscription. |
| `rate_limited` | Too many requests this minute. Wait Retry-After seconds. |
| `quota_exceeded` | The monthly quota is used up. It resets at the start of the month. |
| `not_found` | No such event, fight, fighter or resource. |
| `invalid_org` | A parameter value is invalid; the message names it. |
| `unsupported_org` | That promotion is not served by the API. |
| `invalid_status` | A parameter value is invalid; the message names it. |
| `invalid_date` | A parameter value is invalid; the message names it. |
| `invalid_order` | A parameter value is invalid; the message names it. |
| `invalid_query` | A parameter value is invalid; the message names it. |
| `invalid_url` | A parameter value is invalid; the message names it. |
| `invalid_events` | A parameter value is invalid; the message names it. |
| `invalid_json` | A parameter value is invalid; the message names it. |
| `invalid_id` | A parameter value is invalid; the message names it. |
| `invalid_cursor` | A parameter value is invalid; the message names it. |
| `endpoint_limit` | You already have the maximum number of webhook endpoints. |
| `invalid_include` | A parameter value is invalid; the message names it. |
| `invalid_boolean` | A parameter value is invalid; the message names it. |
| `invalid_country` | A parameter value is invalid; the message names it. |
| `invalid_kind` | A parameter value is invalid; the message names it. |
| `invalid_method` | A parameter value is invalid; the message names it. |
| `invalid_division` | A parameter value is invalid; the message names it. |
| `invalid_view` | A parameter value is invalid; the message names it. |
| `invalid_series` | A parameter value is invalid; the message names it. |
| `invalid_locale` | A parameter value is invalid; the message names it. |
| `invalid_metric` | A parameter value is invalid; the message names it. |
| `invalid_population` | A parameter value is invalid; the message names it. |
| `invalid_scope` | A parameter value is invalid; the message names it. |
| `invalid_filter` | A parameter value is invalid; the message names it. |
| `filter_required` | This list needs at least one filter. |
| `page_depth_exceeded` | The cursor went deeper than this list allows; narrow the filter. |
| `internal_error` | Our fault. Retry with backoff and send us the request id. |
