Skip to main content

Import

Import tickets, customers, or articles. Synchronous processing — max 500 records per request. Supports merge strategies.

The Impor object

resource string

Resource type imported

total integer

Total records processed

created integer

Records created

updated integer

Records updated

skipped integer

Records skipped

Endpoints

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

Run Import

Import records synchronously. Max 500 per request.

Request Body

resource string required

Resource type

records array required

Array of record objects

mergeStrategy string

How to handle duplicates

Default: skip

Code Examples

curl -X POST "https://www.cstar.help/api/v1/teams/{teamId}/import" \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{"resource":"customers","records":[{"name":"Jane","email":"jane@example.com"}],"mergeStrategy":"skip"}'

Responses

200 Import result
{
  "success": true,
  "data": {
    "object": "import_result",
    "resource": "customers",
    "total": 50,
    "created": 45,
    "updated": 3,
    "skipped": 2,
    "errors": []
  }
}
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"
  }
}
GET /api/v1/teams/{teamId}/import

List Import Logs

List import history logs.

Code Examples

curl -X GET "https://www.cstar.help/api/v1/teams/{teamId}/import" \
  -H "Authorization: Bearer sk_live_your_key"

Responses

200 Import logs
{
  "success": true,
  "data": [
    {
      "id": "imp_abc",
      "resource": "customers",
      "status": "completed",
      "totalRecords": 50,
      "created": 45,
      "createdAt": "2025-12-10T14:30:00Z"
    }
  ]
}
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"
  }
}