POST
/
v1
/
api-keys

Body

application/json
name
string
required

A descriptive name for the API key to help identify its purpose and usage context

expiration_days
integer
default:
30

Number of days until the API key expires, between 1 and 365 days

Required range: 1 < x < 365
permissions
string[]

List of permission scopes granted to this API key, controlling what API endpoints it can access

Response

200 - application/json
_id
string
required

Unique identifier for this API key in the database

api_key
string
required

The actual API key value. This is only returned once when the key is created and cannot be retrieved later

created_at
string
required

Timestamp when this API key was created

created_by_user_id
string
required

Identifier of the user who created this API key

expiration_date
string
required

Timestamp when this API key will expire and become invalid

name
string
required

The descriptive name given to this API key

permissions
string[]
required

List of permission scopes granted to this API key

revoked
boolean
default:
false

Indicates if this API key has been manually revoked before its expiration date