Import
Import ticket details, customers, or articles. Processes up to 500 records synchronously and supports merge strategies.
The Impor object
Imported entity type: ticket, customer or article
Total records processed
Records created
Records updated
Records skipped
Rows saved with something missing or skipped as duplicates, each starting "Row N:"
Endpoints
/api/v1/teams/{teamId}/importRun Import
Import up to 500 records synchronously. A ticket brings its details, its requester (customer_email is found or created as a customer in the key's test or live mode) and its description as the first customer message. Replies, private notes and attachments are not migrated. A customer created without an email fails with a row error.
Request Body
resource string requiredResource type
records array requiredArray of flat record objects or wrapped { data, action, existingId? } records. For ticket create/update records, nonempty arrays at messages, _messages, comments, audits, conversations, threads, _embedded.threads, conversation_parts, or conversation_parts.conversation_parts, on the record or its data object, cause HTTP 400 before any records in the request are written. A truthy source.body paired with an array at conversation_parts or conversation_parts.conversation_parts also causes HTTP 400, even if that array is empty. Empty history without this initial-message shape, customFields/metadata and wrapped records with action: "skip" are allowed.
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
{
"success": true,
"data": {
"object": "import_result",
"logId": "550e8400-e29b-41d4-a716-446655440001",
"entityType": "customer",
"success": true,
"total": 1,
"created": 1,
"updated": 0,
"skipped": 0,
"failed": 0,
"createdIds": [
{
"rowIndex": 1,
"id": "550e8400-e29b-41d4-a716-446655440002"
}
],
"durationMs": 10
}
} {
"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"
}
} {
"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"
}
} {
"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"
}
} /api/v1/teams/{teamId}/importList 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
{
"success": true,
"data": [
{
"id": "imp_abc",
"resource": "customers",
"status": "completed",
"totalRecords": 50,
"created": 45,
"createdAt": "2025-12-10T14:30:00Z"
}
]
} {
"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"
}
} {
"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"
}
} {
"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"
}
}