AI Gateway

Update an AI Gateway rate limit

Update a rate limit. Only the attributes sent are changed. Scope stays editable, and changes never reset current usage. Returns 409 when the rule was changed concurrently or the new scope duplicates another rule.

patch/api/v2/rate-limits/{id}

Request

Path parameters

idstring uuid required

Rate limit UUID.

Request body

Example request

{
  "data": {
    "attributes": {
      "mode": "ALERT"
    },
    "id": "11111111-1111-1111-1111-111111111111",
    "type": "rate-limits"
  }
}

Response

OK

Example response

{
  "data": {
    "attributes": {
      "created_at": "2026-09-01T00:00:00Z",
      "created_by": "user@example.com",
      "enabled": true,
      "input_tokens_per_minute": 500000,
      "mode": "ALERT",
      "monitor_id": 12345678,
      "name": "Default rate limit",
      "output_tokens_per_minute": 200000,
      "requests_per_minute": 1000,
      "revision": 1,
      "tags": {
        "provider": "openai"
      },
      "team_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
      "updated_at": "2026-09-15T14:30:00Z",
      "updated_by": "user@example.com",
      "user_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
    },
    "id": "33333333-3333-3333-3333-333333333333",
    "type": "rate-limits"
  }
}

Changes

Changes to this operation have not been checked yet.