Authentication

Every request is authenticated with an API key in the Authorization header:

bash
Authorization: Bearer ghost_sk_test_...

Test and live keys

PrefixModeBehavior
ghost_sk_test_SandboxInstant, free, simulated delivery — no real SMS ever leaves the sandbox.
ghost_sk_live_LiveReal numbers and real delivery. Mintable once your account has live access.

Keys never expire, but you can roll or revoke them anytime from the console. Rolling revokes the old key immediately and mints a replacement.

Storage

Keys are stored hashed (SHA-256) — we can never display a key again after minting it. If you lose one, roll it.

Errors

StatusCodeMeaning
401invalid_api_keyMissing, malformed, revoked, or unknown key.
403live_access_requiredLive key used before live access was granted, or a live-only endpoint hit with a test key.
403tenant_suspendedThe account is suspended.