Public API
Chat
3 endpoints.
GET
/api/v1/public/chat/configWebchat config for the calling site (gates the widget)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-API-Key | header | string | null |
Responses
200Successful Responseapplication/jsonSuccessResponse_dict_str__Any__| Field | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request_idrequired | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
success | true | default true | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
datarequired | object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
metadata | ResponseMetadata | null | ResponseMetadata fields
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
meta | ResponseMeta | null | ResponseMeta fields
|
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
GET
/api/v1/public/chat/messagesFetch webchat history (long-poll for new messages)
Return messages with ``id > since`` (whole thread when ``since`` omitted). Holds up to ``wait`` seconds (capped) until new messages arrive — the AI reply lands async, so the held request returns as soon as it's persisted.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
session_idrequired | query | string | |
since | query | string | null | |
wait | query | integer | default 0 |
X-API-Key | header | string | null |
Responses
200Successful Responseapplication/jsonSuccessResponse_dict_str__Any__| Field | Type | Description |
|---|---|---|
request_idrequired | string | |
success | true | default true |
datarequired | object | |
metadata | ResponseMetadata | null | ResponseMetadata fieldsResponseMetadata, expanded above. |
meta | ResponseMeta | null | ResponseMeta fieldsResponseMeta, expanded above. |
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
POST
/api/v1/public/chat/messagesSend a webchat message (anonymous visitor)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-API-Key | header | string | null |
Request bodyrequired
application/jsonChatMessageBody| Field | Type | Description |
|---|---|---|
session_idrequired | string | |
bodyrequired | string | |
display_name | string | null | |
email | string | null | |
phone | string | null | |
first_name | string | null | |
last_name | string | null | |
fbp | string | null | |
fbc | string | null | |
page_url | string | null |
Responses
200Successful Responseapplication/jsonSuccessResponse_dict_str__Any__| Field | Type | Description |
|---|---|---|
request_idrequired | string | |
success | true | default true |
datarequired | object | |
metadata | ResponseMetadata | null | ResponseMetadata fieldsResponseMetadata, expanded above. |
meta | ResponseMeta | null | ResponseMeta fieldsResponseMeta, expanded above. |
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.