Skip to main content

Export

Export tickets, customers, or articles as JSON or CSV. Exports run synchronously with up to 10,000 rows per resource.

The Expor object

format string

Export format (json or csv)

exportedAt string

Export timestamp

teamId string

Exported team UUID

summary object

Row counts for each exported resource

Endpoints

POST /api/v1/teams/{teamId}/export

Create 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
    }
  }
}

401 Authentication failed: missing or invalid API key
json
{
  "success": false,
  "error": {
    "type": "authentication_error",
    "code": "authentication_required",
    "message": "Invalid or expired API key",
    "doc_url": "https://www.cstar.help/developers/api-reference#authentication",
    "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": "authorization_error",
    "code": "insufficient_permissions",
    "message": "Secret key required for this endpoint",
    "doc_url": "https://www.cstar.help/developers/api-reference#authentication",
    "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",
    "doc_url": "https://www.cstar.help/developers/api-reference#rate-limiting",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}