Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Conversations & Messages

Access all guest conversation threads for your property — including messages received via Email, Booking.com, Airbnb and WhatsApp — from a single API.


List Conversations

Retrieve a paginated list of conversation threads for your property. Each result includes a preview of the latest message.

Endpoint

GET /api/v1/client/conversations

If your property has no conversations yet, you get 200 with an empty results list.

Query Parameters

Parameter
Type
Description

limit

integer

Number of results to return. Default 20. Above 100 counts as 100; 0 or less as the default.

offset

integer

Number of results to skip (for pagination). Default 0. Below 0 counts as 0.

booking_id

string

Optional. Only the conversations of this booking.

channel

string

Optional. EMAIL, BOOKING_COM, AIRBNB or WHATSAPP (any letter case). HOSTELWORLD is also accepted but always returns an empty list.

search

string

Optional. Search by guest name, subject, booking ID, or message content.

A limit or offset that isn't a whole number, or any other channel, gets 400 with code bad_request.

Example Request

curl "/api/v1/client/conversations?limit=20&offset=0&channel=BOOKING_COM" \
  -H "X-API-Key: <your_api_key>"

Example Response

Response Fields

Field
Type
Description

pagination.total

integer

Total number of conversations matching the query.

pagination.limit

integer

The limit applied to this request.

pagination.offset

integer

The offset applied to this request.

pagination.has_more

boolean

true if there are more results beyond this page.

results[].id

UUID

Unique thread ID (use this to fetch messages).

results[].booking_id

UUID

The booking this conversation belongs to.

results[].channel

string

The channel the conversation is on.

results[].guest_name

string

Guest's name, if available.

results[].subject

string

Email subject line. null for OTA channels.

results[].is_read

boolean

false if the thread has unread messages.

results[].unread_count

integer

Number of unread messages in the thread.

results[].status

string

OPEN or ARCHIVED.

results[].last_message

object

Preview of the most recent message. null if no messages yet.

results[].created_at

string

ISO 8601 timestamp when the thread was created.


Get Messages in a Conversation

Retrieve the full message history for a specific conversation thread, ordered oldest to newest.

Endpoint

Path Parameters

Parameter
Type
Description

threadId

UUID

The conversation thread ID, obtained from the List Conversations endpoint.

Query Parameters

Parameter
Type
Description

limit

integer

Number of messages to return. Default 50. Above 100 counts as 100; 0 or less as the default.

offset

integer

Number of messages to skip. Default 0. Below 0 counts as 0.

Example Request

Example Response

Response Fields

Field
Type
Description

thread.id

UUID

The thread ID.

thread.booking_id

UUID

The booking this thread belongs to.

thread.channel

string

The channel for this thread.

thread.guest_name

string

Guest name, if available.

results[].id

UUID

Unique message ID.

results[].content

string

The message body.

results[].direction

string

INBOUND (guest → property) or OUTBOUND (property → guest).

results[].source

string

MANUAL, AUTOMATED, GUEST, VERIFICATION, or CHECK_IN.

results[].sender

string

Sender identifier — an email address for email threads, or "guest" for OTA.

results[].is_read

boolean

Whether this message has been read in the Hostel Mate inbox.

results[].created_at

string

ISO 8601 timestamp. For OTA messages, this reflects the original timestamp from the OTA platform.


Pagination Example

To page through all conversations 20 at a time:

Continue incrementing offset by limit until has_more is false.


Channel Values

Value
Description

EMAIL

Direct email thread

BOOKING_COM

Booking.com messaging

AIRBNB

Airbnb messaging

WHATSAPP

WhatsApp messaging


Error Responses

Errors use the same body as the rest of the Client API, plus the error key these endpoints have always sent (the code, or for a 400 the message):

Status
Code
Meaning

400

bad_request

limit or offset isn't a whole number, or channel is unknown.

404

not_found

Thread not found or does not belong to your property.

503

messaging_unavailable

The messaging service is temporarily unavailable. Retry after a moment.


Finding the conversation for a message.received webhook

This works the same for message.any.received. The threadId in a message webhook is the channel's own thread ID, not the conversation id used here. To open the conversation, list it by booking:

Then use the returned id with GET /api/v1/client/conversations/{id}/messages.

WhatsApp messages arrive with bookingId: null (WhatsApp conversations are kept per guest phone, not per booking), and so can emails that aren't linked to a booking. For those, list with channel=WHATSAPP or channel=EMAIL instead.

Last updated