Skip to main content
POST
/
api
/
v1
/
api-keys
{
  "id": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>",
  "key": "<string>",
  "hashed_secret": "<string>",
  "label": "<string>",
  "status": "active",
  "last_used_at": "2023-11-07T05:31:56Z",
  "expires_at": "2023-11-07T05:31:56Z",
  "permissions": [
    "<string>"
  ],
  "ip_whitelist": [
    "<string>"
  ],
  "collections": [
    "<string>"
  ],
  "workspace_id": "<string>",
  "created_by": "<string>",
  "secret": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Workspace-Id
string | null

The workspace ID

Body

application/json

Schema for creating a new API key.

label
string
required

API key label/name

Required string length: 1 - 255
status
string
default:active

API key status

expires_at
string<date-time> | null

API key expiration date

permissions
string[] | null

List of permissions granted to this API key

ip_whitelist
string[] | null

List of allowed IP addresses

collections
string[] | null

List of collection IDs this API key can access

Response

Successful Response

Schema for reading API key data.

key
string
required

API key identifier

Required string length: 1 - 50
label
string
required

API key label/name

Required string length: 1 - 255
workspace_id
string
required

Reference to workspace

id
string
created_at
string | null
updated_at
string | null
hashed_secret
string | null

Hashed API key secret

status
string
default:active

API key status

last_used_at
string<date-time> | null

When the API key was last used

expires_at
string<date-time> | null

API key expiration date

permissions
string[] | null

List of permissions granted to this API key

ip_whitelist
string[] | null

List of allowed IP addresses

collections
string[] | null

List of collection IDs this API key can access

created_by
string | null

User who created the API key

secret
string | null

API key secret