v1
latestOpenAPI 3.1.12026-08-063445179.6 KBAttach domains to a revision
Bind domains to this revision. Bindings are scoped to this revision only — other revisions keep their existing routing.
Each hostname must fall under a domain your organization has already verified, following the same rule and {variable} template syntax as the domains field on POST /apps/{app}/deploy (see its production/preview documentation).
You can also (re-)attach this revision to the app's default managed domains post-deployment by listing the default-alias template — the same value POST /apps/{app}/deploy accepts (e.g. {deno.app.slug}.<org>.<managed-domain> under production, or the per-revision {deno.app.slug}-{deno.revision.id}.… under preview). Listing it sets the timeline label on the revision rather than pinning a custom hostname: the default production host floats to the latest revision attached this way, while each revision keeps its own default preview host.
Binding the same hostname to this revision again is a no-op. Use DELETE /revisions/{revision}/domains/{hostname} to remove a binding.
A hostname always resolves to exactly one revision. Binding is additive: attaching a hostname to a revision never detaches it from any revision it is already bound to. When a hostname is bound to several revisions, the most recently created revision wins.
Because the newest bound revision always wins, moving a hostname forward to a newer revision is just an attach: bind it to the newer revision and that revision immediately takes over routing — you do not detach the old one. Moving a hostname back to an older revision is different: re-attaching the older revision has no effect while a newer revision is still bound, so you must explicitly DELETE the binding on every newer revision. Detaching the currently-winning revision falls back to the next most recently created revision that is still bound; the hostname only stops routing once its last binding is removed.
Returns 204 No Content on success.
Path parameters
Revision ID (globally unique)
Request body
Response
OK