Docs/Documentation/Guest data

Conversations

Read your guest message threads and the messages inside them across every connected channel — Airbnb, Booking.com, website, email — through one API. One thread per reservation; messages stream back with sender, channel, direction, and delivery state.

What you get

  • Unified inbox— one paginated feed of threads across every channel you've connected, ordered by most recent activity.
  • Single-thread expand— pull the host + guest blocks (with contacts) for any thread by ID, no extra round-trip needed.
  • Message history— cursor-paginated messages within a thread, with direction (inbound / outbound), source channel, attachments, and the original platform timestamp.
  • Filterable— narrow by platform or status at the list level so you don't pull the world client-side.

Push, don't poll

The conversations endpoints back a UI well, but for live inboxes subscribe to conversation.updated via webhooks and only re-fetch the threads that changed.

List threads

Returns your conversation threads, most recent activity first (last_message_at descending). Cursor-paginated — pass the previous response's pagination.nextCursor back as cursor on the next call. To walk every thread exactly once, pass order=created (see Pagination across thousands of threads).

GET/v1/conversations
curl 'https://api.repull.dev/v1/conversations?limit=50&platform=airbnb&status=open' \
  -H 'Authorization: Bearer sk_live_...'

Query parameters

limitintegerDefault: 50

Max threads per page. 1-100; over 100 returns 422.

cursorstring

Opaque cursor from the previous response's pagination.nextCursor. Omit on the first call.

orderstringDefault: recent

recent: most recent activity first. created: newest thread first, stable while paging (use it for full syncs). Keep the same value on every page.

updated_sincestring

ISO 8601 instant. Only threads whose record changed at or after it, oldest change first.

platformstring

Filter by source channel. One of airbnb, booking, vrbo, plumguide, website, email.

statusstring

Filter by thread status. One of open, archived. Defaults to open.

Response

{
  "data": [
    {
      "id": 412987,
      "platform": "airbnb",
      "guest_id": 88341,
      "listing_id": 4118,
      "reservation_id": 216039,
      "subject": null,
      "last_message_at": "2026-04-30T18:14:09.000Z",
      "last_message_preview": "What time can I check in?",
      "unread_count": 2,
      "status": "open",
      "created_at": "2026-04-22T09:01:14.000Z",
      "updated_at": "2026-04-30T18:14:09.000Z"
    },
    {
      "id": 412988,
      "platform": "booking",
      "guest_id": 88342,
      "listing_id": 4119,
      "reservation_id": 216064,
      "subject": null,
      "last_message_at": "2026-04-30T17:02:11.000Z",
      "last_message_preview": "Grazie!",
      "unread_count": 0,
      "status": "open",
      "created_at": "2026-04-21T11:24:02.000Z",
      "updated_at": "2026-04-30T17:02:11.000Z"
    }
  ],
  "pagination": {
    "nextCursor": "eyJsYXN0SWQiOjQxMjk4OH0",
    "hasMore": true
  }
}
idinteger

Stable internal thread id. Pass to /v1/conversations/{id}.

platformstring

Source channel: airbnb, booking, website, email.

guest_idintegernullable

ID of the linked guest. Hydrate via /v1/guests/{id}.

listing_idintegernullable

ID of the listing the thread belongs to.

reservation_idintegernullable

ID of the linked reservation.

subjectstringnullable

Thread subject (email/website channels) or null.

last_message_atstringnullable

ISO 8601 timestamp of the most recent message.

last_message_previewstringnullable

Short preview of the most recent message body.

unread_countinteger

Inbound messages the host hasn't read yet.

statusstring

open or archived.

created_atstring

ISO 8601 timestamp the thread was first created in Repull.

updated_atstring

ISO 8601 timestamp of the last server-side update.

Get one thread

Returns the full ConversationDetail: every field on the list-row plus inline host and guestblocks (with up to 50 contacts), so a thread-detail header doesn't need a second round-trip.

GET/v1/conversations/{id}
curl 'https://api.repull.dev/v1/conversations/412987' \
  -H 'Authorization: Bearer sk_live_...'

Response

{
  "id": 412987,
  "platform": "airbnb",
  "guest_id": 88341,
  "listing_id": 4118,
  "reservation_id": 216039,
  "subject": null,
  "last_message_at": "2026-04-30T18:14:09.000Z",
  "last_message_preview": "What time can I check in?",
  "unread_count": 2,
  "status": "open",
  "created_at": "2026-04-22T09:01:14.000Z",
  "updated_at": "2026-04-30T18:14:09.000Z",
  "host": {
    "id": 4,
    "airbnbId": "1234567",
    "firstName": "Coastal",
    "displayName": "Coastal Stays Lisbon"
  },
  "guest": {
    "id": 88341,
    "displayName": "Sarah Mitchell",
    "contacts": [
      { "type": "email", "value": "[email protected]", "isPrimary": true,  "isVerified": true  },
      { "type": "phone", "value": "+15551234567",               "isPrimary": false, "isVerified": false }
    ]
  }
}

Field-name conventions

Top-level conversation fields use snake_case (last_message_at, unread_count) to match the underlying threads model. Nested host/guest blocks use camelCase (displayName, isPrimary) because they're shared with the guests endpoints. Both are stable.

Who can send: airbnbAccess

Airbnb conversations also carry airbnbAccess. It lists every Airbnb account on the listing (the owner and any co-hosts), whether each one is connected, and which one sends by default.

"airbnbAccess": {
  "defaultAccount": "airbnb:483175841",
  "accounts": [
    {
      "account": "airbnb:483175841",
      "name": "Tina And Steve",
      "role": "owner",
      "state": "connected",
      "disconnectedAt": null
    },
    {
      "account": "airbnb:228981432",
      "name": "Team Co-Host",
      "role": "cohost",
      "state": "disconnected",
      "disconnectedAt": "2026-09-30T14:02:11.000Z"
    }
  ]
}
defaultAccountstringnullable

The account a send uses when you do not name one: the conversation's own account while it is connected, else the listing's owner, else a connected co-host. null when no connected account can reach the listing.

accounts[].accountstring

The value to pass as account when you send a message, such as airbnb:228981432.

accounts[].namestringnullable

The account's Airbnb display name.

accounts[].rolestring

owner, cohost or unknown.

accounts[].statestring

connected (can send now), disconnected (was connected to this workspace) or never_connected (on the listing, never connected here).

accounts[].disconnectedAtstringnullable

When a disconnected account lost its connection.

How to read defaultAccount:

  • A value: a send without account goes out as that account. To send as someone else, pass a connected entry from accounts as account.
  • null: no connected account can send on this conversation, and a send returns 403 connection_reauth_required. Connect one of accounts, ideally the owner.

GET /v1/listings and GET /v1/listings/{id} carry the same object for Airbnb listings. See Airbnb Co-hosts.

Messages within a thread

Cursor-paginated. Defaults to oldest-first so you can append straight into a chat view; pass order=desc to walk back from the latest message.

GET/v1/conversations/{id}/messages
curl 'https://api.repull.dev/v1/conversations/412987/messages?limit=100&order=asc' \
  -H 'Authorization: Bearer sk_live_...'

Query parameters

limitintegerDefault: 100

Max messages per page. 1-100; over 100 returns 422.

cursorstring

Opaque cursor from the previous response. Omit on the first call.

orderstringDefault: asc

Sort order. asc returns oldest first, desc returns newest first.

Response

{
  "data": [
    {
      "id": 9912034,
      "external_message_id": "abnb_msg_abcd1234",
      "direction": "inbound",
      "sender_type": "guest",
      "sender_name": "Sarah Mitchell",
      "channel": "airbnb",
      "body": "Hi! What time can I check in tomorrow?",
      "translated_body": null,
      "attachments": [],
      "is_automated": false,
      "ai_generated": false,
      "sent_at": "2026-04-30T17:58:42.000Z",
      "delivered_at": "2026-04-30T17:58:43.000Z",
      "read_at": "2026-04-30T18:01:11.000Z",
      "reactions": []
    },
    {
      "id": 9912035,
      "external_message_id": "abnb_msg_abcd1235",
      "direction": "outbound",
      "sender_type": "host",
      "sender_name": "Coastal Stays Lisbon",
      "channel": "airbnb",
      "body": "Anytime after 3pm — door code is in your check-in guide.",
      "translated_body": null,
      "attachments": [],
      "is_automated": true,
      "ai_generated": true,
      "sent_at": "2026-04-30T18:01:11.000Z",
      "delivered_at": "2026-04-30T18:01:12.000Z",
      "read_at": "2026-04-30T18:14:01.000Z",
      "reactions": [
        { "id": "9e0b945a-b03d-4e28-ad48-5f7fc706a67f", "emoji": "👍", "by": { "type": "guest", "name": "Sarah" }, "at": "2026-04-30T18:14:20.000Z" }
      ]
    }
  ],
  "pagination": {
    "nextCursor": null,
    "hasMore": false
  }
}
idinteger

Stable internal message id.

external_message_idstringnullable

ID assigned by the source channel. Stable across syncs.

directionstring

inbound (from guest) or outbound (from host or automation).

sender_typestringnullable

Free-form role from the channel: guest, host, system, airbnb, etc. Use direction for binary logic.

sender_namestring

Display name of the sender.

channelstringnullable

Delivery channel: airbnb, booking, sms, email, etc.

bodystring

Message body in the original language.

translated_bodystringnullable

English translation when the original is non-English.

attachmentsarray

Inline attachments (images, etc.).

is_automatedboolean

True when sent by an automation (template, schedule).

ai_generatedboolean

True when the body was written by AI.

sent_atstring

ISO 8601 timestamp of the original send (from the source platform).

delivered_atstring

ISO 8601 timestamp of channel-side delivery.

read_atstringnullable

Outbound (your message): when the guest first read it, from Airbnb's read receipts; null on channels that don't report reads. Inbound (the guest's message): when your team answered it or marked it handled.

host_read_atstringnullable

Guest messages only: when the host or a co-host first read it on Airbnb (from Airbnb's read receipts). Null for your own messages and on channels that don't report reads.

reactionsarray

Reactions on the message, oldest first: id, emoji, by (type and name of who reacted) and at. Airbnb reports them; empty on other channels.

Read receipts and reactions

Airbnb tells Repull when a guest reads the conversation and when anyone on it reacts to a message. You get both on the message itself and as webhooks, so you don't poll for them:

  • reservation.message.read: the guest read the conversation up to and including messageId, a message from your side. Every earlier message was read by then too.
  • reservation.message.reaction: a reaction was added or removed, with the emoji, who reacted and when.
// Your webhook handler (verify the signature first: /docs/webhooks/verification)
type Actor = { type: string; name: string | null }

export async function onRepullEvent(event: { event: string; data: any }) {
  if (event.event === 'reservation.message.read') {
    const { threadId, messageId, readAt, reader } = event.data as {
      threadId: string; messageId: string; readAt: string; reader: Actor
    }
    await markReadUpTo(threadId, messageId, readAt) // everything up to messageId is read
  }
  if (event.event === 'reservation.message.reaction') {
    const { messageId, action, reaction } = event.data as {
      messageId: string; action: 'added' | 'removed'
      reaction: { id: string; emoji: string; by: Actor; at: string }
    }
    if (action === 'added') await addReaction(messageId, reaction)
    else await removeReaction(messageId, reaction.id)
  }
}

To react yourself, send PATCH /v1/channels/airbnb/messaging/{threadId}/messages/{messageId} with { "action": "react", "reaction": "👍" }. Airbnb decides which reactions it accepts; a refusal comes back as 422 reaction_not_supportedwith Airbnb's reason. Removing a reaction is not available yet.

To mark a guest's message as read on Airbnb, send the same call with { "action": "read" }. Airbnb accepts it; whether the guest then sees the message as read is up to Airbnb and not confirmed yet.

Common patterns

Stream new messages

Subscribe to conversation.updated via webhooks and re-fetch only threads with a fresh last_message_at. Polling the list endpoint at less than one minute is wasteful — the webhook fires within seconds.

// In your webhook handler:
//   POST /your-handler { type: "conversation.updated", data: { id } }
const thread = await repull.conversations.get(event.data.id)

// Walk only the messages you haven't seen yet
const lastSeen = lastSeenAt[thread.id!] ?? thread.createdAt!
let cursor: string | undefined

do {
  const page = await repull.conversations.messages(thread.id!, {
    cursor,
    order: 'asc',
    limit: 100,
  })
  for (const msg of page.data) {
    if (msg.sentAt! > lastSeen) renderInUi(msg)
  }
  cursor = page.pagination.nextCursor ?? undefined
} while (cursor)

lastSeenAt[thread.id!] = new Date().toISOString()

Filter unread only

The cheapest unread query: list with status=open and filter on unread_count > 0 client-side. Cheaper than per-thread message scans.

import type { Conversation } from '@repull/sdk'

const inbox: Conversation[] = []
let cursor: string | undefined

do {
  const { data, pagination } = await repull.conversations.list({ cursor, limit: 100 })
  for (const t of data) if (t.status === 'open' && (t.unreadCount ?? 0) > 0) inbox.push(t)
  cursor = pagination.nextCursor ?? undefined
} while (cursor)

console.log(inbox.length, 'threads need a reply')

Pagination across thousands of threads

The default order is most recent activity first, so a thread that gets a new message while you page moves to the front, behind your position, and that walk won't return it. For a full walk pass order=created: newest thread first, stable for the whole walk, so nothing is skipped or repeated. Then keep up with updated_since. Always loop on pagination.hasMore, never on a count.

async function* allThreads() {
  let cursor: string | undefined
  do {
    // Over HTTP add ?order=created: stable while paging, every thread exactly once
    const page = await repull.conversations.list({ cursor, limit: 100 })
    for (const t of page.data) yield t
    cursor = page.pagination.nextCursor ?? undefined
  } while (cursor)
}

for await (const thread of allThreads()) {
  // process — works the same for 50 or 50,000
}
  • Send a Message — post a reply back to the originating channel.
  • Airbnb Co-hosts — which owner or co-host account sends on an Airbnb conversation.
  • Connect (multi-channel) — how Airbnb, Booking, and direct accounts get linked into a single inbox.
  • Guests — hydrate the guest behind a thread with full contacts, flags, and stay history.
  • Webhooks — subscribe to conversation.updated for push instead of poll.
AI