API Reference
Authentication
Authenticate API requests using Bearer tokens with the t0_ prefix.
The Ticket0 REST API uses bearer tokens for authentication. All API requests must be made over HTTPS.
Base URL: https://app.ticket0.ai/api/v1
Generating an API key
- Go to Settings → API keys
- Click New key
- Give the key a descriptive name, pick the scopes it needs, and optionally set an expiry date
- Click Create key
- Copy the key from the confirmation dialog — this is the only time the full key is shown. If you lose it, revoke and create a new one
API keys start with t0_. Only workspace Owners and Admins can create or revoke keys.
Making authenticated requests
Include your key in the Authorization header:
curl https://app.ticket0.ai/api/v1/tickets \
-H "Authorization: Bearer t0_your_api_key"Scopes
Each API key is issued with one or more scopes. Request only the scopes your integration needs.
| Scope | Grants |
|---|---|
tickets:read | Read tickets and ticket details |
tickets:write | Create and update tickets |
messages:read | Read ticket messages |
messages:send | Send replies on tickets |
customers:read | Read customer records |
customers:write | Create and update customers |
admin | Full access to all resources and settings |
Errors
All errors return a consistent JSON body:
{
"error": {
"code": "UNAUTHORIZED",
"message": "Valid API key required"
}
}Error code values are uppercase, underscore-separated constants — parse them as exact strings (e.g. "UNAUTHORIZED", not "unauthorized"). Common error codes:
| HTTP status | Code | Meaning |
|---|---|---|
400 | VALIDATION_ERROR | Invalid request body or parameters (missing required field, bad enum value, etc.) |
401 | UNAUTHORIZED | Missing or invalid API key |
403 | FORBIDDEN | API key lacks the required scope |
404 | NOT_FOUND | Resource not found (wrong ID, or not in this workspace) |
429 | RATE_LIMITED | Rate limit exceeded — see Rate limiting |
500 | INTERNAL | Unexpected server error — safe to retry with exponential backoff |
Quick start
# List your 10 most recent open tickets
curl "https://app.ticket0.ai/api/v1/tickets?status=open&limit=10" \
-H "Authorization: Bearer t0_your_api_key"