Register a custom domain on a branch
Changed onRegisters 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.
Request
- Base URL: https://console.neon.tech/api/v2
- URL: https://console.neon.tech/api/v2/projects/{project_id}/branches/{branch_id}/custom-domains
- Auth: one of:
- HTTP bearer
- API key in cookie zenith
- API key in cookie keycloak_token
Request body
Example request
{
"entity_type": "function"
}Response
The registered custom domain
Changes
- ○
added the optional property
to the response with the status - ○
added the optional property
to the response with the status - ○
added the optional property
to the response with the status - ○
added the optional property
to the response with the status
- ○
- ○
endpoint added
- ○