Skip to content

Set the draft reply for a chat

PUT
/openapi/chat/draft/{chatId}
curl --request PUT \
--url https://open-api.replyco.com/openapi/chat/draft/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '{ "messageText": "Yes, until it ships. Which address should we use?" }'

Saves a draft reply on the live chat. Agents see it pre-filled in the message box the next time they open the chat, and agents who already have the chat open see it straight away. The draft is not sent to the customer.

Notes:

  • MessageText is plain text
  • A chat has one draft shared by all agents, so this replaces any existing draft
  • Send null or an empty MessageText to clear the draft
  • The draft is cleared when a message is sent, and expires after 24 hours

Sample request:

PUT /chat/draft/3fa85f64-5717-4562-b3fc-2c963f66afa6
{
   "messageText": "Hi John, your order has been shipped."
}
chatId
required
string format: uuid

Chat ID to set the draft for

Request containing the draft text

object
messageText

The draft reply as plain text. Use null or an empty string to clear the draft.

string
nullable

Example

{
"messageText": "Yes, until it ships. Which address should we use?"
}

Draft was saved or cleared

Invalid request body

User is not authenticated or authorized

Chat with the specified ID was not found