Skip to main content
POST
/
auth
/
api-keys
Create a platform API key
curl --request POST \
  --url https://api.openfiskal.com/v1/auth/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "label": "Production",
  "description": "<string>"
}
'
{
  "object": "<string>",
  "id": "key_01HXYZ",
  "api_key": "ofk_platform_live_...",
  "label": "<string>",
  "description": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "last_used_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Platform API key sent as Authorization: Bearer ofk_platform_.... Platform integrators also pass OpenFiskal-Organization: org_xxx to act on behalf of a merchant.

Body

application/json
label
string
required

Human-readable label to identify this API key

Example:

"Production"

description
string | null

Response

Platform API key created

object
string
Allowed value: "platform_api_key"
id
string
Example:

"key_01HXYZ"

api_key
string | null

Only returned at creation time. Store immediately — cannot be retrieved again.

Example:

"ofk_platform_live_..."

label
string
description
string | null
created_at
string<date-time>
last_used_at
string<date-time> | null