Sandbox and testing
Build and test against synthetic LeadMagic data with no API key and no credits.
The Sandbox has the same paths and error format as the API and returns synthetic data. It needs no key and costs nothing.
.env.local
Or per client:
meta.sandbox is true on every Sandbox response.
Force an outcome
Test your error handling with sandboxOutcome:
sandboxOutcome | Result |
|---|---|
found | A result (default) |
empty | No result |
400 | invalid_input |
401 | auth |
402 | billing |
404 | invalid_input |
429 | rate_limit |
500 | unavailable |
The Sandbox allows 120 requests per minute per IP address.
Unit tests
Pass your own fetch to test without the network:
API key for REST · OAuth for LeadMagic CLI and MCP
Get your LeadMagic API key and test endpoints live.
Use your API key in the interactive REST playground. For the LeadMagic CLI, install the lm command and run lm login; hosted MCP clients also sign in with OAuth.