Skip to content
einvoicing.dev

API/Keys

List API keys

GET/v1/keys· API key

Every key on the account, newest first. Revoked keys are included with revoked_at set: a key that was used has to stay recognisable after it stops working. Secrets are never returned. Only the public prefix identifies a key.

Request
curl https://api.einvoicing.dev/v1/keys \  -H "Authorization: Bearer $EINVOICING_API_KEY"

Response

200

The account's keys.

FieldTypeDescription
datarequiredApiKey[]
Example responseapplication/json
{  "data": [    {      "id": "01J9Z3M8X5D7F9H1K3M5P7R9T1",      "name": "CLI on steve-laptop",      "mode": "live",      "prefix": "einv_live_k3m9x2qa",      "created_at": "2026-09-11T14:05:02.117Z",      "last_used_at": "2026-09-11T15:40:18.003Z",      "expires_at": null,      "revoked_at": null    },    {      "id": "01J9Z2A1B3C5D7E9F1G3H5J7K9",      "name": "Old CI key",      "mode": "test",      "prefix": "einv_test_b4n8w1ze",      "created_at": "2026-09-11T13:01:44.520Z",      "last_used_at": "2026-09-11T13:30:02.911Z",      "expires_at": null,      "revoked_at": "2026-09-11T14:10:00.000Z"    }  ]}

Errors

Every error is application/problem+json (RFC 9457). Branch on type, which is stable, never on title or detail.

StatusWhen
401

No key, or a key that is unknown or revoked. Problem type is unauthenticated.

/problems/unauthenticated

403

A test key cannot manage keys or billing. Use a live key. Problem type is live-key-required.

429

Too many requests in a short window. Slow down and retry after the number of seconds in Retry-After. Problem type is rate-limited.

/problems/rate-limited

Schemas

ApiKey

An API key, without its secret.

FieldTypeDescription
idrequiredUlidA ULID. Opaque and time-ordered.
namerequiredstringWhat the key is for.
moderequiredstringWhether the key is metered (live) or free and limited (test).

livetest

prefixrequiredstringThe public start of the key, enough to recognise it and never enough to use it.
created_atrequiredTimestamp · date-timeRFC 3339, UTC, millisecond precision.
last_used_atrequiredstring or null · date-timeWhen the key last authenticated a request. Null if never.
expires_atrequiredstring or null · date-timeWhen the key stops working. Null if never.
revoked_atrequiredstring or null · date-timeWhen the key was revoked. Null while it is active.