> This page is for version v1 (default).
> For other versions, use one of these documentation indexes:
> - v1 (default): https://docs.butterix.com/llms.txt
> - v0: https://docs.butterix.com/v0/llms.txt

> For the MDX source of any page, append .mdx to the page URL.
> For a complete documentation index, see https://docs.butterix.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.butterix.com/_mcp/server.
> If something on this page is wrong or missing, POST JSON {"page": "<page URL>", "message": "<what is wrong>"} to https://docs.butterix.com/_biti/feedback/agent.

# 列出 API Key

`GET /orgs/{org}/api-keys`

需要 `admin` 角色（因此只能用会话认证调用）。只返回密钥的开头和末尾，不返回完整密钥。

Base URL: https://api.butterix.com/v1

Authentication: API key in cookie `biti_session`

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `org` | string | yes | 组织 slug 或 id |

## Example request

```bash
curl https://api.butterix.com/v1/orgs/acme/api-keys
```

## Responses

### 200

密钥列表

Content type: `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `[].id` | string | no |  |
| `[].name` | string | no |  |
| `[].prefix` | string | no | 密钥前 10 个字符 |
| `[].suffix` | string | no | 密钥末尾 10 个字符 |
| `[].createdAt` | integer | no |  |
| `[].lastUsedAt` | integer | no |  |

### Example response (200)

```json
[
  {
    "id": "key_5h2m8q",
    "name": "GitHub Actions",
    "prefix": "biti_Q2xha",
    "suffix": "Kd82mQx0Zt",
    "createdAt": 1,
    "lastUsedAt": 1
  }
]
```
