Update a conversation

You are reading the previous version (V1) of this endpoint. Go to V2
PATCH /v1/conversations/{id}

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" }'

Path parameters

ParameterTypeDescriptionRequired
idstringUnique identifier of the conversation: the id field the listings return. See How IDs work✓

Request body

You must send at least one of these fields:

FieldTypeRequiredDescription
ownersarray—List of the responsible users' emails
statusstring—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 expired conversation 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 PATCH to status: "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"
    ]
  }
}
FieldTypeDescription
data.idsstring[]IDs of the conversations that were updated

Errors

Statusdetails.codeWhen it happens
400INVALID_REQUESTNo field to update (details.issues points at status), an email in owners is not valid, or status is not an allowed value
400INVALID_REQUESTYour 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
401UNAUTHENTICATEDThe credential is missing or invalid
403FORBIDDENThe credential does not have permission for conversations, or the user's role cannot write that conversation
403INSUFFICIENT_SCOPEAn OAuth token without the platica:write scope tried to write. details.requiredScope says which one is missing
404CONVERSATION_NOT_FOUNDNo conversation has that id in the workspace, or it is outside the reach of the user's role
404WORKSPACE_NOT_FOUNDThe credential does not carry any workspace
409CONVERSATION_BUSYThe internal chat is busy processing a message and you tried to expire it. Try again in a moment
409INVALID_STATUS_TRANSITIONThe status transition is not allowed, for example changing a conversation that is expired on an external channel

The general error format is in Errors.