hosting

POST /v1/bulk-site-imports

Add many sites — one per valid row of a file.

All hosting endpoints

All developer docs →

Zinn®, our Viking, hammering at his anvil beside an API endpoint sending events to several listeners.

Authentication

Send an API key as a bearer token. The key must carry the sites.create permission; a key without it is refused with 403, not 404.

Where your organisation id goes

This endpoint takes org_id as a field in the JSON body.

Your organisation id is on the API keys screen in your dashboard, beside the key itself. It is the same id in every call you make.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X POST https://api.zinndigital.com/v1/bulk-site-imports \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "csv": <string> }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

Re-checks the file exactly as the preview does and enrols every VALID row as an item of a site_create bulk job; invalid rows are left out (the preview named them). Each row is then created through the same path as POST /v1/sites, so the site-slot quota, plan allowances and hostname rules apply per row. Refused with a 422 before anything is written when no row is valid or the file cannot be read; rows past the plan's room are flagged by the check and not enrolled. One durable job with bounded concurrency and no row cap: the bound is the quota. Follow progress with GET /v1/bulk-jobs/{bulkJobId}. Requires sites.create.

Request body

NameTypeRequiredWhat it is
csvstringYesThe rows' text. Comma, semicolon or tab separated; the first line is the header when it names a domain column, otherwise every line is a row in the template's order.
defaultsBulkSiteImportDefaultsNo"Settings for all sites": any of these SiteCreate fields, applied to every row that leaves the matching column blank. A row naming its own site_type drops the batch's…
org_idUuid | nullNoThe account the sites belong to. Optional when you reach exactly one.
product_linestringNoThe product line every row is created on (the deploy form's line).
notestringNo—

Response

NameTypeRequiredWhat it is
idUuidYesUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidYesUUIDv7 identifier — sortable by creation time (docs/02 §8).
operationBulkOperationYesWhat a bulk job does to each of its sites. ⛔ One job model with an operation discriminator, not eight job models. A selection, a frozen work-list, a durable pass and a per-site…
paramsBulkJobParamsYesThe operation's arguments. Which keys are read depends on operation: plugin_install takes slugs + activate; plugin_activate, plugin_deactivate and plugin_remove take…
selectorBulkSelectorYesWhich sites a job targets. ⛔ There is no all. A job belongs to exactly one organization and all would span every tenant on the platform; the fleet-wide act is a staff…
selector_valuestringYes—
statusBulkJobStatusYes⛔ partial is a real outcome, not a rounding of the other two. A job where 4 of 900 sites failed is neither a success nor a failure, and reporting it as either is how a bulk…
requested_bystringYesWho asked for it.
notestringYes—
created_atstringYes—
updated_atstringYes—
settled_atobjectYesWhen the job finished; null while it is still running.
countsBulkJobCountsYes—
progressBulkJobProgressYesHow far along a job is, how fast it is going and how much longer it has. ⛔⛔ Every estimate here is nullable, and a null must never be rendered as 0. rate_per_minute: 0…

Errors this endpoint can return

401 · 403 · 409 · 422 · 429