Developers

Every request carries your API key as a bearer token:

HTTP
GET /v1/wallets HTTP/1.1
Host: ekash.ai
Authorization: Bearer ek_live_9f2c…

X-API-Key: ek_live_9f2c… is accepted as an alternative for clients that cannot set an Authorization header.

About your key

  • Keys are issued per company by an ekash administrator — ask your ekash contact for one.
  • A key is shown exactly once, when it is issued or rotated. ekash stores only a SHA-256 hash and cannot recover it — if you lose it, rotate.
  • ek_test_ = sandbox, ek_live_ = production. The prefix tells you at a glance which one you are holding.
  • A key carries scopes (see Scopes & auto-approve), an optional IP allowlist, an optional expiry, a rate limit, and an optional daily payment cap.
  • A key belongs to one company. It cannot be pointed at another — there is no company id in any request.

Treat a key like a password: server-side only, never in a browser, a mobile app, or a repository.

Failures

SituationStatuserror.code
No key presented401authentication_required
Unknown, revoked or expired key401invalid_api_key
Key used from an IP outside its allowlist403ip_not_allowed

Unknown, revoked and expired are answered identically on purpose: distinguishing them would confirm that a guessed secret is real.