Skip to content

API keys & limits

Authenticate requests, configure daily spending limits, and restrict allowed IPs.

Authenticate API requests to DraxonCloud with an API key. Manage all your keys directly in the dashboard under /dashboard/keys.

Using your API key

Keys start with drx_ followed by 40 characters. Pass your key in either of these headers:

Authorization: Bearer drx_AbCdEfGh1234567890IjKlMnOpQrStUvWxYz0123
X-Api-Key: drx_AbCdEfGh1234567890IjKlMnOpQrStUvWxYz0123

curl example

curl -s -X GET https://draxon.one/api/account/v1/billing/balance \
  -H "Authorization: Bearer $DRAXON_KEY"

Safety limits on keys

When you create or edit a key in the dashboard, you can configure three safety controls:

  1. Allowed products: Restrict the key to specific products (captcha or mail). If empty, the key can call any product.
  2. Daily spending limit: Maximum balance in millionths of a dollar (1,000,000 = $1.00) that this key may spend plus reserve in a single UTC day. When reached, calls fail with HTTP 402 spend_cap_reached.
  3. Allowed IP addresses: List of IPv4/IPv6 addresses or CIDR blocks (for example ["203.0.113.5", "198.51.100.0/24"]). Calls from other IPs are rejected with HTTP 403 ip_not_allowed. If left empty, any IP may connect.

Managing keys in the dashboard

Go to /dashboard/keys to:

  • Create up to 50 active keys per account.
  • Copy your secret key when created (shown once).
  • Adjust product permissions, daily spending limits, and allowed IP addresses at any time.
  • Revoke keys immediately if compromised. Requests using a revoked key receive HTTP 401 invalid_api_key.

Mailbox login tokens

If you need to give customers or scripts access to an individual private inbox without sharing your main account API key, generate a mailbox login token (dxm_...). See Temporary mail for details.

Common key errors

  • 401 invalid_api_key: Key does not exist, is typed incorrectly, or was revoked.
  • 403 ip_not_allowed: Client IP is not in the key’s allowed IP list.
  • 403 scope_denied: Key cannot use this product.
  • 402 spend_cap_reached: Key hit its daily spending limit for today.

For the full error response format, see Errors & rate limits.