OpenAPI 3.1.0raw.githubusercontent.com2026-08-1781289731.0 KB

68e1a2c609c0

domains

Delete domain

Delete a custom domain from your workspace.

Address the domain by its id or by its name. Names are unique per workspace, so api.acme.com is enough.

Unkey stops serving the domain. Later requests fail with a certificate error. The DNS records at your provider stay in place.

Required Permissions

Your root key must have one of the following permissions:

  • environment.*.delete_domain (to delete domains in any environment)
  • environment.<environment_id>.delete_domain (to delete domains in a specific environment)
post/v2/domains.deleteDomain

Request body

domainstring required

Identifies a domain by its Unkey ID or by its name. Pass a 'dom_'-prefixed ID, or a fully qualified domain name such as 'api.acme.com' without a scheme, port, or path. You can give an internationalized name in Unicode or Punycode form. Both forms address the same domain.

Domain names are unique per workspace, so the name alone addresses the domain. You do not need to supply a project, app, or environment.

Example request

{
  "domain": "api.acme.com"
}

Response

Successfully deleted the domain.

dataEmptyResponse required

Empty response object by design. A successful response indicates this operation was successfully executed.

Example response

{
  "meta": {
    "requestId": "req_123"
  }
}