Bulk Operations

Perform bulk updates or deletes on tickets, customers, or articles. Max 100 items per request.

The Bulk Operation object

action string

Operation type "update" | "delete"

resource string

Resource type "tickets" | "customers" | "articles"

total integer

Total items processed

succeeded integer

Items successfully processed

failed integer

Items that failed

Endpoints

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

Bulk Operation

Perform a bulk update or delete on up to 100 resources at once. With the resource's switch turned off (Tickets, Customers, or Library for articles), the call answers 403 feature_disabled with feature and enable_url.

Request Body

action string required

Operation: update or delete

resource string required

Resource type

ids string[] required

Array of resource IDs

data object

Update fields (required for update action). For articles, a status or is_public change runs per article as PATCH does: is_public is kept unless sent, an article is visible to customers only while published with is_public true, and each one that becomes visible gets article.published. A failed article is listed in errors by its art_ id. Tags are stored normalized (lowercase, dashes). For tickets, custom_fields is checked against the team's ticket fields as PATCH checks it and changes only the fields it names (null clears one); each ticket keeps its other values.

Code Examples

bash
curl -X POST "https://www.cstar.help/api/v1/teams/{teamId}/bulk" \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{"action":"update","resource":"tickets","ids":["tkt_1","tkt_2"],"data":{"status":"closed"}}'

Responses

200 Bulk result
json
{
  "success": true,
  "data": {
    "object": "bulk_result",
    "action": "update",
    "resource": "tickets",
    "total": 5,
    "succeeded": 5,
    "failed": 0,
    "errors": []
  }
}

409 Idempotency-Key in use: its first request is still running (Retry-After says when to send it again) or it was used on another endpoint
json
{
  "success": false,
  "error": {
    "type": "invalid_request_error",
    "code": "idempotency_key_in_use",
    "message": "A request with this Idempotency-Key is still being processed. Retry after it finishes.",
    "doc_url": "https://www.cstar.help/developers/errors#idempotency_key_in_use",
    "request_id": "req_abc123"
  },
  "meta": {
    "requestId": "req_abc123",
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

422 Idempotency-Key already used within 24 hours for a request with a different body
json
{
  "success": false,
  "error": {
    "type": "invalid_request_error",
    "code": "idempotency_key_reused",
    "message": "The Idempotency-Key was already used for a request with a different body. Generate a new key for this request.",
    "doc_url": "https://www.cstar.help/developers/errors#idempotency_key_reused",
    "request_id": "req_abc123"
  },
  "meta": {
    "requestId": "req_abc123",
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

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