---
title: "Create Custom Domain"
method: POST
path: "/v2/cloud-gateways/custom-domains"
tags: ["Custom Domains"]
---

# Create Custom Domain

`POST /v2/cloud-gateways/custom-domains`

Creates a new custom domain for a control-plane (restricted by permitted control-plane associate-custom-domain
action).

## Request body

- CreateCustomDomainRequest — Request schema for creating a custom domain in the global API.
  - `control_plane_id` string, uuid, required
  - `control_plane_geo` 'us' | 'eu' | 'au', required — Set of control-plane geos supported for deploying cloud-gateways configurations.
  - `domain` string, required — Domain name of the custom domain.

## Response `201`

Response format for creating a custom domain for a control-plane in the global API.

- CustomDomain — Object containing information about a custom domain for a control-plane.
  - `id` string, uuid, required
  - `control_plane_id` string, uuid, required
  - `control_plane_geo` 'us' | 'eu' | 'au', required — Set of control-plane geos supported for deploying cloud-gateways configurations.
  - `domain` string, required — Domain name of the custom domain.
  - `certificate_id` string, uuid, nullable — Certificate ID for the certificate representing this domain and stored on data-planes for this control-plane. Can be retrieved via the control-planes API for this custom domain's control-plane.
  - `sni_id` string, uuid, nullable — Server Name Indication ID for this domain and stored on data-planes for this control-plane. Can be retrieved via the control-planes API for this custom domain's control-plane.
  - `state` 'created' | 'initializing' | 'ready' | 'terminating' | 'terminated' | 'error', required — State of the custom domain.
  - `state_metadata` object, required — Metadata describing the backing state of the custom domain and why it may be in an erroneous state.
    - `reported_status` string — Reported status of the custom domain from backing infrastructure.
    - `reason` string — Reason why the custom domain may be in an erroneous state, reported from backing infrastructure.
  - `entity_version` integer, required — Monotonically-increasing version count of the custom domain, to indicate the order of updates to the custom domain.
  - `created_at` string, date-time, required — An RFC-3339 timestamp representation of custom domain creation date.
  - `updated_at` string, date-time, required — An RFC-3339 timestamp representation of custom domain update date.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `409` — Conflict

## Changes

- **2024-11-11** `08ead66e9ebb` — 1 breaking, 2 warning, 1 info
  - added `#/components/schemas/InvalidParameterMaximumLength` to the `allOf[subschema #2]/invalid_parameters/items/` response property `oneOf` list for the response status `400`
  - added the new `min` enum value to the `allOf[subschema #2]/invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterMinimumLength]/rule` response property for the response status `400`
  - added the new `min_items` enum value to the `allOf[subschema #2]/invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterMinimumLength]/rule` response property for the response status `400`
  - removed the `max_length` enum value from the `allOf[subschema #2]/invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule` response property for the response status `400`

[Change history](https://skmtc.dev/kong/apis/konnect-api/changes/v2/cloud-gateways/custom-domains/post.md)

---

[API](https://skmtc.dev/kong/apis/konnect-api.md) · [All operations](https://skmtc.dev/kong/apis/konnect-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kong/konnect-api/revisions/19bbc8a36404/schema)
