Skip to main content
POST
Create a chat button

Authorizations

Authorization
string
header
required

A secret key (dk_live_…). Scopes: conversations:read, contacts:read, contacts:write, meetings:read, analytics:read, events:read, webhooks:write, knowledge:read, knowledge:write, agent:read, agent:write, experiments:read, experiments:write, privacy:write, chat:write.

Headers

Idempotency-Key
string

Retry safely: the first response is replayed for 24 hours (not for streamed answers).

Maximum string length: 255

Body

application/json
label
string
Required string length: 1 - 40
message
string
Maximum string length: 200
behavior
enum<string>
Available options:
send,
fill,
agent
style
enum<string>
Available options:
brand,
soft,
outline,
link
size
enum<string>
Available options:
sm,
md,
lg,
custom
corners
enum<string>
Available options:
match,
square,
pill,
custom
width
enum<string>
Available options:
auto,
full
colors
object
custom
object
nofollow
boolean

Response

OK

id
string
required
Pattern: ^btn_
Example:

"btn_k3j9x2m4p7"

object
string
required
Allowed value: "chat_button"
label
string
required
message
string
required
behavior
enum<string>
required
Available options:
send,
fill,
agent
style
enum<string>
required
Available options:
brand,
soft,
outline,
link
size
enum<string>
required
Available options:
sm,
md,
lg,
custom
corners
enum<string>
required
Available options:
match,
square,
pill,
custom
width
enum<string>
required
Available options:
auto,
full
colors
object
required
custom
object
required
nofollow
boolean
required
html
string
required

The paste-in HTML: a plain link that opens the chat already on the page.