Adds a domain to one of your Cloudflare accounts as a new zone and returns the Cloudflare name servers to set at your registrar.
curl -X POST "https://api.primaryapi.com/v1/run/cloudflare.create_zone" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"example.com","account":"01a7362d577a6c3019a474fd6f485823"}'{
"output": {
"found": true,
"data": {
"name": "example.com",
"paused": false,
"status": "pending",
"type": "full", …
}
},
"credits": 1
}Input and output
5 fields
example.com.01a7362d577a6c3019a474fd6f485823.14 fields
zone to the other Cloudflare APIsGood to know
Changes your account. This call creates, edits or deletes something in the connected account, live. Confirm before running it. With an Idempotency-Key it never runs twice, and monitors can’t schedule it.
Runs as your connected Cloudflare account. Needs the "Add and remove sites" permission.
It changes your Cloudflare account right away. Confirm the domain and the account with the person first.
Leave out `account` when the connection sees one account. With several, pass one from cloudflare.accounts.
A domain that is already a zone in the account answers invalid_input (Cloudflare error 1061). Find it with cloudflare.zones.
The new zone starts as pending. It becomes active once the domain’s name servers point at the ones returned in nameServers.
The same key and credits work for every API.