Authentication
Bearer token authentication, scopes, and key management.
The trumpet API uses Bearer token authentication. Every request must include a valid API key in the Authorization header.
Bearer tokens
Include your API key in the Authorization header using the Bearer scheme:
Authorization: Bearer trpt_a1b2c3_Ks8dF2m...Every API key starts with the trpt_ prefix, followed by a short brand identifier and a cryptographically random string.
Example request
curl -X POST https://trumpet.app/api/v1/pods/new \
-H "Authorization: Bearer trpt_a1b2c3_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"template_id": "69f0bafc4cc54b506b0355d8"
}'Scopes
Each API key is issued with one or more scopes that determine which endpoints it can access. If a key lacks the required scope for an endpoint, the API returns a 403 Forbidden response.
| Scope | Access |
|---|---|
CreatePod | Create new Pods via POST /v1/pods/new |
More scopes coming soon
Additional scopes will be added as new API endpoints become available. Your existing keys will not gain new scopes automatically — you'll need to create new keys or update existing ones.
Additional scopes documented on other endpoint pages:
| Scope | Endpoint |
|---|---|
ReadCustomStatuses | List Custom Statuses |
UpdatePod | Update Pod |
Key management
You can manage your API keys from Settings → API Keys in the trumpet dashboard. From there you can:
Create keys — Generate a new key with a name and scopes. The raw key is shown only once.
Revoke keys — Immediately disable a key. The key remains visible in your list for auditing but stops working instantly.
Delete keys — Permanently remove a key from your list. The key is also revoked if it wasn't already.
Authentication errors
If authentication fails, the API returns one of these responses:
| Status | Meaning |
|---|---|
401 Unauthorized | Missing or invalid API key. Check the Authorization header format and that the key is correct. |
403 Forbidden | The API key is valid but lacks the required scope for this endpoint. |
Keep your keys safe
Never commit API keys to version control or include them in client-side code. Use environment variables or a secrets manager instead.