Skip to main content
GET
/
user
/
api-keys
List my API keys
curl --request GET \
  --url https://{organization_id}.platform.barndoor.ai/api/llm-gateway/user/api-keys \
  --header 'Authorization: Bearer <token>'
[
  {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "created_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "CI runner",
    "key_prefix": "bd-abcde",
    "scopes": [
      "<string>"
    ],
    "created_at": "2023-11-07T05:31:56Z",
    "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "group_name": "<string>",
    "expires_at": "2023-11-07T05:31:56Z",
    "revoked_at": "2023-11-07T05:31:56Z"
  }
]

Authorizations

Authorization
string
header
required

JWT obtained through Barndoor's authentication flow. Pass the token verbatim in Authorization: Bearer <token>. Use the Barndoor SDK's loginInteractive() helper to obtain a token in scripts and notebooks.

Response

200 - application/json

List of the caller's API keys

id
string<uuid>
required
org_id
string<uuid>
required
created_by_user_id
string<uuid>
required
name
string
required
Example:

"CI runner"

key_prefix
string
required

First 8 characters of the raw key — safe to display

Example:

"bd-abcde"

scopes
string[]
required
created_at
string<date-time>
required
user_id
string<uuid> | null

Assigned user, for personal-style keys. null for org / group keys.

group_name
string | null
expires_at
string<date-time> | null
revoked_at
string<date-time> | null