Skip to content

Delete a chat message

Workforce module

DELETE/chat-messages/{id}chatMessages.delete

A chat message. Photos, files and voice notes are attachments on the message. Soft-deletes the chat message: it moves to Trash and can be restored for its table's retention period.

  • Requires the capability inbox.notifications.write.
  • OAuth scopes: inbox.
  • Error statuses: 401, 404, 422, 429. Errors are RFC 9457 problem details.

Path and query parameters

chatMessages.delete: Path and query parameters
FieldTypeRequiredDescription
idstring (uuid)YesIdentifier of the chat message.

Response 204: no body.

Code samples

curl -X DELETE "$XOS_BASE_URL/chat-messages/0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f" \
  -H "Authorization: Bearer $XOS_API_KEY"
const { data } = await xos.chatMessages.delete("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f");
response = xos.chat_messages.delete("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f")
xos chat-messages delete 0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f