Server-side authentication only
Travelbase API keys are designed for secure server-to-server communication. Never expose your API keys in client-side code such as browsers, mobile apps, or public repositories.Manage keys in the dashboard
API keys are created and managed in the Travelbase dashboard.Use the dashboard to:
- Create new API keys
- Rotate compromised keys
- Revoke unused keys
- View usage and activity
Using your API key
Authenticate requests
Include your API key in the
x-api-key header for every request.Example request
- Identify your tenant
- Authorize access to resources
- Track usage and activity
API key environments
Sandbox keys
Used for testing and development. Sandbox keys cannot access live data and are safe for non-production use.
Live keys
Used for production systems. Live keys have access to real tenant data and must be handled securely.
Security best practices
Store keys securely
Store API keys in secure environments such as:
- Environment variables
- Secret managers
- Secure backend configuration
Never expose client-side
Do not include API keys in:
- Frontend JavaScript
- Mobile apps
- Public repositories
Rotate keys regularly
Rotate API keys periodically to reduce risk exposure. Immediately rotate keys if they are exposed or compromised.
Use separate keys per environment
Use different keys for:
- Development
- Staging
- Production
Recommended integration pattern
Secure architecture
Your server should act as a secure intermediary between your application and the Travelbase API.
Authentication
All requests to the Travelbase Tenant API must be authenticated using an API key. API keys uniquely identify your tenant, authorize access to resources, and enable secure, auditable communication between your systems and the Travelbase platform.Key Format
Travelbase API keys use specific prefixes to help you distinguish between environments at a glance. This prevents accidentally using production keys during development.| Prefix | Environment | Description |
|---|---|---|
tb_sandbox_ | Sandbox | Used for development and testing without affecting real data. |
tb_live_ | Live | Used for production environments and real transactions. |
Example: tb_live_2YotnFZFEjr1zCsicMWpAA
Security & Compromised Keys
If you suspect your API key has been exposed or compromised, you must act quickly to prevent unauthorized access to your tenant data.Emergency Rotation Workflow
Follow this sequence to secure your account without causing prolonged downtime:Immediate Actions
If your security is breached:Rotate the API key from the dashboard immediately.Update your backend environment variables with the new key.Review recent API activity logs for suspicious behavior.Remove any hardcoded keys from your code or public repositories.
Tenant
Learn how to retrieve and manage specific tenant information.
Webhooks
Set up webhooks to receive real-time events and updates.

