Problems·HTTP 401
unauthenticated
No valid API key was presented.
What it means
The request had no API key, or its key is malformed, unknown, revoked or expired. The answer is the same in every case, on purpose: telling them apart would tell whoever holds a stolen key which it is.
What to do
Send the key as Authorization: Bearer <key> or in X-API-Key. einvoicing whoami checks the key the CLI is using. If every key is lost, signing in again with your email adds a new one.
Example
Sent as application/problem+json (RFC 9457). Branch on type, which is stable. Never branch on title or detail, which are prose and may change.
{ "type": "https://www.einvoicing.dev/problems/unauthenticated", "title": "No valid API key was presented.", "status": 401, "detail": "…"}Returned by
- Validate a Peppol document
POST /v1/validations - Convert a JSON invoice to Peppol UBL
POST /v1/conversions - Look up a Peppol participant
GET /v1/participants/{participant_id} - List supported rulesets
GET /v1/rulesets - Get usage for the current billing period
GET /v1/usage - List API keys
GET /v1/keys - Create an API key
POST /v1/keys - Revoke an API key
DELETE /v1/keys/{key_id} - Get the account
GET /v1/account - Start a subscription
POST /v1/billing/checkout-sessions - Manage a subscription
POST /v1/billing/portal-sessions
All problem types
Every error the API can return, with what to do about each.
API reference
Every operation, its parameters and the errors it can answer with.