/api/public/chat/start
Public · no auth
Start a conversation
Open a new live-chat conversation for a visitor. The widget calls this once on first load; the returned UUID is used for all subsequent calls. Visitor metadata (IP, page URL, referrer) is recorded and the IP is optionally enriched with company data.
Rate limited.
Body parameters
|
container_id
string · identifier
optional
|
The chat widget's container ID (from the embed script). Required. |
|
visitor_id
string · identifier
optional
|
Persistent anonymous visitor identifier set by the widget. |
|
visitor_name
string
optional
|
Pre-known display name for the visitor. |
|
visitor_email
string · email
optional
|
Pre-known email address for the visitor. |
|
page_url
string · url
optional
|
Full URL of the page where the widget loaded. |
|
referrer_url
string · url
optional
|
HTTP referrer of the page where the widget loaded. |
|
metadata
string
optional
|
Arbitrary JSON object attached to the conversation record. |
Responses
curl -X POST https://landing.pivotal.digital/api/public/chat/start \
-H "Content-Type: application/json" \
-d '{
"container_id": "lp_abc123",
"visitor_name": "Jane Smith",
"visitor_email": "jane@acme.com",
"page_url": "https://example.com/pricing"
}'
{
"conversation_uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"visitor_id": "v_8a91c2",
"status": "bot",
"messages": [
{ "id": 1041, "sender_type": "bot", "message_type": "text", "body": "Hi! How can we help?", "created_at": "2026-05-31T12:00:00+00:00" }
]
}
{ "error": "Container not found" }
{ "error": "Too many active conversations" }
/api/public/chat/{uuid}/message
Public · no auth
Send a visitor message
Send a visitor message to an active conversation. The response includes the persisted message record plus any immediate bot/auto-reply that was generated. Returns 429 once the 200-message per-conversation limit is hit.
Rate limited.
Path parameters
|
uuid
string
required
|
— |
Body parameters
auto-derived Type, required, and constraints are read from this endpoint's validation rules at build time — they can't drift from the contract the API actually enforces.|
message
string
required
|
The visitor's message text. Required. max: 2000 |
|
client_id
string
optional
|
Optional idempotency key set by the widget (UUID format). max: 36 |
|
option_id
string
optional
|
— max: 64 |
Responses
curl -X POST https://landing.pivotal.digital/api/public/chat/a1b2c3d4-e5f6-7890-abcd-ef1234567890/message \
-H "Content-Type: application/json" \
-d '{ "message": "Hello, I have a question.", "client_id": "uuid-here" }'
{
"message_id": 1042,
"bot_responses": [
{ "id": 1043, "sender_type": "bot", "message_type": "text", "body": "Thanks! What's your email?", "created_at": "2026-05-31T12:01:00+00:00" }
]
}
{ "error": "Conversation not found" }
{ "error": "Conversation message limit reached" }
/api/public/chat/{uuid}/poll
Public · no auth
Poll for new messages
Retrieve new messages for a conversation since a given timestamp. Returns 204 (with an empty JSON body) when there are no new messages, or 200 with the message list when updates exist. The widget uses this for short-polling.
Rate limited.
Path parameters
|
uuid
string
required
|
— |
Query parameters
|
since
string
optional
|
ISO 8601 timestamp; only messages created after this point are returned. |
Responses
curl "https://landing.pivotal.digital/api/public/chat/a1b2c3d4-e5f6-7890-abcd-ef1234567890/poll?since=2026-05-30T12%3A01%3A00Z"
{
"has_updates": true,
"status": "active",
"messages": [
{ "id": 1043, "sender_type": "agent", "message_type": "text", "body": "Hi there!", "created_at": "2026-05-31T12:02:00+00:00" }
]
}
{ "has_updates": false, "status": "active", "messages": [] }
{ "error": "Conversation not found" }
/api/public/chat/{uuid}/typing
Public · no auth
Send typing indicator
Signal that the visitor has started or stopped typing. The state is cached for 10 seconds and picked up by the agent's polling loop. Returns an empty 204 response; errors are suppressed to keep the widget silent if the conversation has ended.
Path parameters
|
uuid
string
required
|
— |
Body parameters
|
is_typing
boolean
optional
|
Boolean flag — true when the visitor is actively typing, false to clear. |
Responses
curl -X POST https://landing.pivotal.digital/api/public/chat/a1b2c3d4-e5f6-7890-abcd-ef1234567890/typing \
-H "Content-Type: application/json" \
-d '{ "is_typing": true }'
(empty body)
(empty body — returned when conversation is not active)
/api/public/chat/{uuid}/resume
Public · no auth
Resume a conversation
Resume a previously started conversation, for example after a page navigation or browser refresh. Returns the conversation state and its recent message history. Conversations closed for more than 24 hours cannot be resumed and return 410.
Path parameters
|
uuid
string
required
|
— |
Responses
curl "https://landing.pivotal.digital/api/public/chat/a1b2c3d4-e5f6-7890-abcd-ef1234567890/resume"
{
"conversation_uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"visitor_id": "v_8a91c2",
"status": "active",
"messages": [
{ "id": 1042, "sender_type": "visitor", "message_type": "text", "body": "Hello, I have a question.", "created_at": "2026-05-31T12:01:00+00:00" },
{ "id": 1043, "sender_type": "agent", "message_type": "text", "body": "Hi there!", "created_at": "2026-05-31T12:02:00+00:00" }
]
}
{ "error": "Conversation not found" }
{ "error": "Conversation expired" }
/api/public/chat/impression
Public · no auth
Record a widget impression
Increment the daily impression (load) counter for a chat widget. Called once each time the widget initialises on a page. Returns an empty 204 response; silently no-ops if the container ID is not found or inactive.
Rate limited.
Body parameters
auto-derived Type, required, and constraints are read from this endpoint's validation rules at build time — they can't drift from the contract the API actually enforces.|
container_id
string
required
|
The chat widget's container ID. Required. max: 20 |
|
preview
boolean
optional
|
— |
Responses
curl -X POST https://landing.pivotal.digital/api/public/chat/impression \
-H "Content-Type: application/json" \
-d '{ "container_id": "lp_abc123" }'
(empty body)
Landing Platform