Sample - OpenAI API
GET/organization/admin_api_keys/{key_id}

Retrieve an organization admin API key

Retrieves the details of a single organization API key. Supply key_id to identify the key and inspect its redacted value, timestamps, owner, and expiration state.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter
key_idstringrequired
The identifier of the organization API key to retrieve.

1 status code
200Returns the requested API key's object type, identifier, name, redacted value, creation and usage timestamps, expiration state, and owner information.
objectstringrequired
The object type, which is always `organization.admin_api_key`
Allowed:organization.admin_api_key
idstringrequired
The identifier, which can be referenced in API endpoints
namestringoptional
The name of the API key
redacted_valuestringrequired
The redacted value of the API key
created_atintegerrequired
The Unix timestamp (in seconds) of when the API key was created
expires_atintegerrequired
The Unix timestamp (in seconds) of when the API key expires
last_used_atintegeroptional
The Unix timestamp (in seconds) of when the API key was last used
ownerobjectrequired

Error handling

key_id must identify the organization API key you want to retrieve. Use the returned redacted_value and timestamp fields to inspect the key without exposing its full secret value.