Get API Key

get/v1/organizations/api_keys/{api_key_id}?beta=true

Path parameters

api_key_idstring required

ID of the API key.

ID of the API key.

Headers

x-api-keystring

Your unique Admin API key for authentication.

This key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the Console.

Your unique Admin API key for authentication.

This key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the Console.

anthropic-versionstring

The version of the Claude API you want to use.

Read more about versioning and our version history here.

The version of the Claude API you want to use.

Read more about versioning and our version history here.

Response

Successful Response

created_atstring date-time required

RFC 3339 datetime string indicating when the API Key was created.

expires_atstring date-time nullable required

RFC 3339 datetime string indicating when the API Key expires, or null if it never expires.

idstring required

ID of the API key.

namestring required

Name of the API key.

partial_key_hintstring nullable required

Partially redacted hint for the API key.

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".

workspace_idstring nullable required

Deprecated: use scope instead. ID of the Workspace associated with the API key, or null if the API key belongs to the default Workspace. Also null for a principal-bound API key that has no Workspace; scope tells the two apart.

Example response

{
  "created_at": "2024-10-30T23:58:27.427722Z",
  "created_by": {
    "id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
    "type": "user"
  },
  "expires_at": "2024-10-30T23:58:27.427722Z",
  "id": "apikey_01Rj2N8SVvo6BePZj99NhmiT",
  "name": "Developer Key",
  "partial_key_hint": "sk-ant-api03-R2D...igAA",
  "principal": {
    "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
  },
  "scope": {
    "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
  },
  "status": "active",
  "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
}

Changes

Changed in 1 of the 68 revisions of this API.1