Show Developer Menu

GET /messages

Issuing a GET call to messages will allow you to retrieve individual messages for all conversations in the Brand.

Alternative: GET /conversations/{slug}/messages

Alternatively, you can issue a GET to messages within a specific conversation to get messages scoped to that conversation.

Example Request
curl 'https://{brand}.reamaze.io/api/v1/messages' \
  -u {login-email}:{api-token} \
  -H 'Accept: application/json'
Example Response
{
  "page_size":30,
  "page_count":1,
  "total_count":10,
  "messages":[
    {
      "body":"I'm sorry, Dave. I'm afraid I can't do that.",
      "visibility":0,
      "origin": 1,
      "created_at":"2014-02-25T21:58:53.286-07:00",
      "user": {
        "name": "HAL",
        "email": "[email protected]"
      },
      "recipients":[{
        "name": "Dave",
        "email": "[email protected]"
      }],
      "attachments":[{
        "file_file_name": "secret.png",
        "file_content_type":"image/png",
        "file_file_size":69892,
        "thumb_url": "https://example.com/secret_thumbnail.png",
        "url": "https://example.com/thumbnail.png",
        "image?": true
      }],
      "conversation": {
        "subject":"Do you read me?",
        "slug":"do-you-read-me",
        "created_at":"2014-02-25T21:58:53.204-07:00",
        "category": {
          "name":"Suggestions",
          "slug":"suggestions",
          "email":"[email protected]",
          "channel":1
        }
      }
    },
    ...
  ]
}
Optional Params
  • filter with staff will show only staff messages and customer will show only customer messages.
  • tag with string value (comma separated) will return messages belonging to conversations matching specific tags.
  • origin with number value will return messages from a specific origin (see below note on origin values).
  • page with any number will allow you to paginate through results. page_size and page_count are provided by the result.
  • sent_by with a value matching a known user email will return only messages sent by that user.
  • category with a string value will return messages from a specific Channel (internally called category) matching the slug value.
  • start_date and end_date (ISO8601 format) will allow filtering of messages by creation date.
  • include with the value original_body will return an additional original_body attribute that is the message's HTML, if present.
Notes
  • The visibility value can be the following values: 0 (Regular), 1 (Internal Note), or 2 (Collision Detected Message).
  • The origin value denotes where the message originated: Chat (0), Email (1), Twitter (2), Facebook (3), Classic Mode Chat (6), API (7), Instagram (8), SMS (9), Voice (10), Custom (11), WhatsApp (15), Staff Outbound (16), Contact Form (17), Instagram DM (19)
  • The recipients array is available for email messages and lists users (both staff and customers) who received an explicit email notification about this message. Note this is not necessarily the set of users who have access to the message.
  • The results are sorted by created_at in descending order.