> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nemu.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Quotas

> Read and adjust request quota rules on your account

A quota rule caps how many requests are allowed in a window. Quotas belong to your account,
not a workspace, so there is no `workspace_id`. Reads need `quotas:read` and writes need
`quotas:write`.

## List quotas

```
GET /api/v1/quotas
```

<RequestExample>
  ```bash cURL theme={null}
  curl 'https://platform.nemu.cc/api/v1/quotas' \
    -H 'Authorization: Bearer <access_token>'
  ```

  ```ts SDK theme={null}
  const quotas = await nemu.quotas.list();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": [
      {
        "id": "qta_1",
        "user_id": "3f0e...",
        "name": "daily cap",
        "max_requests": 10000,
        "period": "ROLLING",
        "window_minutes": 1440,
        "current_usage": 320,
        "created_at": "2026-01-04T10:22:00.000Z",
        "updated_at": "2026-01-04T10:22:00.000Z"
      }
    ]
  }
  ```
</ResponseExample>

<ResponseField name="data.period" type="string">
  `ROLLING` for a sliding window, or `CALENDAR` for a fixed window.
</ResponseField>

## Get a quota

```
GET /api/v1/quotas/{id}
```

## Update a quota

```
PATCH /api/v1/quotas/{id}
```

<ParamField body="name" type="string">
  A name for the rule.
</ParamField>

<ParamField body="max_requests" type="integer">
  The request cap for the window.
</ParamField>

<ParamField body="period" type="string">
  `ROLLING` or `CALENDAR`.
</ParamField>

<ParamField body="window_minutes" type="integer">
  The window length in minutes.
</ParamField>

<RequestExample>
  ```ts SDK theme={null}
  await quota.update({ max_requests: 20000 });
  ```
</RequestExample>

## Delete a quota

```
DELETE /api/v1/quotas/{id}
```
