---
title: "Set the custom widget domain"
method: PUT
path: "/api/v1/chatbots/{id}/custom-domain"
---

# Set the custom widget domain

`PUT /api/v1/chatbots/{id}/custom-domain`

## Request

- Base URL: `https://smartwebchat.eu`
- URL: `https://smartwebchat.eu/api/v1/chatbots/{id}/custom-domain`
- Auth: HTTP bearer

Requires a white-label agreement (403 whitelabel_required). The domain may be set before its DNS record exists; it must not resolve to a private or internal address (400 target_not_allowed). Setting a domain resets verification and adds https://<domain> to the allowed origins. Use DELETE to remove it.

## Path parameters

- `id` string, required

## Request body

- object
  - `customDomain` string, required

## Response `200`

customDomain and customDomainVerified (false until verified)

## Other responses

- `400`: Invalid domain, or target_not_allowed
- `401`: Invalid or missing API key, or a read key
- `403`: whitelabel_required
- `404`: Chatbot not found (also for a chatbot of another account)
- `409`: custom_domain_taken
- `429`: Rate limit exceeded: 600 requests per minute per account across all /api/v1/ routes. Wait for the seconds given in Retry-After (60) and retry.

---

[API](https://skmtc.dev/smartwebchat/apis/smartwebchat-api.md) · [All operations](https://skmtc.dev/smartwebchat/apis/smartwebchat-api/llms.txt) · [OpenAPI document](https://skmtc.dev/smartwebchat/apis/smartwebchat-api/revisions/1b052502dacb?raw)
