# List an organisation's API keys

> Page: https://docs.plotwork.dev/api/get-orgs-org-keys. Index of every page: https://docs.plotwork.dev/llms.txt

The organisation's active keys, newest first.

`GET /orgs/{org}/keys`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | List an organisation's API keys. |
| What does it take? | `org` in the path. |
| What does it return? | Status 200 with a body of type [`OrgApiKeyList`](https://docs.plotwork.dev/api/schemas.md#orgapikeylist). |
| What can go wrong? | `401` not signed in; `403` a member may not see the keys (orgs.forbidden); `404` no such organisation, or the caller is not a member of it; `429` too many requests; `503` organisations are not set up on this server. Every failure uses the one error envelope. |

## What it does

The organisation's active keys, newest first. A key is shown as its first characters and its last four. The owner and an admin may look.

## Path parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `org` | `string` | yes | The organisation's id or its slug. |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 200 | The active keys. | [`OrgApiKeyList`](https://docs.plotwork.dev/api/schemas.md#orgapikeylist) |
| 401 | Not signed in. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 403 | A member may not see the keys (orgs.forbidden). | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 404 | No such organisation, or the caller is not a member of it. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 429 | Too many requests. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 503 | Organisations are not set up on this server. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |

## Response body

A 200 answer has the type [`OrgApiKeyList`](https://docs.plotwork.dev/api/schemas.md#orgapikeylist).

| Field | Type | Required | Description |
|---|---|---|---|
| `items` | `OrgApiKeySummary[]` | yes |  |
| `items[].id` | `string` | yes |  |
| `items[].name` | `string` | yes |  |
| `items[].prefix` | `string` | yes |  |
| `items[].last4` | `string` | yes |  |
| `items[].createdAt` | `integer` | yes | Milliseconds since the epoch. |
| `items[].lastUsedAt` | `integer \| null` | yes | Milliseconds since the epoch, or null if never used. |
| `items[].revealable` | `boolean` | yes | True when the full key can be shown again with the reveal route. False for a key made before that was possible, or on a server that cannot seal keys. |
| `items[].scopes` | `("diagrams" \| "audit:read")[]` | yes | `diagrams`: read the library, publish, and change its diagrams, which every key made before scopes holds. `audit:read`: read and export the audit log, and nothing else unless `diagrams` is also given. |

## See also

| Doc | Why |
|---|---|
| [API reference](https://docs.plotwork.dev/api/reference.md) | Every endpoint, and the error envelope |
| [Schemas](https://docs.plotwork.dev/api/schemas.md) | Every request and response type |
| [Tool reference](https://docs.plotwork.dev/mcp/tools.md) | The operations as callable tools |
