Skip to main content
POST
/
api
/
api-keys
Create API key
curl --request POST \
  --url https://dev.exante.app/api/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Production integration",
  "scopes": [
    "invoices:read"
  ],
  "expires_in_days": 30
}
'
{
  "status": "success",
  "message": "API key created",
  "data": {
    "uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "Production integration",
    "key_snippet": "ex_live_...9AbC",
    "user_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "organization_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "scopes": [
      "invoices:read"
    ],
    "last_used_at": "2023-11-07T05:31:56Z",
    "expires_at": "2023-11-07T05:31:56Z",
    "revoked_at": "2023-11-07T05:31:56Z",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "key": "ex_live_xxxxxxxxxxxxxxxxx"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
name
string
required

Human-readable label for the key

Example:

"Production integration"

scopes
string[]

Optional scopes. If omitted, full access is used.

Example:
["invoices:read"]
expires_in_days
integer

Positive number of days until expiration

Required range: x >= 1
Example:

30

Response

API key created

status
string
Example:

"success"

message
string
Example:

"API key created"

data
object