Skip to content
Klozzo API
OpenAPI Postman

Reference

Bulk Operations

Asynchronous batch jobs that act on many contacts at once (tag, untag, delete, etc.). Differs from POST /api/contacts/bulk (synchronous delete-only) in two ways: this runs in the background on the bulk queue, and supports more actions with per-row failure tracking.

Start a bulk operation

Enqueues the job and returns 202 with the operation record. Poll GET /api/bulk-operations/{id} until status=completed or failed.

POST /api/bulk-operations

Body parameters

  • action string required

    Action to run (tag, untag, delete, etc. — see BulkOperation::ACTIONS).

    Example: tag

  • payload object required

    Action-specific payload. Must include ids.

    • ids integer[] required

      Target contact IDs (min 1).

      Example: [42,43,44]

    • tag_id integer

      Required for tag/untag.

      Example: 3

curl --request POST \
    "https://klozzo.com/api/bulk-operations" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"action\": \"tag\",
    \"payload\": {
        \"ids\": [
            42,
            43,
            44
        ],
        \"tag_id\": 3
    }
}"
{
    "id": 31,
    "action": "tag",
    "status": "pending",
    "total": 3,
    "processed": 0,
    "failed": 0,
    "progress": 0,
    "errors": null,
    "started_at": null,
    "finished_at": null,
    "created_at": "2026-06-05T13:42:00+00:00"
}
  • id integer

  • action string

  • status string

  • total integer

  • processed integer

  • failed integer

  • progress integer

  • errors string

  • started_at string

  • finished_at string

  • created_at string

Bulk operation status

Returns the current state of a bulk operation. progress is (processed / total) * 100 rounded. errors is populated per-row when individual rows fail (the job continues; only status=failed indicates a global failure).

GET /api/bulk-operations/{bulkOperation_id}

Path parameters

  • bulkOperation_id integer required

    Bulk operation ID.

    Example: 31

curl --request GET \
    --get "https://klozzo.com/api/bulk-operations/31" \
    --header "Authorization: Bearer {YOUR_API_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
{
    "id": 31,
    "action": "tag",
    "status": "processing",
    "total": 3,
    "processed": 2,
    "failed": 0,
    "progress": 66,
    "errors": null,
    "started_at": "2026-06-05T13:42:01+00:00",
    "finished_at": null,
    "created_at": "2026-06-05T13:42:00+00:00"
}
  • id integer

  • action string

  • status string

  • total integer

  • processed integer

  • failed integer

  • progress integer

  • errors string

  • started_at string

  • finished_at string

  • created_at string