Use the sandbox API key in place of a production API key. The authentication header format is identical:
Authorization: Bearer dmsi_sand_<40hex>
All API endpoints work identically in sandbox mode. The extension detects the sandbox key prefix and automatically routes all reads and writes to the sandbox tables. No endpoint URL changes are required.
Example — creating a license in sandbox mode:
POST /wp-json/dmsi-api/v1/licenses
Authorization: Bearer dmsi_sand_abc123...
Content-Type: application/json
{
"product_id": 1,
"customer_id": 3,
"status": "active"
}
The response will include:
X-DMSI-Environment: sandbox
Sandbox behaviour differences from production:
| Behaviour | Production | Sandbox |
|---|---|---|
| Data storage | Production tables | Sandbox tables |
| Rate limiting | Enforced per tier | Bypassed — unlimited |
| Webhooks | Fired on all events | Not fired |
| Environment header | X-DMSI-Environment: production | X-DMSI-Environment: sandbox |
| Key prefix | dmsi_key_* | dmsi_sand_* |
