Chat Widget

Get Chat Widget Script

get

Returns the JavaScript code needed to embed the chat widget on a website

Authorizations
apiKeystringRequired
Responses
chevron-right
200

JavaScript code for chat widget

application/javascript
Responsestring

JavaScript code

get
/scripts/chat-widget.js
200

JavaScript code for chat widget

Get Chat Widget Configuration

get

Returns the configuration for the chat widget

Authorizations
apiKeystringRequired
Query parameters
configIdstringRequired

ID of the chat widget configuration

Responses
chevron-right
200

Chat widget configuration

application/json
get
/chat-widget-config

Get Chat Widget

get

Returns the HTML for the chat widget with the specified configuration

Authorizations
apiKeystringRequired
Path parameters
configIdstringRequired

ID of the chat widget configuration

Responses
chevron-right
200

HTML content for the chat widget

text/html
Responsestring

HTML content

get
/chat-widget/{configId}

Get Chat Widget with From ID

get

Returns the HTML for the chat widget with the specified configuration and from ID

Authorizations
apiKeystringRequired
Path parameters
configIdstringRequired

ID of the chat widget configuration

fromIdstringRequired

ID of the source (for tracking purposes)

Responses
chevron-right
200

HTML content for the chat widget

text/html
Responsestring

HTML content

get
/chat-widget/{configId}/{fromId}

Handle Incoming Chat Widget Message

post

Processes an incoming message from the chat widget and publishes it to a PubSub topic

Authorizations
apiKeystringRequired
Query parameters
userIdstringRequired

ID of the user/owner to whom the chat widget belongs

Body
messageTypestringRequired

Type of message (e.g., text, reaction)

Default: text
Responses
chevron-right
200

Message processed successfully

application/json
post
/incoming-chat-widget-message

Get Chat Widget Messages

get

Retrieves messages for a specific chat widget conversation

Authorizations
apiKeystringRequired
Query parameters
fromIdstringRequired

ID of the user/owner of the contact

toIdstringRequired

ID of the chat widget that the contact is using

afterstring ยท int64Optional

Optional timestamp (in milliseconds) to fetch only messages after this time

Responses
chevron-right
200

List of messages with bot typing status

application/json
get
/chat-widget-messages

Mark Chat Widget Messages as Read

post

Updates the read status of all unread messages for a specific chat widget conversation

Authorizations
apiKeystringRequired
Body
fromIdstringRequired

ID of the user/owner of the contact

toIdstringRequired

ID of the chat widget that the contact is using

Responses
chevron-right
200

Messages marked as read successfully

application/json
post
/update-message-read-status

Last updated

Was this helpful?