Skip to main content
POST
Createorupdate

Authorizations

X-API-KEY
string
header
required

Your API key for authentication.

x-org-id
string
header
required

Org impersonation via x-org-id. Superadmins may impersonate any org; admins may impersonate their direct sub-organizations. Enter the target organization ID to act as that org.

Body

application/json
campaign_id
string
required
Required string length: 24
name
string
default:Chat Widget
version
enum<string>
default:v1

Version of the widget configuration schema

Available options:
v1,
v2
agent_id
string | null

Optional. Overrides the agent for this widget configuration. If not provided, an agent will be selected according to the campaign's agent distribution.

Required string length: 24
session_timeout_minutes
integer
default:30

Minutes of inactivity before the chat session expires and is automatically closed

Required range: 1 <= x <= 1440
inactivity_prompt_minutes
integer | null

Minutes of user inactivity before an inactivity prompt is sent. Set to null to disable the inactivity prompt timeout.

Required range: 1 <= x <= 1440
inactivity_close_minutes
integer
default:5

Minutes to wait after sending the inactivity prompt before the chat is automatically closed. The total timeout until closure is inactivity_prompt_minutes + inactivity_close_minutes. Only applicable when inactivity_prompt_minutes is set; ignored otherwise.

Required range: 1 <= x <= 1440
inactivity_prompt_text
string | null

The text to display in the inactivity prompt. Required when inactivity_prompt_minutes is set.

additional_config
Additional Config · object

Additional configuration options for the chat widget

Example:

Response

Successful Response

account_id
string
required
campaign_id
string
required
Required string length: 24
id
string | null
name
string
default:Chat Widget
version
enum<string>
default:v1

Version of the widget configuration schema

Available options:
v1,
v2
enabled
boolean
default:true
agent_id
string | null
Required string length: 24
session_timeout_minutes
integer
default:30
Required range: 1 <= x <= 1440
inactivity_prompt_minutes
integer | null
Required range: 1 <= x <= 1440
inactivity_prompt_text
string | null
inactivity_close_minutes
integer
default:5
Required range: 1 <= x <= 1440
additional_config
Additional Config · object