# 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. ## Servers - Logto endpoint address.: https://[tenant_id].logto.app (Logto endpoint address.) ## Authentication methods - O auth2 ## Parameters #### Path parameters - **id** (string) The unique identifier of the application. ## Body parameters Content-type: application/json - **domain** (string) The domain to be added to the application. ## Responses ### 201: The domain has been added to the application. ### 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 [Powered by Bump.sh](https://bump.sh)