Truthlocks provides multiple environments so you can develop, test, and ship with confidence. Every tenant starts with a production environment and a shared sandbox. You can also create dedicated development and staging environments within your tenant for complete data isolation.Documentation Index
Fetch the complete documentation index at: https://docs.truthlocks.com/llms.txt
Use this file to discover all available pages before exploring further.
Base URLs
| Environment | API Base URL | Console URL |
|---|---|---|
| Sandbox | https://sandbox-api.truthlocks.com | https://console.truthlocks.com |
| Production | https://api.truthlocks.com | https://console.truthlocks.com |
Try it in the API playground
Every API reference endpoint includes an interactive playground where you can build and send requests directly from the docs. Use the environment switcher at the top of the playground to toggle between Production (api.truthlocks.com) and Sandbox (sandbox-api.truthlocks.com).
The playground covers the full API surface, including all 44 Machine Identity (MAIP) endpoints — agent registration, session management, trust scores, orchestrations, guardrails, and more. MAIP endpoints support both X-API-Key and Bearer JWT authentication in the playground.
Sandbox requests use isolated test data, so you can experiment without affecting production. Enter your API key, fill in parameters, and click Send to see a live response.
Sandbox vs production
| Feature | Sandbox | Production |
|---|---|---|
| API Key Prefix | tl_dev_ | tl_live_ |
| Issuer Auto-Approval | Issuers are auto-approved | Requires governance approval |
| Rate Limits | 1,000 req/min | Based on tier (60-unlimited) |
| Daily Quota | 10,000 attestations | Based on tier |
| Data Retention | 30 days | Permanent |
| SLA | Best effort | 99.9% uptime |
| Transparency Log | Ephemeral (reset weekly) | Permanent, append-only |
Tenant environments
In addition to the shared sandbox, each tenant can create dedicated DEV and STAGING environments. These provide full data isolation at the database level using row-level security, so data created in one environment is invisible to another.| Kind | Purpose | Created automatically |
|---|---|---|
| PROD | Live production data | Yes |
| STAGING | Pre-production testing | No |
| DEV | Development and experimentation | No |
- Test minting and verification flows without affecting production data
- Run integration tests against a dedicated environment with its own API keys
- Stage changes before promoting them to production
Creating an environment
Create a DEV or STAGING environment from the console at Settings > Environments, or via the API:Listing environments
Switching environments
Activate a different environment for your current session:How isolation works
Every tenant-scoped API request requires a valid environment context. The environment is determined automatically from your API key or session token — it cannot be overridden via request headers. If the environment context is missing or invalid, the API returns401 or 403. This fail-closed behavior ensures that a DEV API key can never access production data, even if a request is accidentally routed to the wrong environment.
API Key Structure
API keys include environment identifiers for easy recognition:Programmatic Detection
Environment Configuration
Recommended environment variable setup for your application:Sandbox (.env.local)
Production (.env.production)
Testing Best Practices
Integration Tests
Always run integration tests against the development environment. Never test
with production credentials in CI/CD.
Mock Responses
For unit tests, use our SDK’s built-in mock mode to avoid hitting the API
entirely.
Data Cleanup
Sandbox data is reset weekly. Don’t rely on persistent data in development
for long-running tests.
Rate Limit Testing
Sandbox has generous rate limits. Ensure your app handles 429 responses
gracefully for production.
Sandbox to Production
Follow this checklist when moving from development to production:Create Keys
Create production API keys in
console.truthlocks.com
Next Steps
Authentication
Learn how to authenticate API requests securely.
Rate Limits
Understand quotas and how to handle rate limiting.

