Skip to main content

Create Bot


Advanced API is available in the Business Plan

Create a new bot for chat rooms. This endpoint allows for customization of bot behaviors, including triggers and message visibility.



POST /consumer/api/v2/bot


HeaderDescriptionData Type
authAPI Key for authenticationString

Body Parameters

ParameterDescriptionData TypeRequiredConstraints
nameThe name of the botStringYes
descriptionBrief description of the bot's functionalityStringNoMax 1000 characters
triggerEvent that will trigger the bot (message or mention)StringNoOne of message, mention
messageVisibilityVisibility of bot's messages (public or private)StringNoOne of public, private
isAllowedInAllChatRoomsWhether the bot is allowed in all chat roomsBooleanNo
messageHistoryLimitLimit to the number of historical messages accessible by the botNumberNo
webhookURLThe URL for the bot's webhookStringYesMust be a valid URI
metadataAdditional metadata in JSON formatStringNoMax 10000 characters
enabledWhether the bot is enabled or disabledBooleanNo


Success Response

A JSON object containing the following field:

FieldDescriptionData Type
_idThe unique ID of the created botString

HTTP Status: 200 OK


"success": true,
"bot": { /* Updated bot object */ }

Error Responses

  • Validation Error:

    HTTP Status: 400 Bad Request


    "success": false,
    "message": "invalid request",
    "error": "Detailed error description"
  • Trigger and Visibility Conflict:

    HTTP Status: 400 Bad Request


    "success": false,
    "message": "Error: Bots cannot be configured to trigger on every message when message visibility is set to private. Either change the bot trigger to \"mention\" or set the message visibility to \"public\"."

Code Examples


curl -X POST "<YOUR_API_KEY>" -H "Content-Type: application/json" -d '{"name": "MyBot", "description": "This is my bot"}'

JavaScript (Fetch API)

fetch("<YOUR_API_KEY>", {
method: "POST",
headers: {
"Content-Type": "application/json"
body: JSON.stringify({
name: "MyBot",
description: "This is my bot"