Skip to main content
POST
/
admin
/
api-keys
Create admin API key
curl --request POST \
  --url https://api.fluxer.app/v1/admin/api-keys \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "acls": [
    "<string>"
  ],
  "expires_in_days": 183
}
'
{
  "key_id": "<string>",
  "key": "<string>",
  "name": "<string>",
  "created_at": "<string>",
  "expires_at": "<string>",
  "acls": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

Admin API key: Authorization: Admin <token>. Only valid for /admin/* endpoints.

Body

application/json
name
string
required

Display name for the API key

Required string length: 1 - 100
acls
string[]
required

List of access control permissions for the key

Maximum array length: 100
expires_in_days
integer<int32>

Number of days until the key expires

Required range: 1 <= x <= 365

Response

Success

key_id
string
required

Unique identifier for the API key

key
string
required

The generated API key secret (only shown once)

name
string
required

Display name for the API key

created_at
string
required

ISO 8601 timestamp when the key was created

expires_at
string | null
required

ISO 8601 timestamp when the key expires, or null if no expiration

acls
string[]
required

List of access control permissions for the key

Maximum array length: 100