---
title: "List API Keys"
method: GET
path: "/v1/organizations/api_keys"
---

# List API Keys

`GET /v1/organizations/api_keys`

## Request

- Base URL: `https://api.anthropic.com`
- URL: `https://api.anthropic.com/v1/organizations/api_keys`
- Auth: none declared

## Query parameters

- `before_id` string: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.
- `after_id` string: ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.
- `limit` integer: Number of items to return per page. Defaults to `20`. Ranges from `1` to `1000`.
- `status` 'active' | 'archived' | 'expired' | 'inactive', nullable: Filter by API key status.
- `workspace_id` string, nullable: Filter by Workspace ID.
- `created_by_user_id` string, nullable: Filter by the ID of the User who created the object.

## Headers

- `anthropic-version` string: The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).

## Response `200`

Successful Response

- ListResponseApiKey
  - `data` ApiKey[], required
    - `created_at` string, date-time, required: RFC 3339 datetime string indicating when the API Key was created.
    - `created_by` CreatedBy, required
      - `id` string, required: ID of the actor that created the object.
      - `type` 'service_account' | 'user', required: Type of the actor that created the object.
    - `expires_at` string, date-time, nullable, required: RFC 3339 datetime string indicating when the API Key expires, or `null` if it never expires.
    - `id` string, required: ID of the API key.
    - `name` string, required: Name of the API key.
    - `partial_key_hint` string, nullable, required: Partially redacted hint for the API key.
    - `principal` union, required: The principal the API key acts as (a User or a Service Account), or `null` if the API key is not bound to a principal.
      - ApiKeyUserActor
        - `type` 'user_actor', required: Principal type. Always `"user_actor"` for a User.
        - `user_id` string, required: ID of the User the API key acts as.
      - ApiKeyServiceAccountActor
        - `service_account_id` string, required: ID of the Service Account the API key acts as.
        - `type` 'service_account_actor', required: Principal type. Always `"service_account_actor"` for a Service Account.
    - `scope` union, required: Where the API key belongs: its Workspace (`{"type": "workspace", "workspace_id": "wrkspc_..."}`, with the Workspace's real ID even when it is the organization's default Workspace), or the organization (`{"type": "organization"}`) for a principal-bound API key that has no Workspace.
      - ApiKeyOrganizationScope
        - `type` 'organization', required: Scope type. Always `"organization"`: the API key has no Workspace. Only a principal-bound API key can have this scope.
      - ApiKeyWorkspaceScope
        - `type` 'workspace', required: Scope type. Always `"workspace"`: the API key belongs to one Workspace.
        - `workspace_id` string, required: ID of the Workspace the API key belongs to, including when it is the organization's default Workspace.
    - `status` 'active' | 'archived' | 'expired' | 'inactive', required: Status of the API key.
    - `type` 'api_key', required: Object type. For API Keys, this is always `"api_key"`.
  - `first_id` string, nullable, required: First ID in the `data` list. Can be used as the `before_id` for the previous page.
  - `has_more` boolean, required: Indicates if there are more results in the requested page direction.
  - `last_id` string, nullable, required: Last ID in the `data` list. Can be used as the `after_id` for the next page.

## Other responses

- `400`: Invalid argument - The client specified an invalid argument
- `401`: Unauthenticated - The request does not have valid authentication credentials
- `403`: Permission denied - The caller does not have permission to execute the specified operation
- `404`: Not found - Some requested entity was not found
- `408`: Deadline exceeded - The deadline expired before the operation could complete
- `409`: Aborted - The operation was aborted due to concurrency issue
- `412`: Failed precondition - Operation was rejected because the system is not in required state
- `413`: Out of range - Operation was attempted past the valid range
- `429`: Resource exhausted - Some resource has been exhausted (rate limiting)
- `431`: Request header fields too large - Request metadata was too large
- `499`: Cancelled - The operation was cancelled by the client
- `500`: Internal - Internal server error
- `501`: Unimplemented - The operation is not implemented or supported
- `503`: Unavailable - The service is currently unavailable
- `504`: Deadline exceeded - Upstream service did not respond in time
- `529`: Overloaded - The service is temporarily overloaded

## Changes

- **2026-10-21** `94c83daca660`: 1 breaking, 1 warning
  - removed the required property `data/items/workspace_id` from the response with the `200` status
  - deleted the `header` request parameter `x-api-key`
- **2026-09-30** `51c5260134e8`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/anthropics/apis/anthropic-api/changes/v1/organizations/api_keys/get.md)

---

[API](https://skmtc.dev/anthropics/apis/anthropic-api.md) - [All operations](https://skmtc.dev/anthropics/apis/anthropic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anthropics/apis/anthropic-api/revisions/328591af84ad?raw)
