Skip to content

Create Chat Bot

POST
/webchat/chat-bots

Create a chat bot.

agent_id seeds the bot with an answering agent. Omitted, the bot is created with none and answers nothing until an agent is mapped with POST /webchat/agents.

Authorizations

Parameters

Header Parameters

Idempotency-Key
Any of:
string
>= 16 characters <= 128 characters

Retry-safety key for this create. Replaying the same key returns the FIRST result instead of creating a second row. Durability depends on the tenant’s migration state, so treat it as best-effort.

X-Target-Org-Id
Any of:
string

Request Body required

A new chat bot.

An org can run several. chat_bot_id is REQUIRED on almost every other call on this surface because the same org’s agents, buttons, questions, blogs and theme are all per-bot - so create one of these first, or read the org’s existing bots from GET /webchat/chat-bots.

object
agent_id
Any of:
string
<= 255 characters
agent_name
Any of:
string
<= 255 characters
name
required
string
>= 1 characters <= 120 characters

Responses

201

Successful Response

object
data
required

An open envelope for one webchat object.

Open because the widget’s config grows a field per product decision and a pinned schema would DROP it. Same choice the desk surface made.

object
key
additional properties
any
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
notes
Any of:
Array<string>
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer
total_available
Any of:
integer
total_is_lower_bound
Any of:
boolean

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string