API authentication
Store, send, rotate, and revoke a Sprachpass API key safely.
Send a key
Every request except health and the OpenAPI document needs an Authorization header with a live API key. Every v1 key has the read-only catalog:read scope.
Authorization: Bearer sp_live_{40_lowercase_hex_characters}Store a key
- Keep the key in a server-side secret store or encrypted runtime configuration.
- Never commit it to source control.
- Never put it in browser JavaScript, a mobile bundle, a URL, logs, or analytics.
- Give production access only to the service that makes the requests.
Rotate a key
A client can have more than one active key during a controlled rotation. Both keys share the same client request limit. Move traffic to the new key, confirm it works, then ask Sprachpass to revoke the old key.
Authentication errors
- missing_api_key: the Authorization header is absent.
- invalid_api_key: the value is not a recognised active credential.
- api_key_revoked: the matching credential has been revoked.
- api_client_suspended: the client account is suspended.