Set delivery mode
const url = 'https://qinto-api.blotout.io/teams/7b8d1a52-6c1e-4b6f-9a30-2f8a54d1c3e9/domains/3f2a9c81-5d47-4e0b-8c66-91b2a7f04d15/delivery';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"mode":"domain"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://qinto-api.blotout.io/teams/7b8d1a52-6c1e-4b6f-9a30-2f8a54d1c3e9/domains/3f2a9c81-5d47-4e0b-8c66-91b2a7f04d15/delivery \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "mode": "domain" }'Chooses whether a site is served from its own domain or from its Qinto URL. Use the Qinto URL to get started when the customer cannot edit DNS yet, and switch to their domain once the records are published.
How it works
Asking for the mode a site already has succeeds and changes nothing, so this is safe to repeat — and if an earlier change never took effect, repeating it tries again. live reports whether the site already serves the mode; false means it is still being applied and will retry on its own. The Qinto URL is only available before a site’s first deploy: once deployed, a site cannot be moved back to it. Switching an already-deployed site to its own domain requires verified DNS, so it cannot be taken offline by the change.
Required permissions
domain:writeon all domains, or on the addressed domain when its id is in the route
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Unique id (UUID) of the team that owns the addressed resources, as shown in the team settings on the Blotout platform.
Example
7b8d1a52-6c1e-4b6f-9a30-2f8a54d1c3e9Unique id (UUID) of the team that owns the addressed resources, as shown in the team settings on the Blotout platform.
Unique id (UUID) of the site, as returned by the create and list operations.
Example
3f2a9c81-5d47-4e0b-8c66-91b2a7f04d15Unique id (UUID) of the site, as returned by the create and list operations.
Request Bodyrequired
Section titled “Request Bodyrequired”Where the site should be served from.
Where the site should be served from.
object
Serve the site from its own domain, or from its Qinto development_url while DNS is not set up.
Example
domainResponses
Section titled “Responses”The delivery mode now stored for the site, and whether the edge already serves it.
object
The delivery mode now stored for the site.
Whether the deployed worker already serves that mode. On a deployed site, false means it is still being applied and retries on its own; on a site that has never deployed, it stays false until you call deploy.
Example
{ "mode": "domain", "live": true}invalid_params — A path parameter failed validation (for example a malformed UUID); details pinpoints the offending parameter. invalid_body — The JSON body is unparseable or failed schema validation; details pinpoints the offending fields when the body could be parsed. invalid_site — The site details were rejected before anything was created — a malformed root domain, a reserved or malformed subdomain, an unknown jurisdiction or location, or a name that is too long. message states which.
object
Machine-readable error slug; switch on this value rather than on the HTTP status alone.
Human-readable reason for this specific failure, intended for display — do not parse it programmatically.
Field-level validation errors: a tree keyed by input property, each node carrying an errors array of human-readable messages. Render it to help the caller correct the request.
object
Example
{ "error": "invalid_params", "message": "The Cloudflare API token is invalid or expired.", "details": { "errors": [], "properties": { "teamId": { "errors": [ "Invalid UUID" ] } } }}unauthenticated — The Authorization: Bearer token is missing, malformed, or no longer valid. Generate a team API token or obtain a new OAuth access token.
object
Machine-readable error slug; switch on this value rather than on the HTTP status alone.
Example
{ "error": "unauthenticated"}forbidden — The bearer credential lacks the required permission or belongs to another team, or its user lacks the organization role a developer operation needs. Update its policies, use a credential bound to the addressed team, or ask an organization owner for the role; message states the reason when one is known.
object
Machine-readable error slug; switch on this value rather than on the HTTP status alone.
Human-readable reason for this specific failure, intended for display — do not parse it programmatically.
Example
{ "error": "forbidden", "message": "The Cloudflare API token is invalid or expired."}not_found — The addressed resource does not exist within this team; check the id and retry.
object
Machine-readable error slug; switch on this value rather than on the HTTP status alone.
Example
{ "error": "not_found"}already_verified — The site’s DNS is verified, so it is served on its own domain and cannot be moved back to its Qinto URL. unsupported_transition — The requested delivery change is not supported for a site in this state. message states why; a deployed site cannot be moved back to its Qinto URL. dns_not_verified — The site’s DNS is not verified yet, so switching it to its own domain would take it offline. Publish the records, then retry. dns_state_unknown — The site’s DNS state could not be determined, so the delivery change was not applied. message states what failed; nothing was changed.
object
Machine-readable error slug; switch on this value rather than on the HTTP status alone.
Human-readable reason for this specific failure, intended for display — do not parse it programmatically.
Example
{ "error": "already_verified", "message": "The Cloudflare API token is invalid or expired."}host_not_ready — The site’s host is not ready to serve it — no Cloudflare zone chosen, no stored API token, a token scoped to the wrong zone, a conflicting DNS record, or a dispatcher that refused the request. message names the fix.
object
Machine-readable error slug; switch on this value rather than on the HTTP status alone.
Human-readable reason for this specific failure, intended for display — do not parse it programmatically.
Example
{ "error": "host_not_ready", "message": "The Cloudflare API token is invalid or expired."}rate_limited — Too many requests for this API token or site in a short window; wait a minute and retry.
object
Machine-readable error slug; switch on this value rather than on the HTTP status alone.
Example
{ "error": "rate_limited"}internal — Unexpected server error. Nothing is guaranteed to have been persisted; idempotent operations are safe to retry.
object
Machine-readable error slug; switch on this value rather than on the HTTP status alone.
Example
{ "error": "internal"}