Update a conversation
Change the owners, status or both for one conversation, identified by its unique id.
Example
curl -X PATCH https://api.platic.ai/v1/conversations/$CONVERSATION_ID \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "status": "finished" }' The SDK calls V2. With it, status and assignees have their own actions: Finish, Archive, Reopen, Mark as spam and Assignees.
Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
id | string | Unique identifier of the conversation: the id field the listings return. See How IDs work | ✓ |
Lookup by phone number or conversationId still works for compatibility, but is deprecated. Use the unique id to update the correct thread.
Request body
You must send at least one of these fields:
| Field | Type | Required | Description |
|---|---|---|---|
owners | array | — | List of the responsible users' emails |
status | string | — | New conversation status |
{
"owners": [
"support@acme.com",
"sales@acme.com"
],
"status": "finished"
} Rules for owners
- Send them as email addresses.
- Each email must exist as a user of the workspace.
status transition rules
Allowed values: active, finished, spam, expired.
Expiration closes the conversation (isFinished). Its status becomes finished or expired, depending on whether the contact replied.
- External channels (WhatsApp, Instagram, Facebook): An
expiredconversation cannot be reopened. The contact's next message starts a new conversation. - Internal API chats: a closed or expired chat can be reopened, either with a
PATCHtostatus: "active"or automatically when it receives a new message through the Chat API.
If the agent has memory turned on, expired closes the conversation for memory and Platica summarizes it. finished only changes the status: the conversation is saved to memory when it expires from inactivity, 24 hours after its last message.
Response
The response contains the updated conversation.
{
"status": "success",
"message": "Conversation updated successfully",
"data": {
"ids": [
"conv_001"
]
}
} | Field | Type | Description |
|---|---|---|
data.ids | string[] | IDs of the conversations that were updated |
Errors
| Status | details.code | When it happens |
|---|---|---|
400 | INVALID_REQUEST | No field to update (details.issues points at status), an email in owners is not valid, or status is not an allowed value |
400 | INVALID_REQUEST | Your credential covers several workspaces and you did not send ?workspace=, or you sent one it does not cover. details.available lists the ones you can use and details.requested repeats the one you sent |
401 | UNAUTHENTICATED | The credential is missing or invalid |
403 | FORBIDDEN | The credential does not have permission for conversations, or the user's role cannot write that conversation |
403 | INSUFFICIENT_SCOPE | An OAuth token without the platica:write scope tried to write. details.requiredScope says which one is missing |
404 | CONVERSATION_NOT_FOUND | No conversation has that id in the workspace, or it is outside the reach of the user's role |
404 | WORKSPACE_NOT_FOUND | The credential does not carry any workspace |
409 | CONVERSATION_BUSY | The internal chat is busy processing a message and you tried to expire it. Try again in a moment |
409 | INVALID_STATUS_TRANSITION | The status transition is not allowed, for example changing a conversation that is expired on an external channel |
The general error format is in Errors.