---
title: "Add a custom domain"
method: POST
path: "/v1/apps/{app_id}/domains"
tags: ["Apps"]
---

# Add a custom domain

`POST /v1/apps/{app_id}/domains`

Attach a custom domain to an App.

Returns a `verification_token` and `cname_target`. To prove ownership,
add a DNS TXT record:

    _mixpeek-verify.{domain}  TXT  "mixpeek-site-verification={verification_token}"

Then call `POST /{app_id}/domains/{domain}/verify` to start polling.

## Path parameters

- `app_id` string, required — App ID (e.g. app_abc123def456)

## Request body

- AddDomainRequest
  - `domain` string, required — Customer domain (e.g. 'search.acme.com')
  - `is_primary` boolean — Set as primary domain

## Response `200`

The newly added domain configuration

- DomainResponse
  - `domain` string, required
  - `status` string, required
  - `verification_token` string, nullable
  - `cname_target` string, nullable
  - `is_primary` boolean, required
  - `verified_at` string, nullable

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Validation Error
- `500` — Internal Server Error

---

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