Adds a message the guest wrote outside Host Tools, such as in your own
guest portal, to an internal or direct reservation's messages. It
is stored as the guest's message (role: "guest"), and nothing is sent
to the guest. Needs the messages:write scope.
It works like a guest's message from a channel: the conversation is
marked unread in the host's inbox, the host gets a notification, the
AI auto-reply answers it if the host turned that on, and it counts
toward the host's response time.
Webhook. The new message is sent to every /webhooks/message URL
of the user, yours included. To skip your own message, compare
document.post._id with the postID this call returned. When the host
or the AI replies, the reply reaches you through the same webhook, and
it is also emailed to the guest (see
/api/sendMessage/{reservationID}). An OAuth client gets this webhook
only with the messages:read scope, so request it along with
messages:write.
Retries. Send your own ID for the message as externalID to make
the call safe to repeat, for example after a timeout. A call with an
externalID already stored on the reservation adds nothing, returns
the postID of the message already stored, and its message is
ignored. So the host is alerted, and the AI replies, only once.
Errors. Each returns 400 with the reason in message:
message | Cause |
|---|---|
Message cannot be empty | No text, or only spaces |
Message cannot be longer than 10,000 characters | More than 10,000 characters after trimming spaces |
externalID must be a non-empty string of at most 200 characters | externalID is not a string, is blank or is too long |
Guest messages can only be added to internal and direct reservations. A channel's guests message the host through the channel. | An Airbnb, VRBO, Booking.com or other channel reservation |
Reservation not found | No reservation with this ID in your account |
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
403The OAuth token lacks the messages:write scope
429Too many requests