---
title: "Create or update one rate limit rule"
method: PUT
path: "/admin/rate-limits"
tags: ["admin"]
---

# Create or update one rate limit rule

`PUT /admin/rate-limits`

## Request body

- AdminUpsertRateLimitRequest
  - `limit_key` AdminRateLimitKeyRequest
    - `period` string
    - `period_seconds` integer
  - `max_requests` integer
  - `max_tokens` integer
  - `scope` string
  - `subject` string
  - `user_path` string

## Response `200`

OK

- AdminRateLimitListResponse
  - `rate_limits` AdminRateLimitStatusResponse[]
    - `created_at` string
    - `in_flight` integer
    - `max_requests` integer
    - `max_tokens` integer
    - `period_label` string
    - `period_seconds` integer
    - `requests_remaining` integer
    - `requests_used` integer
    - `scope` string
    - `source` string
    - `subject` string
    - `tokens_remaining` integer
    - `tokens_used` integer
    - `updated_at` string
    - `user_path` string
    - `window_end` string
    - `window_start` string
  - `server_time` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `503` — Service Unavailable

## Changes

- **2026-07-07** `87fec960e0fd` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/enterpilot/apis/gomodel-api/changes/admin/rate-limits/put.md)

---

[API](https://skmtc.dev/enterpilot/apis/gomodel-api.md) · [All operations](https://skmtc.dev/enterpilot/apis/gomodel-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/enterpilot/gomodel-api/revisions/a807d76b5ae5/schema)
