---
title: "Add a custom domain to the application."
method: POST
path: "/api/applications/{id}/protected-app-metadata/custom-domains"
tags: ["Applications"]
---

# Add a custom domain to the application.

`POST /api/applications/{id}/protected-app-metadata/custom-domains`

Add a custom domain to the application. You'll need to setup DNS record later.

## Path parameters

- `id` string, required

## Request body

- object
  - `domain` string, required — The domain to be added to the application.

## Response `201`

The domain has been added to the application.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `409` — The domain already exists.
- `422` — Exeeded the maximum number of domains allowed or the domain is invalid.
- `501` — Not Implemented

---

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