Skip to main content
All requests to the Wirebox Core API (api.wirebox.sh) require an API key passed in the standard HTTP Authorization header:

Obtaining an API Key

API keys can be generated from the Wirebox Console:
  1. Go to Settings & Keys in the navigation sidebar.
  2. Click Create API Key.
  3. Choose a descriptive name (e.g., Production Agent Worker).
  4. Copy the secret key immediately. For security, plaintext keys are only displayed once upon generation.
Wirebox stores only a salted SHA-256 hash of your API key in the database.

Client Credential Resolution

The official SDKs and the CLI resolve credentials automatically, so you only need to configure one source. Resolution order:
  1. Explicit value — constructor option (apiKey / api_key) or CLI flag (--api-key).
  2. Environment variable — WIREBOX_API_KEY (and WIREBOX_BASE_URL for the API origin).
  3. Credential file — ~/.wirebox/credentials, then ~/.wirebox/config.

Credential Files

Create ~/.wirebox/credentials with any of these formats:
JSON
Key / value
Raw key
apiKey is accepted as an alias for the key, and base_url / baseUrl for the API origin (the Python SDK additionally accepts token). Path overrides:

Zero-Config Usage

With a credential file or environment variable in place, no arguments are needed:

Key Scopes & Hierarchy

Wirebox supports two levels of API key scoping:
  • Organization Key (wb_live_...)
    Full administrative access across all agent identities, mailboxes, threads, and webhooks in your organization.
  • Agent-Scoped Key (wb_live_...)
    Restricted to a single designated agent (e.g., @eva). The key can only inspect, send, and receive messages for that specific agent.

Example: Testing Your Key

Run a quick GET /me check to verify your API key and retrieve your organization details:
cURL
Response (200 OK):

Security Best Practices

Never expose your API key in client-side code, public GitHub repositories, or browser environments. Always inject your keys using environment variables (WIREBOX_API_KEY) on your backend servers.
  • Rotation: If a key is accidentally leaked, revoke it immediately from the Console. Active keys are revoked in real time without downtime for other keys.
  • Least Privilege: When deploying standalone agents or subagents, use agent-scoped keys to limit blast radius.