# Set Channel Settings

This endpoint will overwrite the current bot settings for a specific channel. The updated settings can be applied by using the [publish ](/xenioo-api/globa-platform-api/bots/publishing/publish.md)endpoint.

{% hint style="warning" %}
Settings calls are throttled at 1 call per bot per channel every 15 minutes. Trying to use this endpoint before the expired time will result in an error.
{% endhint %}

### Request

The following request will publish a chatbot on the currently active channels

```bash
curl --location --request PUT 'https://<SERVICE ENDPOINT>/bots/publish/channel/<providerid>/<enabled>' \
--header 'Authorization: Bearer <BOT_AUTH_TOKEN>' \
--header 'Content-Type: application/json'
--data-raw '{
    ...
}'
```

the \<providerid> value must be one of the available Xenioo channels in full signature value (e.g. Xenioo.Channels.Web) or simple common name (e.g. Web).

The \<enabled> parameter is a boolean value that will enable or disable the specified channel. If a channel is disabled it will be set to offline when the publish call is executed.

Please note that channel settings are considered as an external channel configuration and used as a raw string that only the final provider is supposed to parse as a complete model.

{% hint style="info" %}
Channel that require interactive authorization will still allow API level configuration but won't work as expected once published unless relevant tokens are supplied. These channels are:

1. Meta Messenger
2. Meta Instagram
3. Amazon Alexa
   {% endhint %}

{% hint style="warning" %}
This request requires a specific API Integration flag that might not be enabled by default on your account.
{% endhint %}

### Response

If successful, the request will return an empty 200 HTTP OK response.

### Response Codes

This endpoint will reply with the following standard HTTP codes.

| Code | Meaning                                              |
| ---- | ---------------------------------------------------- |
| 200  | Ok. The request has been successfully fulfilled.     |
| 404  | Not Found. The specified chatbot has not been found. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xenioo.com/xenioo-api/globa-platform-api/bots/publishing/set-channel-settings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
