Skip to content

Set delivery mode

PUT
/teams/{teamId}/domains/{domainId}/delivery
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:write on all domains, or on the addressed domain when its id is in the route
teamId
required

Unique id (UUID) of the team that owns the addressed resources, as shown in the team settings on the Blotout platform.

string format: uuid

Example

7b8d1a52-6c1e-4b6f-9a30-2f8a54d1c3e9

Unique id (UUID) of the team that owns the addressed resources, as shown in the team settings on the Blotout platform.

domainId
required

Unique id (UUID) of the site, as returned by the create and list operations.

string format: uuid

Example

3f2a9c81-5d47-4e0b-8c66-91b2a7f04d15

Unique id (UUID) of the site, as returned by the create and list operations.

Where the site should be served from.

Media typeapplication/json

Where the site should be served from.

object
mode
required

Serve the site from its own domain, or from its Qinto development_url while DNS is not set up.

string
Allowed values: domain development_url

Example

domain

The delivery mode now stored for the site, and whether the edge already serves it.

Media typeapplication/json
object
mode
required

The delivery mode now stored for the site.

string
Allowed values: domain development_url
live
required

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.

boolean

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.

Media typeapplication/json
object
error
required

Machine-readable error slug; switch on this value rather than on the HTTP status alone.

string
Allowed values: invalid_params invalid_body invalid_site
message

Human-readable reason for this specific failure, intended for display — do not parse it programmatically.

string
details

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
key
additional properties

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.

Media typeapplication/json
object
error
required

Machine-readable error slug; switch on this value rather than on the HTTP status alone.

string
Allowed values: unauthenticated

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.

Media typeapplication/json
object
error
required

Machine-readable error slug; switch on this value rather than on the HTTP status alone.

string
Allowed values: forbidden
message

Human-readable reason for this specific failure, intended for display — do not parse it programmatically.

string

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.

Media typeapplication/json
object
error
required

Machine-readable error slug; switch on this value rather than on the HTTP status alone.

string
Allowed values: not_found

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.

Media typeapplication/json
object
error
required

Machine-readable error slug; switch on this value rather than on the HTTP status alone.

string
Allowed values: already_verified unsupported_transition dns_not_verified dns_state_unknown
message

Human-readable reason for this specific failure, intended for display — do not parse it programmatically.

string

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.

Media typeapplication/json
object
error
required

Machine-readable error slug; switch on this value rather than on the HTTP status alone.

string
Allowed values: host_not_ready
message

Human-readable reason for this specific failure, intended for display — do not parse it programmatically.

string

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.

Media typeapplication/json
object
error
required

Machine-readable error slug; switch on this value rather than on the HTTP status alone.

string
Allowed values: rate_limited

Example

{
"error": "rate_limited"
}

internal — Unexpected server error. Nothing is guaranteed to have been persisted; idempotent operations are safe to retry.

Media typeapplication/json
object
error
required

Machine-readable error slug; switch on this value rather than on the HTTP status alone.

string
Allowed values: internal

Example

{
"error": "internal"
}