---
title: "Replace the allowed origins"
method: PUT
path: "/api/v1/chatbots/{id}/origins"
---

# Replace the allowed origins

`PUT /api/v1/chatbots/{id}/origins`

## Request

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

Replaces the whole list (max twenty entries), as the dashboard does. Removing https://<custom domain> is allowed, as in the dashboard. During the trial a domain another account has connected is refused (409 domain_already_connected).

## Path parameters

- `id` string, required

## Request body

- object
  - `allowedOrigins` string[], required

## Response `200`

allowedOrigins after the change

## Other responses

- `400`: Not an array, too many, invalid or too broad entries
- `401`: Invalid or missing API key, or a read key
- `404`: Chatbot not found (also for a chatbot of another account)
- `409`: domain_already_connected
- `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)
