# Publish

This endpoint will publish the specified chatbot on the currently active channels. Any active and correctly configured channel will go online and any disabled channel will be set offline.

Calling publish on a bot with all channels disabled will effectively put it completely offline.

{% hint style="warning" %}
Publish calls are throttled at 1 call per bot per hour. Trying to publish a bot before the expired hour 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' \
--header 'Authorization: Bearer <BOT_AUTH_TOKEN>' \
--header 'Content-Type: application/json'
```

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

### Response

After execution, the request will return a detailed list of all online channels as well as any channel specific error encountered during publish.

```json
{
    "Errors":[
        ...
    ],
    "Online":[
        ...
    ]
}
```

### Response Codes

This endpoint will reply with the following standard HTTP codes.

| Code | Meaning                                                                                 |
| ---- | --------------------------------------------------------------------------------------- |
| 200  | Ok. The request has been successfully fulfilled.                                        |
| 400  | Bad Request. The call has been executed within less than 1 hour since the last attempt. |


---

# 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/publish.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.
