---
title: "Create a new custom hostname for this environment"
method: POST
path: "/environments/{environmentId}/custom/hostnames"
tags: ["CustomHostnames"]
---

# Create a new custom hostname for this environment

`POST /environments/{environmentId}/custom/hostnames`

## Path parameters

- `environmentId` string, required

## Request body

- CustomHostnameCreateRequest
  - `hostname` string, required
  - `usage` 'cookies' | 'globalWallet', required

## Response `201`

Successfully created

- CustomHostname
  - `id` string, required
  - `hostname` string, required
  - `usage` 'cookies' | 'globalWallet', required
  - `status` 'active' | 'pending' | 'error', required
  - `verificationRecords` CustomHostnameVerificationRecord[], required
    - `dnsRecordType` 'TXT' | 'CNAME', required
    - `verificationType` 'certificate' | 'ownership' | 'alias', required
    - `name` string, required
    - `value` string, required
  - `errors` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `422` — Unprocessable Entity
- `500` — Internal Server Error

---

[API](https://skmtc.net/dynamic/apis/dashboard-api.md) · [All operations](https://skmtc.net/dynamic/apis/dashboard-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dynamic/dashboard-api/revisions/aac826315d90/schema)
