Show Developer Menu

POST /conversations/{slug}/messages

Issuing a POST call to messages will allow you to create a new message under a specific conversation

Example Request
curl 'https://{brand}.reamaze.io/api/v1/conversations/{slug}/messages' \
  -u {login-email}:{api-token} \
  -H 'Accept: application/json' \
  -H 'Content-type: application/json' \
  -X POST -d '{"message": {"body": "foo", "visibility": 1}}'
Example Response
{
  "body": "This is the body of the new message you just posted!",
  "visibility": 0,
  "created_at":"2014-05-25T21:58:53.286-07:00",
  "origin_id": "XaEbMed",
  "user": {
    "name":"You",
    "email":"you@example.com"
  },
  "conversation": {
    "subject":"Conversations are awesome",
    "slug":"conversations-are-awesome",
    "created_at":"2014-02-25T21:58:53.204-07:00",
    "category": {
      "name":"Suggestions",
      "slug":"suggestions",
      "email":"suggestions@example.com",
      "channel":1
    }
  }
}
Notes
  • The visibility value can be the following values: 0 (Regular) or 1 (Internal Note).
  • The body attribute inside message can be formatted with markdown.
  • You may optionally pass in a user attribute hash with email and name inside message to specify the sender. By default, the message will be attributed to the user of the current authentication.
  • You may optionally pass in a origin_id attribute inside message to specify a unique identifier of the message. This will help prevent duplicates and identify the message that you are creating.
  • You can optionally pass in a suppress_notifications attribute with a value of true to prevent Reamaze from sending any email (or integration) notifications related to this message.
  • You can optionally pass in a suppress_autoresolve boolean attribute with a value of true to prevent Reamaze from marking the conversation as resolved when message[user] is a staff user.
  • You can optionally pass in a suppress_surveys attribute with a value of true to prevent Reamaze from sending a satisfaction survey. A date (YYYY-MM-DD ISO format) will suppress surveys before that date.
  • You can optionally pass in an attachment string attribute with a URL to attach a file to the message. The URL should specify a valid location where Reamaze can fetch the file.