List the Message Threads of the Connection Scope
/api/v1/message-threadsmessages.readOne conversation per booking that has at least one message, on the Properties of the Connection Scope, latest message first and paged with next_cursor. Each gives the booking, its Property and Sales Channel, a preview of the latest message GET /bookings/{booking_id}/messages lists (a Scheduled Message not sent yet is left out) and its author, the number of unread messages and whether the conversation is closed.
The author never carries the guest email or phone: those stay under guests.read on GET /bookings. The preview is the message text as written, so it holds whatever the guest or the host typed.
Incremental sync: read every page, keep next_updated_since, and pass it as updated_since next time. A new message, a message read or unread in ZenHost, or a closed or reopened conversation brings the thread back. A thread whose latest message changes while you page through may move ahead of your cursor: the next poll returns it. Some threads may come twice: upsert them by booking_id.
Parameters
Query parameters
property_id[]string (uuid)[]Only these Properties (repeat the parameter, at most 100). Each must be in the Connection Scope. Leave it out to list the whole Connection Scope, page by page.
at most 100 items
updated_sincestring (date-time)Only Message Threads changed at or after this instant. Use
next_updated_sinceof your previous listing.cursorstringnext_cursorof the previous page.limitintegerPage size.
min 1 · max 500 · default 100
Responses
200One page of Message Threads.
application/jsonMessageThreadList
dataMessageThread[]requiredShow 7 child attributesHide child attributes
booking_idstring (uuid)requiredThe booking of the conversation; a booking has at most one Message Thread.
property_idstring (uuid)requiredsales_channelobjectrequiredWhere the booking was made.
Show 2 child attributesHide child attributes
codestringrequireddirect,website,other, or the Sales Channel shortcode, as onGET /bookings.namestringrequired
latest_messageLatestMessagerequiredThe latest message of the conversation.
Show 5 child attributesHide child attributes
idstring (uuid)requiredpreviewstringrequiredFirst 200 characters of the message text.
authorMessageAuthorrequiredWho 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.
created_atstring (date-time)requiredattachments_countintegerrequiredmin 0
unread_countintegerrequiredMessages of the conversation not read in ZenHost yet.
min 0
is_closedbooleanrequiredIn ZenHost a conversation is closed once its latest message is read; a new guest message reopens it.
updated_atstring (date-time)requiredLast change of the conversation: a message added, changed or removed, or its read state.
next_cursorstring | nullrequiredPass it as
cursor, with the same filters, to read the next page;nullon the last page.next_updated_sincestring (date-time)requiredOnce the last page is read, pass it as
updated_sinceto receive every Message Thread changed since this listing began. Some may come again: upsert them bybooking_id.
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.
422Error code: property_out_of_scope, validation_failed.
Error codes
property_out_of_scopeA requested Property is outside the Connection Scope;details.property_idslists them.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.