Bulk Operations
Bulk operations let you apply changes to many records at once — update tags, delete records, or other batch operations.
The Bulk Job Object
Section titled “The Bulk Job Object”| Field | Type | Description |
|---|---|---|
id | uuid | Unique identifier |
account_id | uuid | Account |
created_by | uuid | User who created the job |
entity_type | string | Type of records being operated on |
operation | string | Operation being performed |
entity_ids | uuid[] | IDs of records to operate on |
params | object | Operation-specific parameters |
status | string | Job status |
total_count | integer | Total records to process |
processed_count | integer | Records processed so far |
failed_count | integer | Records that failed |
error_message | string | Error details if job failed |
created_at | datetime | Creation timestamp |
updated_at | datetime | Last update timestamp |
Create Bulk Job
Section titled “Create Bulk Job”Endpoint: bulk-jobs-create
| Field | Type | Required | Description |
|---|---|---|---|
entity_type | string | Yes | Record type (e.g., contacts, companies) |
operation | string | Yes | Operation to perform |
entity_ids | uuid[] | Yes | Record IDs to operate on |
params | object | No | Operation-specific parameters |
curl -X POST https://api.driftwoodapp.com/api/bulk-jobs-create \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "entity_type": "contacts", "operation": "delete", "entity_ids": [ "550e8400-e29b-41d4-a716-446655440000", "550e8400-e29b-41d4-a716-446655440001", "550e8400-e29b-41d4-a716-446655440002" ] }'Get Bulk Job Status
Section titled “Get Bulk Job Status”Endpoint: bulk-jobs-get
| Field | Type | Required | Description |
|---|---|---|---|
id | uuid | Yes | Bulk job ID |
Response:
{ "ok": true, "result": { "id": "aa0e8400-...", "entity_type": "contacts", "operation": "delete", "status": "completed", "total_count": 3, "processed_count": 3, "failed_count": 0, "created_at": "2025-06-15T14:30:00Z", "updated_at": "2025-06-15T14:30:02Z" }}Job Statuses
Section titled “Job Statuses”| Status | Description |
|---|---|
pending | Job created, not yet started |
processing | Job in progress |
completed | All records processed |
failed | Job failed |