Export
Export tickets, customers, or articles as JSON or CSV. Exports run synchronously with up to 10,000 rows per resource, oldest first. When a resource has more, the export says so in truncated and the X-Result-Truncated header.
The Export object
Export format (json or csv)
Export timestamp
Exported team UUID
Row counts for each exported resource
Resources cut off at the 10,000 row limit (messages at 50,000). Empty when the export is complete.
Endpoints
POST
/api/v1/teams/{teamId}/exportCreate Export
Export data synchronously. Supports multi-resource JSON or single-resource CSV.
Request Body
resources array Resource names: tickets, customers or articles. Defaults to all three for JSON.
format string Output format
Default: json
filters object Shared status, priority, createdAfter and createdBefore filters.
Code Examples
bash
curl -X POST "https://www.cstar.help/api/v1/teams/{teamId}/export" \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{"resources":["tickets"],"filters":{"status":"closed"},"format":"csv"}' Responses
200 Exported data
json
{
"success": true,
"data": {
"object": "export",
"format": "json",
"exportedAt": "2026-10-10T00:00:00Z",
"teamId": "550e8400-e29b-41d4-a716-446655440001",
"tickets": [
{
"id": "550e8400-e29b-41d4-a716-446655440002",
"title": "Sample"
}
],
"summary": {
"tickets": 1
},
"truncated": []
}
} 401 Authentication failed: missing or invalid API key
json
{
"success": false,
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The API key provided is invalid or has been revoked",
"doc_url": "https://www.cstar.help/developers/errors#invalid_api_key",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} 403 Insufficient permissions: wrong key type or team access
json
{
"success": false,
"error": {
"type": "authentication_error",
"code": "insufficient_permissions",
"message": "Your API key does not have permission for this operation",
"doc_url": "https://www.cstar.help/developers/errors#insufficient_permissions",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} 429 Rate limit exceeded
json
{
"success": false,
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Try again in 60 seconds.",
"retryAfter": 60,
"doc_url": "https://www.cstar.help/developers/errors#rate_limit_exceeded",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
}