Show Developer Menu

POST /conversations

Issuing a POST call to conversations will allow you to create new conversations on behalf of a customer. This is ideal for integrations like custom support forms.

Example Request
curl 'https://{brand}.reamaze.io/api/v1/conversations' \
  -u {login-email}:{api-token} \
  -H 'Accept: application/json' \
  -H 'Content-type: application/json' \
  -X POST -d '{"conversation": {"subject": "foo", "category": "support", "tag_list": ["tag1", "tag2"], "message": {"body": "bar", "recipients" : ["[email protected]"]}, "user": {"name": "bob", "email": "[email protected]", "data": {"custom_attribute": "custom data"}}}}}}'
Response

A successful request will return the JSON for the newly created conversation.

A failed request will return an HTTP 422 Unprocessable Entity with the JSON body explaining the error.

Notes
  • The category attribute should be set to the slug of the Channel where this Conversation should be created. You can find your Channel ID values under Account IDs and Secret from within your account.
  • You can optionally pass in a tag_list array of strings to tag the conversation.
  • You can optionally pass in a status integer attribute to set the conversation status. Valid status values are enumerated in the Retrieving Conversations page.
  • You can optionally pass in a data hash attribute as part of the conversation to pass in custom field attributes for the conversation.
  • You can optionally pass in a message[recipients] array attribute as part of the conversation to pass in additional participants in the conversation. These participants will be automatically added as recipients in future correspondences within the thread.
  • You can optionally pass in a message[suppress_notification] boolean 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 message[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 message[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. For multiple attachments, you can use message[attachments], passing in an array of strings.
  • You can optionally pass in a conversation[user][data] hash attribute to set the customer's data attributes. They be set of key/value pairs to associate with the user, but can only be one level deep. It will display as Customer Data Attributes in Re:amaze. This will completely override any existing Customer Data Attributes on that user.