List organization API keys

GET /organization/admin_api_keys

Retrieve a paginated list of organization admin API keys.

Query parameters

  • after string | null

    Return keys with IDs that come after this ID in the pagination order.

  • order string

    Order results by creation time, ascending or descending.

    Values are asc or desc. Default value is asc.

  • limit integer

    Maximum number of keys to return.

    Default value is 20.

Responses

  • 200 application/json

    A list of organization API keys.

    Hide response attributes Show response attributes object
    • object string
    • data array[object]
      Hide data attributes Show data attributes object
      • object string
      • id string
      • name string
      • redacted_value string
      • value string
      • created_at integer(int64)
      • owner object
        Hide owner attributes Show owner attributes object
        • type string
        • id string
        • name string
        • created_at integer(int64)
        • role string
    • has_more boolean
    • first_id string
    • last_id string
GET /organization/admin_api_keys
curl \
 --request GET 'https://api.openai.com/v1/organization/admin_api_keys' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "object": "list",
  "data": [
    {
      "object": "organization.admin_api_key",
      "id": "key_abc",
      "name": "Administration Key",
      "redacted_value": "sk-admin...def",
      "value": "sk-admin-1234abcd",
      "created_at": 1711471533,
      "owner": {
        "type": "service_account",
        "id": "sa_456",
        "name": "My Service Account",
        "created_at": 1711471533,
        "role": "member"
      }
    }
  ],
  "has_more": false,
  "first_id": "key_abc",
  "last_id": "key_xyz"
}