# 管理API密钥

API 密钥允许外部工具和自动化程序以编程方式与您的工作区交互。工作区管理员可随时创建、查看和吊销密钥。

### 创建 API 密钥

转到 **设置 → API → 密钥** 并点击 **新建 API 密钥**。为该密钥指定一个描述性名称（例如“CI/CD 集成”或“内部仪表板”），以便后续识别。

{% hint style="warning" %}
创建后请立即复制您的密钥——该密钥不会再次显示。如果丢失，您需要吊销并重新创建。
{% endhint %}

### 密钥权限

创建密钥时，您可以为其设置权限范围：

| 权限      | 允许的操作        |
| ------- | ------------ |
| **读取**  | 获取内容、设置和成员数据 |
| **写入**  | 创建和更新内容      |
| **管理员** | 管理设置、成员和计费   |

对每个集成仅使用所需的最低权限。

### 轮换密钥

要轮换密钥，请创建新密钥，更新您的集成以使用新密钥，然后吊销旧密钥。当前不支持自动轮换——这是一个手动过程。

### 吊销密钥

转到 **设置 → API → 密钥**，找到该密钥，然后单击 **吊销**。吊销会立即生效——任何使用该密钥的请求都将立即失败。

### 监控使用情况

在 **设置 → API → 使用情况**，您可以查看过去 30 天内每个密钥的请求次数。这有助于发现异常使用情况，或识别哪些集成最为活跃。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://isbm.savimbo.com/practice-guide/zh-cn/guan-li-yuan/guan-li-api-mi-yao.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
