Skip to content

Set edge delivery for a custom domain

PATCH
/api/v1/domains/{id}/edge-delivery
curl --request PATCH \
--url https://api.deploybase.eu/api/v1/api/v1/domains/example/edge-delivery \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "mode": "example" }'

Chooses whether the domain is served only from EEA edge locations (“eea”) or worldwide (“global”). Only available for domains on a dedicated pull zone.

id
required
string

Domain ID

Edge delivery mode

Media type application/json
object
mode
required

Mode is “eea” (served only from edge locations in the European Economic Area) or “global” (served from the worldwide edge network).

string

Example generated

{
"mode": "example"
}

OK

Media type application/json
object
data
meta
object
request_id
string
timestamp
string
trace_id
string
data
object
bunny_dns_ns1
string
bunny_dns_ns2
string
bunny_dns_zone_id
integer
connection_mode
string
Allowed values: byo_dns managed_dns
created_at
string
debug_url

DebugURL links to an external Let’s Encrypt diagnostic (Let’s Debug) pre-filled for this hostname, so a developer can self-check CAA/DNS issues we don’t probe server-side. Present only while SSL is unresolved (failed/pending/provisioning).

string
deleted_at
string
dns_records
Array<object>
object
name

Record host

string
note

Human-readable guidance

string
type

CNAME | ALIAS | TXT

string
value

Record value/target

string
domain
string
edge_delivery

EdgeDelivery is the PoP set allowed to serve the dedicated pull zone (DEP-788). The gorm default tag matters: on Create GORM writes ‘eea’ for an empty value (and sets it on the struct), so a new domain never reaches the CHECK constraint as ‘’.

string
Allowed values: eea global
geo_countries
Array<string>
geo_mode

GeoMode + GeoCountries hold the CDN geo-filtering policy (BACK-210). GeoCountries is the set the customer chose (allow set or block set per GeoMode), NOT the inverted Bunny list; the block-list sent to Bunny is derived on the fly by ComputeBlockedCountries. Effective only when the domain is on a dedicated pull zone (UsesDedicatedPullZone()).

string
Allowed values: off allowlist blocklist
id
string
is_apex
boolean
last_verification_attempt
string
next_retry_at

NextRetryAt is when the worker will next automatically re-attempt a failed SSL provisioning, so the UI can show “still retrying, next attempt ~X” instead of a frozen failure. Computed from the last attempt + the worker’s backoff; omitted unless failed.

string
ns_delegated_at
string
project_id
string
pull_zone_id

PullZoneID is the dedicated Bunny pull zone for this custom domain in the 1:1 architecture (BACK-197/198), set at creation. NULL only when the CDN isn’t configured (dev/mock), in which case the domain has no CDN serving and falls back to the shared-PZ DNS instructions (see PointingTarget).

integer
router_origin_at

RouterOriginAt is set when the dedicated pull zone above has the Edge Script router as its origin (ADR-021 Phase 6, DEP-366) instead of a storage path pinned to one deployment. NULL means the legacy storage-path origin, which is what every domain has until the cutover re-points it.

string
ssl_attempts

NOTE: the explicit column tag is REQUIRED — GORM’s default namer mangles “SSLAttempts” to “s_slattempts” (it treats the embedded “SLA” as a known initialism), which doesn’t match the ssl_attempts column created in migration 000055. Without it every domains write fails with column "s_slattempts" does not exist. The other SSL* fields don’t collide, so only this one needs the override.

integer
ssl_error
string
ssl_error_code

Machine-readable failure reason (SSLErrorCode); drives reason-specific UI guidance

string
ssl_issued_at
string
ssl_last_attempt_at
string
ssl_provisioning_started_at
string
ssl_status
string
Allowed values: pending provisioning issued failed
status
string
Allowed values: pending_verification verified failed awaiting_delegation
supports_edge_delivery

SupportsEdgeDelivery reports whether the domain’s edge delivery (EEA-only or worldwide, DEP-788) can be changed. Like geo-filtering it needs the domain’s own pull zone.

boolean
supports_geo_filtering

SupportsGeoFiltering reports whether the domain is on a dedicated pull zone and can therefore accept a CDN geo-filtering policy (BACK-210). The UI uses this to enable/disable the geo controls and explain that a legacy (shared-PZ) domain isn’t eligible yet.

boolean
team_id
string
updated_at
string
verification_token
string
verified_at
string

Example

{
"data": {
"connection_mode": "byo_dns",
"edge_delivery": "eea",
"geo_mode": "off",
"ssl_status": "pending",
"status": "pending_verification"
}
}

Invalid body or mode

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Unauthorized

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Forbidden

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Not Found

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Domain not on a dedicated pull zone yet

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Saved but not applied to CDN

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Live 174db30c built