Skip to main content

Export

Export tickets, customers, or articles as JSON or CSV. Synchronous — max 10,000 rows per resource.

The Expor object

format string

Export format (json or csv)

totalRows integer

Total rows exported

Endpoints

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

Create Export

Export data synchronously. Supports multi-resource JSON or single-resource CSV.

Request Body

resources array required

Array of { type, filters } objects

format string

Output format

Default: json

Code Examples

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":[{"type":"tickets","filters":{"status":"closed"}}],"format":"csv"}'

Responses

200 Exported data
{
  "success": true,
  "data": {
    "object": "export",
    "format": "json",
    "totalRows": 142,
    "resources": {
      "tickets": [
        {
          "id": "tkt_abc",
          "title": "Sample"
        }
      ]
    }
  }
}
401 Authentication failed — missing or invalid API key
{
  "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
{
  "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
{
  "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"
  }
}