Update a chat satisfaction response
/v2.1/chat/satisfaction-responses/{id}org.permission.conversation.updateThe API key or user must hold at least one of them.
Submit or update a customer's CSAT response for chat using an API token.
The satisfaction response must already exist and belong to customerId.
Optional trackingId must match the response's chat session when supplied.
Accepted body shapes (in addition to required customerId):
- Rated: include
ratingand omitanswers. - Commented: include
answers(with or withoutrating). - Mark read: include
read: true(other fields optional).
Status precedence: a request with answers is marked commented; a request
with a rating and no answers is marked rated.
Use ?include=satisfaction to include the satisfaction form (with
rating-appropriate follow-up questions) in the response.
Distinct from CRM satisfaction routes under Core Resources.
Chat conversations
The server-side chat API lets your backend take part in Kustomer chat with a regular API key. It can open chat sessions for a customer, post messages as the customer, an agent or an assistant, show typing, import bot conversations and record satisfaction ratings.
A chat session is a Kustomer conversation on the chat channel, seen from the chat side. Its ID is the conversation ID, so the same conversation appears in the agent desktop and in the customer's chat widget or app, and you can read it with the conversations API too. Sessions are usually created by the chat SDKs when a customer starts a chat. These v2.1 endpoints do the same jobs from your server, for custom chat front ends, messaging bridges and bots that answer before a human does. Anything you post is delivered in realtime to the customer's open chat on every device.
A session stays active until the chat is ended or deleted. Listing with active=true returns only active sessions that have at least one message.
Identity: customerId and trackingId
These endpoints never use a chat key or a customer's chat login token. Every request names the customer in customerId, and Kustomer checks it against the session: a mismatch fails with 403. trackingId is the chat SDK's ID for a visitor's browser or device. It's optional, but when a session has one, any trackingId you send must match. Creating a session without one reuses the tracking ID from the customer's latest chat session, if there is one; handoff imports never set one.
Use a server-side API key with the roles each endpoint lists, never a chat key, which must hold only org.tracking.
Who a message is from
| Endpoint | Appears as |
|---|---|
POST /v2.1/chat/messages |
The customer (direction: in). Returns 202 Accepted; the message is processed asynchronously. |
POST /v2.1/chat/assistant/messages |
The customer, replying inside an assistant (bot) flow, so the assistant continues from where it is. |
POST /v2.1/chat/outbound/messages |
An agent: from is the Kustomer user ID. Add auto: true for bot or AI replies so they don't count as a human first response. |
POST /v2.1/chat/outbound/assistant/messages |
An assistant line, attributed to from. Send exactly one of body, meta.template or attachments. |
Message bodies are up to 10,240 characters. Typing indicators are ephemeral and never stored. Your service owns their lifecycle: sending a message doesn't hide one, so send typing: false when you're done, and resend typing: true about every three seconds for long answers.
Which endpoint to use
| To | Call |
|---|---|
| Open a chat for a customer, optionally starting an assistant | POST /v2.1/chat/sessions |
| Import a conversation your own bot already had | POST /v2.1/chat/handoff |
| List a customer's or visitor's chats | GET /v2.1/chat/sessions |
| Read a chat's messages | GET /v2.1/chat/sessions/{id}/messages |
| Post as the customer | POST /v2.1/chat/messages or, in an assistant flow, POST /v2.1/chat/assistant/messages |
| Post as an agent or bot | POST /v2.1/chat/outbound/messages |
| Post as an assistant | POST /v2.1/chat/outbound/assistant/messages |
| Show or hide typing | POST /v2.1/chat/outbound/typing |
| Record a CSAT rating or comment | PUT /v2.1/chat/satisfaction-responses/{id} |
A handoff takes 2 to 100 messages, including at least one inbound and one outbound, and sorts them by date; active: false creates the conversation already closed. When you pass assistant on session create, Kustomer posts the assistant's greeting, and if that fails the session is still created. Session lists are paginated, newest first by lastMessageAt, and don't include messages. The CSAT response must already exist, created by Kustomer for the chat's survey; this call fills it in, and sending answers marks it commented rather than rated.
Path parameters
Satisfaction response ID
Query parameters
Set to satisfaction to include the satisfaction form in the response.
satisfactionExample "satisfaction"Request body
application/jsonrequiredRequired. Customer who owns the satisfaction response.
Optional. Must match the chat session associated with the response.
Customer's CSAT rating.
If present, the only accepted value is true.
trueResponses
OK