Skip to main content
POST
/
api
/
v1
/
workspaces
/
{workspaceId}
/
api-keys
Mint API key
curl --request POST \
  --url https://api.luxxon.dev/api/v1/api/v1/workspaces/{workspaceId}/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "label": "Production server-to-server key",
  "environment": "LIVE",
  "scopes": [
    "sessions:create",
    "sessions:read",
    "pricing:read"
  ]
}
'
{
  "statusCode": 200,
  "message": "Request successful",
  "data": {
    "id": "3b1a9f0c-2d4e-5f6a-7b8c-9d0e1f2a3b4c",
    "workspaceId": "8c3a5b6f-1d2e-4f7a-9b8c-d1e2f3a4b5c6",
    "prefix": "lxxn_live_8c3a5b6f_",
    "label": "Production server-to-server key",
    "environment": "LIVE",
    "scopes": [
      "sessions:create",
      "sessions:read",
      "pricing:read"
    ],
    "lastUsedAt": "2026-05-12T08:30:00.000Z",
    "revokedAt": null,
    "gracePeriodEnd": null,
    "createdAt": "2026-05-13T11:30:00.000Z",
    "createdByWallet": "0xAbC0000000000000000000000000000000000001",
    "plaintext": "lxxn_live_8c3a5b6f_4f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c"
  },
  "timestamp": "2026-05-13T12:00:00.000Z"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

workspaceId
string
required
Example:

"8c3a5b6f-1d2e-4f7a-9b8c-d1e2f3a4b5c6"

Body

application/json
label
string
required
Example:

"Production server-to-server key"

environment
enum<string>
required
Available options:
LIVE,
TEST
Example:

"LIVE"

scopes
string[]
required
Example:
[
"sessions:create",
"sessions:read",
"pricing:read"
]

Response

Request successful

statusCode
number
required
Example:

200

message
string
required
Example:

"Request successful"

data
object
required

Endpoint-specific payload. See the per-endpoint schema.

timestamp
string
required
Example:

"2026-05-13T12:00:00.000Z"