# API keys tools

[All tool areas](/docs/tools.md). Each tool acts within your access.

## API keys

### list_api_keys

List API keys in this organization: yours, or everyone's if you have api_keys:write across the organization. Names, what each may do, when it was last used; never the keys themselves.

Reads · Members of an organization · Needs api_keys:write

No input.

#### Output

- `apiKeys` — array; required. 
  - `apiKeys[]` — object; optional. 
    - `apiKeys[].id` — string; required. 
    - `apiKeys[].name` — string or null; required. 
    - `apiKeys[].start` — string or null; required. The key's first characters, to recognize it
    - `apiKeys[].permissions` — array; required. 
      - `apiKeys[].permissions[]` — string; optional. 
    - `apiKeys[].createdBy` — string; required. 
    - `apiKeys[].createdAt` — string; required.  format: "date-time"
    - `apiKeys[].expiresAt` — string or null; required.  format: "date-time"
    - `apiKeys[].lastUsedAt` — string or null; required.  format: "date-time"
    - `apiKeys[].revoked` — boolean; required. 

### revoke_api_key

Revoke an API key: it stops working on its next call, for good. Yours, or anyone's with api_keys:write across the organization. Returns a preview to confirm.

Changes · Members of an organization · Needs api_keys:write

#### Input

- `apiKeyId` — string; required. The api key's id, from list_api_keys

#### Output

- `id` — string; required. 
- `name` — string or null; required. 
- `start` — string or null; required. The key's first characters, to recognize it
- `permissions` — array; required. 
  - `permissions[]` — string; optional. 
- `createdBy` — string; required. 
- `createdAt` — string; required.  format: "date-time"
- `expiresAt` — string or null; required.  format: "date-time"
- `lastUsedAt` — string or null; required.  format: "date-time"
- `revoked` — boolean; required. 
