---
title: "Update Token"
method: PATCH
path: "/api/admin/tokens/{token_id}"
tags: ["tokens"]
---

# Update Token

`PATCH /api/admin/tokens/{token_id}`

## Request

- Base URL: `https://firstdata.deepminer.com.cn` (the document declares no server; this is the origin it was published from)
- URL: `https://firstdata.deepminer.com.cn/api/admin/tokens/{token_id}`
- Auth: HTTP bearer

更新 Token 速率限制字段（rps_limit / daily_quota）。

未提供的字段保持不变；显式传 null 表示清空回系统默认。

## Path parameters

- `token_id` integer, required

## Request body

- TokenUpdateRequest: 更新 Token 速率限制（仅管理员）。未提供的字段不改动；显式传 null 则清空回系统默认。
  - `rps_limit` integer, nullable
  - `daily_quota` integer, nullable

## Response `200`

Successful Response

- TokenResponse: Token 响应（管理员视图）
  - `id` integer, required
  - `email` string, required
  - `username` string, required
  - `application_id` integer, nullable
  - `jti` string, required
  - `status` string, required
  - `source` string
  - `expires_at` string, date-time, required
  - `created_at` string, date-time, required
  - `rps_limit` integer, nullable
  - `daily_quota` integer, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/deepminer/apis/firstdata-mcp-apply-system.md) · [All operations](https://skmtc.dev/deepminer/apis/firstdata-mcp-apply-system/llms.txt) · [OpenAPI document](https://skmtc.dev/deepminer/apis/firstdata-mcp-apply-system/revisions/f4a3501fb064?raw)
