List the messages of a booking
/api/v1/bookings/{booking_id}/messagesmessages.readThe conversation of a booking with its guest, oldest message first and paged with next_cursor. Each message gives its direction, its author (the guest, the host or a team member, Zenny, an automation or an App, named), its channel, its text, its attachments and its delivery status.
A booking without any message answers an empty list. Scheduled Messages not sent yet are not listed. The author never carries the guest email or phone, nor the name of the team member: those stay out of reach, and the guest contact details stay under guests.read on GET /bookings. The text is the message as written, so it holds whatever the guest or the host typed.
Download an attachment from its url, with the access token of the App Connection. A booking outside the Connection Scope answers not_found, exactly like a missing one.
Parameters
Path parameters
booking_idstring (uuid)requiredBooking id.
Query parameters
cursorstringnext_cursorof the previous page.limitintegerPage size.
min 1 · max 500 · default 100
Responses
200One page of the messages of the booking.
application/jsonMessageList
dataMessage[]requiredShow 10 child attributesHide child attributes
idstring (uuid)requireddirectionstringrequiredinboundfrom the guest,outboundto the guest.One of:
inboundoutboundauthorMessageAuthorrequiredWho wrote the message. Never carries a guest email or phone, nor the name of the team member.
Show 2 child attributesHide child attributes
typestringrequiredguest(inbound),host(the host or a team member),zenny(written by Zenny, the ZenHost assistant),automation(a Scheduled Message) orapp(an App, seeapp_name). Version 1 may add values.One of:
guesthostzennyautomationappapp_namestringName of the App that sent the message, when
typeisapp.
channelstringrequiredplatformis the messaging of the Sales Channel of the booking (Airbnb, Booking.com…). Version 1 may add values.One of:
platformemailsmstextstringrequiredsubjectstring | nullrequiredEmail subject.
attachmentsMessageAttachment[]requiredShow 5 child attributesHide child attributes
indexintegerrequiredPosition of the file in the message, as in the download URL. Files that cannot be downloaded are left out, so indexes may skip.
min 0
typestringrequiredOnly images in version 1; other types may be added.
One of:
imagefile_namestring | nullrequiredcontent_typestring | nullrequiredMIME type when known; the download answers with the actual one.
urlstring (uri)requiredDownload URL of the file. Call it with the access token of the App Connection, like any other endpoint.
delivery_statusstringrequiredreceivedfor an inbound message. For an outbound one:pendingwhile it is not confirmed sent (in flight, or its fate is not known yet),sent, orrejectedwhen it did not reach the guest: the Sales Channel refused it, or its send failed or stayed unconfirmed for a minute, as the ZenHost inbox shows it. Version 1 may add values.One of:
receivedpendingsentrejectedsent_atstring (date-time)requiredcreated_atstring (date-time)requiredWhen ZenHost recorded the message; the list is sorted on it.
next_cursorstring | nullrequiredPass it as
cursorto read the next page;nullon the last page.
401Error code: unauthorized, connection_revoked.
Error codes
unauthorizedThe access token is missing, unknown, expired or revoked, or was issued before the account connected the App again. Refresh it; if refreshing fails, ask the owner to connect again.connection_revokedThe owner revoked the App Connection (or your App revoked its own refresh token). Stop calling for this account and drop its tokens.
402Error code: subscription_blocked.
Error codes
subscription_blockedThe ZenHost subscription of the account is blocked (unpaid, cancelled…). The connection is kept: tell your customer, calls work again once the subscription is restored.
403Error code: app_suspended, forbidden_permission.
Error codes
app_suspendedZenHost suspended your App, or no longer allows it on this account. Stop calling and contact ZenHost.forbidden_permissionYour App was not granted the Permission this endpoint requires.
404Error code: not_found.
Error codes
not_foundThe resource does not exist or is outside the Connection Scope (both look the same), or the path is not an endpoint of/api/v1.
422Error code: validation_failed.
Error codes
validation_failedThe query, headers or body are invalid;details.issuespoints at each problem (path,message, andmaximumwhen a value or list is too big).
429Error code: rate_limited.
Header Retry-After — Seconds to wait before the next call is allowed. Limits per App Connection: 60 reads (GET), 10 writes (other POST) and 30 messages sent to guests per minute.
Error codes
rate_limitedToo many calls on this App Connection. Wait for the number of seconds inRetry-After.
500Error code: internal_error.
Error codes
internal_errorZenHost failed to answer. Retry later with a back-off.