AUTHENTICATION

API keys.

Erasa uses scoped bearer keys. Keys are shown once and stored as HMAC-SHA256 hashes.

Bearer header

HTTP
Authorization: Bearer erasa_live_...

Keys start with erasa_live_. Test-mode keys (erasa_test_) are planned. Never put a key in a browser bundle or mobile app; call Erasa from your backend.

Scopes

NAMETYPEDESCRIPTION
erase:write*scopeCreate erase jobs.
jobs:readscopeRead job status and output.
usage:readscopeRead usage and credit balance.
webhooks:managescopeManage webhook endpoints.

Revocation

Revoke a key from the dashboard. Revocation takes effect immediately for new requests. If a key leaks, revoke it and create a replacement; Erasa cannot recover the plaintext.

Errors

401 Unauthorized
{
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "The API key is invalid or revoked.",
    "request_id": "req_01J..."
  }
}
Keys are hashed with a server-side pepper. Do not paste production keys into issue trackers, logs, or the docs playground. Use environment variables and rotate on a schedule.