Skip to main content

Create Conversation Message

Create a new message for a given conversation.

HTTP Request​

POST https://dev.calry.app/api/v2/vrs/conversations

Headers​

HeaderValue
AuthorizationBearer YOUR_ACCESS_TOKEN
workspaceIdYOUR_WORKSPACE_ID
integrationAccountIdYOUR_INTEGRATION_ACCOUNT_ID

Example Request​

curl --location 'https://dev.calry.app/api/v2/vrs/conversations' \
--header 'Authorization: Bearer eyJraWQiOiJzLWMwMzE2MzExLTg3NDktNGNhMC05NDg0LTBlNWM1ZDVlMDExOSIsInR5cCI6IkpXVCIsImFsZyI6IlJTMjU2In0.eyJpc3MiOiJodHRwczovL2Rldi5jYWxyeS5hcHAvYXBpL2F1dGgiLCJ1c2VySWQiOiJlNThhMTRjZS01NWQ0LTQyMGQtYmVlZi05M2U1MjJlYjcyZjAiLCJ3b3Jrc3BhY2VJZCI6ImEwZjE5YmMyLTNlNjktNGVhOC04ODkzLTgwMzFiYTBiMGEwYSIsIm5hbWUiOiJ0ZXN0IGtleSIsInNvdXJjZSI6Im1pY3Jvc2VydmljZSIsImlhdCI6MTczNzY0MzA0OCwiZXhwIjozNzczNzY0MzA0OH0.QfRTCxAh6aAAsQJ2kicsGOCSj6fd2L_oFnxaggcKQhTGCFeKb0PdrZXvoidz7tiiXa9FLFgsj4Ar1sgNeUtmFBtc6ajtEj8s6vCgfZgA0qM0prFqvVbBMJ6Mv7Lt38dkRixmHDmC-E4BLEu7pH5nCsb8AH-y4rdWQFREktnmdGWCdiEnUi8zT_x03nFm267kp768_oh0eKPXgpS6oCvv9JZubgWIswUqbpAbHygMRyAP3sTUZV159BcwbW1vumGEOmnfW6XqO7-ERuiIUfm7ZMkaYl9C6SJo8XtaeggSeLH91UXbANzSHkoTGO1NSHJJwXooMw6EcMknwGiWoEQbRQ' \
--header 'workspaceId: a0f19bc2-3e69-4ea8-8893-8031ba0b0a0a' \
--header 'integrationAccountId: 7e805ebf-b2a1-4b79-9519-702ed8770f8b' \
--header 'Content-Type: application/json' \
--data '{
"conversationId": "6153382a-4062-455e-9c88-b5a2bc8c08ec",
"reservationId": "56179146-4c2a-456d-ad7c-71786135e5f8",
"body": "Hello there, I am sending this message via API",
"type": "EMAIL",
"subject": "Regarding your Reservation at Private Cozy - 3BHK",
"attachments":[
{
"name": "filetype.jpeg",
"url": "https://cdn.shopify.com/s/files/1/0549/5806/3713/files/what_interior_design_style_uses_plants.jpg?v=1710239789"
}
]
}'

Request Body​

The request body should be a JSON object containing the following fields:

FieldTypeDescription
conversationIdstringRequired. Unique identifier used to identify the conversation.
reservationIdstringRequired. Unique identifier used to identify the reservation.
bodystringRequired. Body of the message.
subjectstringOptional. Suject of the E-mail.
typestringRequired. Type of the message within the conversation.

Note:

  • Creating messages with attachments are only supported in Hospitable, BookingSync, Hostify and Beds24. Among which, we only support Hospitable now.
  • subject is required when type = EMAIL.

Type​

ValueDescription
CHANNELConversation via OTA channels between the guest and the owner (includes Airbnb, Vrbo, Booking.com etc)
EMAILEmail conversation between the guest and the owner.
SMSSMS conversation between the guest and the owner.
WHATSAPPWhatsApp conversation between the guest and the owner.
MESSENGERMeta Messenger conversation between the guest and the owner.

Example Response​

{
"success": true,
"data": {
"conversationId": "6153382a-4062-455e-9c88-b5a2bc8c08ec",
"reservationId": "56179146-4c2a-456d-ad7c-71786135e5f8",
"messageId": "d1c4b092-1eb2-5213-a6a4-8216eb08e007",
"message": "Hello there, I'm sending this message via API"
}
}