---
title: "Create Custom Domain"
method: POST
path: "/custom_domains"
tags: ["custom_domains", "Custom Domains"]
---

# Create Custom Domain

`POST /custom_domains`

Create Custom Domain

## Response `201`

The CustomDomains object.

- CustomDomainEntity — CustomDomainEntity model
  - `id` integer — Custom Domain ID.
  - `domain` string — Customer-owned domain name.
  - `destination` 'site_alias' | 'public_hosting' | 's3_endpoint' | 'unassigned' — Where this custom domain routes. Can be `site_alias`, `public_hosting`, `s3_endpoint`, or `unassigned` (not routing traffic). Set to `unassigned` automatically when a bound `public_hosting` folder behavior is deleted, and can be set manually via the API for any reason.
  - `dns_status` 'disabled' | 'correct' | 'no_records' | 'cname_wrong' | 'a_record' | 'caa_conflict' — Current DNS verification status.
  - `ssl_certificate_id` integer — Current SSL certificate ID.
  - `brick_managed` boolean — Is this domain's SSL certificate automatically managed and renewed by Files.com?
  - `folder_behavior_id` integer — Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior. Preserved as historical context when `destination` becomes `unassigned`.
  - `created_at` string, date-time — When this Custom Domain was created.
  - `updated_at` string, date-time — When this Custom Domain was last updated.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `405` — Method Not Allowed
- `409` — Conflict
- `412` — Precondition Failed
- `422` — Unprocessable Entity
- `423` — Locked
- `429` — Too Many Requests

---

[API](https://skmtc.net/files/apis/files-com-api.md) · [All operations](https://skmtc.net/files/apis/files-com-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/files/files-com-api/versions/c80c746637fd/schema)
