Docs/API Reference/Conversations

Send a message in a conversation

Conversations · POST /v1/conversations/:id/messages

Send a message in a conversation

POST/v1/conversations/:id/messages

Note

Send `message`, `attachments`, or both. Airbnb takes JPEG/PNG/GIF/WebP/MP4/QuickTime and delivers each file as its own message; Booking.com takes JPEG/PNG on one message with text; SMS, email and site chat return 422 attachments_not_supported. The response then adds `attachments` and `parts`. On a conversation a connected PMS relays (Guesty, Hostaway), the message is sent through the PMS and `channel` may be the PMS's own name — Guesty airbnb2, platform, email, sms, whatsapp or note; Hostaway channel, email, sms, whatsapp — or one of Repull's, which the PMS maps. Neither PMS can send attachments: 422 pms_write_unsupported, nothing sent. Full rules: /docs/send-message#attachments, /docs/pms-writes#messages

Request

curl -X POST https://api.repull.dev/v1/conversations/123/messages \
  -H "Authorization: Bearer $REPULL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "message": "Welcome to your stay!"
}'

Response

{
  "id": "1847911",
  "conversationId": "164743",
  "externalMessageId": "32837172381",
  "channel": "airbnb",
  "status": "sent",
  "direction": "outbound",
  "contentRewritten": false,
  "submittedContent": "Your check-in details are ready.",
  "deliveredContent": "Your check-in details are ready.",
  "statusReason": null,
  "attachments": []
}

Body Parameters

messagestring

The text to send the guest, up to 4000 characters. Required unless you send attachments, and always required on Booking.com.

channelstring

Force a channel. Omit to send on whichever channel the conversation already uses, which is the right default. `airbnb`, `booking`, `vrbo`, `sms`, `email` or `website` — or, on a conversation a connected PMS relays, the PMS's own channel name.

attachmentsarray

1 to 5 files as `{ url, contentType?, filename? }`. Each `url` must be a public https URL, up to 10 MB. Supported on Airbnb and Booking.com; other channels return 422 attachments_not_supported and nothing is sent.

AI