Customer Conversations API
Build chat into your own site or app while Pingback runs Theo and routes replies from your team.
When to use it
Use this API when you want chat inside your own product instead of the floating widget. Each conversation is stored in Pingback, Theo replies as usual and your team sees it in Inbox.
Set up your widget
Create a website widget in Channels › Website and set its domain to the site that hosts your chat. Your server starts each visitor conversation with a Scale Developer API key and hands only that conversation's token to the signed-in customer. Browser requests must come from the widget's domain.
Start a conversation
POST https://api.pingback.live/api/v1/public/conversations
Authorization: Bearer pb_live_YOUR_SERVER_KEY
Content-Type: application/json
{
"widget_id": "wdg_your_public_widget_id",
"customer_name": "A customer",
"customer_email": "[email protected]"
}{
"conversation_id": "conv_api_example",
"session_token": "pbcs_ONE_TIME_VISITOR_TOKEN",
"expires_at": "2026-12-15T12:00:00+00:00",
"status": "open",
"owner": "theo"
}Send a message
POST https://api.pingback.live/api/v1/public/conversations/{conversation_id}/messages
Authorization: Bearer pbcs_VISITOR_TOKEN
Idempotency-Key: unique-message-id
Content-Type: application/json
{ "content": "Where is my order?" }Messages can be up to 10,000 characters. You get 202 Accepted once it's saved. Retry with the same Idempotency-Key; reusing a key with different content returns 409.
Read replies
GET https://api.pingback.live/api/v1/public/conversations/{conversation_id}?limit=50
Authorization: Bearer pbcs_VISITOR_TOKEN{
"conversation_id": "conv_api_example",
"status": "open",
"owner": "human",
"handoff_requested": true,
"assigned": true,
"messages": [
{
"id": "msg_example",
"sender_type": "theo",
"content": "I can help with that.",
"created_at": "2026-11-15T10:00:00+00:00",
"attachments": []
}
],
"next_after_id": "msg_example"
}Poll with ?after_id=<next_after_id> for newer messages. You'll get customer, Theo and agent messages, plus whether Theo or a person owns the conversation. Internal notes are left out. Retry-After suggests a two-second interval.
Live updates with SSE
GET https://api.pingback.live/api/v1/public/conversations/{conversation_id}/stream?after_id=msg_previous
Authorization: Bearer pbcs_VISITOR_TOKEN
Accept: text/event-streamThe stream sends state changes, messages and keepalives, then closes after about 50 seconds. Reconnect with the last message ID. In browsers, use fetch-based SSE, because EventSource can't send the Authorization header.
Send a file
POST https://api.pingback.live/api/v1/public/conversations/{conversation_id}/attachments
Authorization: Bearer pbcs_VISITOR_TOKEN
Idempotency-Key: unique-upload-id
Content-Type: multipart/form-data
file=<file>
content=Optional message textThe Idempotency-Key is required. Your plan's upload limit applies.
Let the customer resolve
POST https://api.pingback.live/api/v1/public/conversations/{conversation_id}/resolve
Authorization: Bearer pbcs_VISITOR_TOKENThis closes the conversation. After that, new customer messages are rejected.
Security
| Control | Behaviour |
|---|---|
| Workspace | Taken from the widget. Callers can't choose a workspace. |
| Visitor token | Random, stored hashed, for one conversation, expires after 30 days |
| Origins | Browser requests must match the widget's domain |
| Suspended workspaces | Writes are rejected |
Customer email is optional and unverified. Sign customers in on your side before attaching account data.