Register a custom domain on a branch

Registers a customer-owned domain (for example dashboard.acme.com) on the
branch and points it at a target entity, chosen by entity_type +
entity_id. In v1 only entity_type: function is supported (an
unsupported type is rejected with 400), where entity_id is the function
slug and the function must already exist on the branch (else 404).

The response includes the cname_target the customer must point their
domain at with a CNAME record; the domain goes live only once that DNS
resolves and a certificate is issued on the first request. A domain already
registered to another resource is rejected with 409 and no detail about
the owner. Re-registering the same domain for the same entity is idempotent.

Note: This endpoint is currently in Beta.

Path Params
string
required
^[a-z0-9-]{1,60}$

The Neon project ID

string
required
^[a-z0-9-]{1,60}$

The Neon branch ID

Body Params
string
required
length between 3 and 254

The custom domain to register (for example dashboard.acme.com).
Case-insensitive; normalized to lowercase (a trailing root dot is
stripped, so the 254-char bound admits a fully-qualified name whose
normalized form is 253 chars). Neon-managed and internal hostnames are
rejected.

string
required
length between 1 and 32

The kind of branch entity to point the domain at. v1 supports only
function; any other value is rejected with invalid_entity_type.

string
required
length between 1 and 255

The target entity's identifier within the branch. For function this
is the function slug (which must already exist on the branch).

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json