API keys
API keys grant server-side access to every API resource owned by their account. Keep them out of browser code, mobile applications, source control and public documentation.
The secret is returned only when a key is created. It is null when the same key is retrieved or listed later. Store a newly created secret before discarding the response; FiscalRail cannot reveal it again.
An API key can create and revoke other keys, including itself. Use the dashboard to create the first key or recover access if all keys are revoked.
The API Key object
id
string
object
string
api_key.live
boolean
account
string
name
string
suffix
string
secret
string or null
created_at
string
{
"id": "acct_key_14Vxtqg6oXpAY5WdWoq4wW",
"object": "api_key",
"live": true,
"account": "acct_14Vxtqg2nwvPR75TpsGH8N",
"name": "Production server",
"suffix": "4wW7",
"secret": "ak_11111111111111111111111111111111111111111111",
"created_at": "2026-08-10T09:30:00Z"
}
Create an API key
/v1/api-keysCreates an API key. The secret is returned by this operation only and cannot be retrieved later.
name
string
required
201
An API Key object containing its newly issued secret.
JSON
curl --request POST \
'https://api.fiscalrail.com/v1/api-keys' \
--header "Authorization: Bearer ak_test_..."
{
"id": "acct_key_14Vxtqg6oXpAY5WdWoq4wW",
"object": "api_key",
"live": true,
"account": "acct_14Vxtqg2nwvPR75TpsGH8N",
"name": "Production server",
"suffix": "4wW7",
"secret": "ak_11111111111111111111111111111111111111111111",
"created_at": "2026-08-10T09:30:00Z"
}
Retrieve an API key
/v1/api-keys/{id}Returns API key metadata. The secret is always null after creation.
id
string
required
200
An API Key object.
JSON
curl --request GET \
'https://api.fiscalrail.com/v1/api-keys/acct_key_14Vxtqg6oXpAY5WdWoq4wW' \
--header "Authorization: Bearer ak_test_..."
{
"id": "acct_key_14Vxtqg6oXpAY5WdWoq4wW",
"object": "api_key",
"live": true,
"account": "acct_14Vxtqg2nwvPR75TpsGH8N",
"name": "Production server",
"suffix": "4wW7",
"secret": "ak_11111111111111111111111111111111111111111111",
"created_at": "2026-08-10T09:30:00Z"
}
Revoke an API key
/v1/api-keys/{id}Permanently revokes an API key. Revoking the key used for this request takes effect immediately after the response.
id
string
required
204
The API key was revoked. The response has no body.
curl --request DELETE \
'https://api.fiscalrail.com/v1/api-keys/acct_key_14Vxtqg6oXpAY5WdWoq4wW' \
--header "Authorization: Bearer ak_test_..."
List API keys
/v1/api-keysReturns API keys in reverse chronological ID order. Stored keys never expose their secret.
limit
integer
25.starting_after
string
ending_before.ending_before
string
starting_after.
200
A list of API Key objects.
JSON
curl --request GET \
'https://api.fiscalrail.com/v1/api-keys?limit=25' \
--header "Authorization: Bearer ak_test_..."
{
"object": "list",
"has_more": null,
"data": [
{
"id": "acct_key_14Vxtqg6oXpAY5WdWoq4wW",
"object": "api_key",
"live": true,
"account": "acct_14Vxtqg2nwvPR75TpsGH8N",
"name": "Production server",
"suffix": "4wW7",
"secret": "ak_11111111111111111111111111111111111111111111",
"created_at": "2026-08-10T09:30:00Z"
}
]
}