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