Bulk Operations
Create, update, or delete many records in a single request. Atomic by default — all succeed or nothing changes.
Base path: /api/v1/domains/{domain_id}/records/bulk*
Required permission: records:create, records:delete
Bulk create#
1 2 3 4 5 6 7 8 9 10 11 | |
1 2 3 4 5 6 7 8 9 10 11 12 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | |
Request#
| Field | Type | Required | Notes |
|---|---|---|---|
records |
array | Yes | Same shape as single-record create; up to 500 records per request |
continue_on_error |
boolean | No | Default false (atomic) |
Response#
1 2 3 4 5 6 7 8 9 10 | |
When continue_on_error: false (default), any error fails the whole batch and created is empty. When true, partial success is possible.
Bulk delete#
1 2 3 4 5 6 | |
Response:
1 2 3 4 5 6 | |
Atomicity#
When continue_on_error: false (default):
- Validation runs first against every record.
- If anything fails validation (invalid content, conflicts, permission), the request returns
4xxand nothing is written. - Otherwise, all records are committed in a single transaction.
When continue_on_error: true:
- Each record is processed independently.
- Successes are returned in
created, failures inerrors. - Partial success is possible — the request always returns
200.
Use atomic mode for configuration changes where partial application would leave the zone in an inconsistent state. Use continue_on_error: true for opportunistic imports where you want to see what got in.
Limits#
- Max records per request: 500. For larger imports, chunk into batches.
- Payload size: 10 MB default. Lower if behind a proxy with smaller limits.
- Rate limits: Bulk calls count as a single request against your API key's rate limit. The underlying record count isn't multiplied.
Patterns#
Split across multiple zones#
The bulk endpoint operates on a single zone. If you need to provision records across many zones, loop at the application layer:
1 2 3 4 5 6 7 | |
Full zone replacement via bulk-delete + bulk-create#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |
For a proper atomic replace, prefer import with mode: replace — see Import and Export.
Idempotent bulk creates#
Bulk create rejects duplicates that match (name, type, content). To make repeated calls safe:
- Pre-check with
GET /records?type=A&name=app1. - Or set
continue_on_error: trueand filter errors for "already exists" messages. - Or use import with
mode: skip_existingfor larger batches.
Errors#
| Status | Cause |
|---|---|
400 |
Empty records array, or per-record validation failed in atomic mode |
403 |
Caller lacks records:create / records:delete on this domain |
409 |
Conflict with existing record (atomic mode) |
413 |
Payload too large |
429 |
Rate limit exceeded |
The response body details which record failed when relevant.
What's next#
- Managing Records — single-record operations.
- Import and Export — whole-zone imports.
- Records reference — endpoint details.