Skip to main content
All endpoints are under /v2/compute/domains and require a valid Telnyx API key in the Authorization header.

Create a custom domain

Response: 201 Created
Add a DNS TXT record at _telnyx-verification.api.acme.com with the verification_token value, then call the verify endpoint. Errors:

List custom domains

Supports query filters: Response: 200 OK

Get a single domain

Response: 200 OK with a single domain object.

Verify domain ownership

Checks the DNS TXT record at _telnyx-verification.<domain> against the stored token. On success: Deploys HTTP routing (Gateway + HTTPRoute + Ingress) to all clusters, marks domain as verified. On failure: Marks as verification_failed. On DNS error: Returns 503 Service Unavailable — retry later. Response: 200 OK with updated domain object.

Upload TLS certificate

Prerequisite: Domain must be verified. Validates:
  • Cert/key pair is valid PEM
  • Cert covers the domain (SAN or CN match)
  • Cert is currently valid (not expired, not yet valid)
On success: encrypts and stores the cert, deploys HTTPS routing via ECCP. Response: 200 OK with updated domain object (cert_status: "active"). Errors:

Delete a domain

Tears down routing resources (Gateway + HTTPRoute + Ingress + TLS Secret) from all clusters, then deletes the DB row. If the bound function was already deleted (function_id is null), the domain is still deletable — routing cleanup is attempted but may be a no-op. Response: 200 OK with the deleted domain object.

Status reference

Verification status

Cert status

Function deletion behavior

When a bound function is deleted, the domain’s function_id becomes null (ON DELETE SET NULL). The domain still exists but cannot route. To fix: delete the domain and create a new one with the correct function.