Messages

A message is a single text or media item inside a conversation between your company and a client

A message is one item in a conversation — text, media, a reply, or a template send.

Messages can be incoming (from the client) or outgoing (from your company). Each one carries delivery status, timestamps from Pact.im and from the provider, optional attachments, and links back to the conversation and contact.

Use the Messages API to read history, reply in an existing chat, or delete messages where the provider allows it.

With the Messages API you can:

To start a new conversation, use Write a first message.

Message object

Example

json
{
  "message": {
    "id": 1134326991,
    "external_id": "34577",
    "company_id": 86605,
    "conversation_id": 209752626,
    "contact_id": 1583160940,
    "replied_to_id": null,
    "created_at": "2025-02-05T09:01:48.514Z",
    "external_created_at": "2025-02-05T09:01:47.000Z",
    "income": true,
    "status": "created",
    "message": "",
    "reactions": [],
    "details": null,
    "attachments": [],
    "delivery": false,
    "deleted": false
  }
}

Description

ParameterTypeDescription
idIntegerID
external_idStringExternal message ID from provider (used for message replies)
company_idIntegerID of the company
conversation_idIntegerID of the conversation
contact_idIntegerID of the message contact
replied_to_idStringExternal ID of the message to which this message is a reply
created_atTimeTime we created this message in our db
external_created_atTimeTime from provider (as a rule, the time of direct sending of the message)
incomeBooleanWhether message is income or outgoing
statusStringStatus of the message (created, sent, delivered, read, or error)
messageStringMessage body
reactionsArrayMessage reactions
detailsObjectData containing reason why message was not delivered (if it is)
attachmentsArrayArray of message attachment objects (if it has)
deliveryBooleanWhether this message was sent using the bulk mail feature
deletedBooleanWhether this message has been deleted

Search…

Start typing to search