---
title: "Guests — Documentation"
canonical: "https://repull.dev/docs/guests"
description: "Unified guest profiles across all channels: name, contacts, language, country, stay history and lifetime value. List, get and update guests."
updated: "2026-11-30T00:48:58.694Z"
commit: "18314c12fefb59a7545ef7607c0893919de20aa9"
---

# Guests

Aggregate guest profiles across all your channels — name, contacts, language, country, stay history, and lifetime value — in a single record. Use the list endpoint for fast inbox-style search; pull the detail endpoint when you need full contacts, flags, and reservation rollups.

## What you get

- **Unified profile**— one record per guest, even when they've stayed via multiple channels under different display names.
- **Pre-resolved primary contacts**— the list-row already has the primary email and phone hoisted out, so your UI doesn't need a per-row lookup.
- **Lifetime aggregates**— reservation count, total revenue (decimal string for precision), first stay, last stay.
- **Search + filter** — `q` matches name, email, and phone; `has_reservation` hides browse-only profiles; `listingId`narrows to guests of one property.
- **Detail endpoint**— full contacts list (up to 50), risk flags, notes, blacklist state, verification level, and a future/past/cancelled reservation rollup.

> **Note: totalRevenue is a string**
>
> Returned as a decimal-as-string (`"14250.00"`), not a number. This is intentional — it preserves precision when totals span multiple currencies. Parse with a Decimal lib (e.g. `decimal.js`, Python `Decimal`) instead of `parseFloat`.

## List guests

Cursor-paginated. Pass the previous response's `pagination.nextCursor`back as `cursor` on the next call. Loop until `hasMore` is `false`.

`GET /v1/guests`

**cURL**

```bash
curl 'https://api.repull.dev/v1/guests?q=mitchell&has_reservation=true&limit=50' \
  -H 'Authorization: Bearer sk_live_...'
```

**Node.js**

```typescript
import { Repull } from '@repull/sdk'

const repull = new Repull({ apiKey: process.env.REPULL_API_KEY! })

const { data, pagination } = await repull.guests.list({
  q: 'mitchell',
  has_reservation: true,
  limit: 50,
})

for (const g of data) {
  console.log(g.id, g.displayNameLong, g.email, g.totalReservations, g.totalRevenue)
}

if (pagination.hasMore) {
  await repull.guests.list({ q: 'mitchell', has_reservation: true, limit: 50, cursor: pagination.nextCursor! })
}
```

**Python**

```python
import os
from repull import AuthenticatedClient
from repull.api.guests import list_guests

client = AuthenticatedClient(
    base_url="https://api.repull.dev",
    token=os.environ["REPULL_API_KEY"],
)

guests = list_guests.sync(client=client, limit=20)
```

**Go**

```go
import (
	"context"
	"os"

	"github.com/ivannikolovbg/repull-go/repull"
)

client, err := repull.NewClientWithResponses(
	repull.DefaultBaseURL,
	repull.WithBearer(os.Getenv("REPULL_API_KEY")),
)
ctx := context.Background()

limit := 20
resp, err := client.ListGuestsWithResponse(ctx, &repull.ListGuestsParams{Limit: &limit})
```

**Ruby**

```ruby
config = Repull::Configuration.new
config.access_token = ENV.fetch('REPULL_API_KEY')
config.host = 'api.repull.dev'

client = Repull::ApiClient.new(config)

api = Repull::GuestsApi.new(client)
guests = api.list_guests(limit: 20)
```

**PHP**

```php
$config = Repull\Configuration::getDefaultConfiguration()
    ->setAccessToken(getenv('REPULL_API_KEY'));
$http = new GuzzleHttp\Client();

$api = new Repull\Api\GuestsApi($http, $config);
$guests = $api->listGuests(limit: 20);
```

**C#**

```csharp
using Repull.SDK;

var client = RepullClientFactory.Create(
    Environment.GetEnvironmentVariable("REPULL_API_KEY")!);

var guests = await client.V1.Guests.GetAsync(
    rc => rc.QueryParameters.Limit = 20);
```

### Query parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | `integer` | No | Max guests per page. 1-100; over 100 returns 422. Default: `50`. |
| `cursor` | `string` | No | Opaque cursor from the previous response. Omit on the first call. |
| `q` | `string` | No | Free-text search across guest name, email, and phone (partial match). |
| `has_reservation` | `boolean` | No | When true, only return guests with at least one reservation. Hides browse-only / lead profiles. |
| `listingId` | `integer` | No | Only return guests who have stayed at this listing. |

### Response

```
{
  "data": [
    {
      "id": 88341,
      "displayName": "Sarah",
      "displayNameLong": "Sarah Mitchell",
      "language": "en",
      "country": "US",
      "phone": "+15551234567",
      "email": "sarah.mitchell@example.com",
      "totalReservations": 3,
      "totalRevenue": "4250.00",
      "lastStayedAt": "2026-03-18",
      "firstStayedAt": "2024-08-04",
      "created_at": "2024-08-01T09:14:22.000Z"
    },
    {
      "id": 88412,
      "displayName": "Marco",
      "displayNameLong": "Marco Rossi",
      "language": "it",
      "country": "IT",
      "phone": "+393331234567",
      "email": "marco.rossi@example.com",
      "totalReservations": 1,
      "totalRevenue": "1820.50",
      "lastStayedAt": "2026-04-23",
      "firstStayedAt": "2026-04-21",
      "created_at": "2026-04-15T08:01:11.000Z"
    }
  ],
  "pagination": {
    "nextCursor": "eyJsYXN0SWQiOjg4NDEyfQ",
    "hasMore": true
  }
}
```

> **Note: Airbnb guest phones**
>
> Airbnb no longer shares guests' real phone numbers. A phone on an Airbnb stay may be a temporary relay number (`phoneType: "airbnb_relay"`) or missing. See [Airbnb guest phone numbers](https://repull.dev/docs/channels/airbnb/guest-phone-numbers.md).

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `integer` | No | Stable internal guest id. Pass to /v1/guests/{id}. |
| `displayName` | `string` | No | Short display name (typically first name). |
| `displayNameLong` | `string` | No | Long display name (first + last). Falls back to displayName when last name is missing. |
| `language` | `string` | No | Preferred language (ISO 639-1). Nullable. |
| `country` | `string` | No | Country (ISO 3166-1 alpha-2). Nullable. |
| `phone` | `string` | No | Primary phone (or first non-primary if no primary set). May be an Airbnb relay number. Nullable. |
| `phoneType` | `string` | No | airbnb\_relay when phone is a temporary Airbnb relay number (SMS only, expires 48h after checkout, never a guest identifier), guest otherwise, null with no phone. See Airbnb guest phone numbers. Nullable. |
| `email` | `string` | No | Primary email. Nullable. |
| `totalReservations` | `integer` | No | Lifetime reservation count. |
| `totalRevenue` | `string` | No | Decimal-as-string. Lifetime revenue, mixed-currency safe. |
| `lastStayedAt` | `string` | No | Check-out date of the most recent stay (YYYY-MM-DD). Nullable. |
| `firstStayedAt` | `string` | No | Check-in date of the first stay (YYYY-MM-DD). Nullable. |
| `created_at` | `string` | No | ISO 8601 timestamp the guest record was first created. |

## Get guest detail

Returns the full `GuestProfile`: every list-row field plus contacts (up to 50), risk flags, free-form notes, blacklist state, verification level, and a future/past/cancelled reservation summary.

`GET /v1/guests/{id}`

**cURL**

```bash
curl 'https://api.repull.dev/v1/guests/88341' \
  -H 'Authorization: Bearer sk_live_...'
```

**Node.js**

```typescript
import { Repull } from '@repull/sdk'

const repull = new Repull({ apiKey: process.env.REPULL_API_KEY! })

const guest = await repull.guests.get(88341)

console.log(guest.displayNameLong, '·', guest.country)
console.log('Reservations:', guest.totalReservations, '— revenue:', guest.totalRevenue)
```

**Python**

```python
import os
from repull import AuthenticatedClient
from repull.api.guests import get_guest

client = AuthenticatedClient(
    base_url="https://api.repull.dev",
    token=os.environ["REPULL_API_KEY"],
)

guest = get_guest.sync(id=789, client=client)
```

**Go**

```go
import (
	"context"
	"os"

	"github.com/ivannikolovbg/repull-go/repull"
)

client, err := repull.NewClientWithResponses(
	repull.DefaultBaseURL,
	repull.WithBearer(os.Getenv("REPULL_API_KEY")),
)
ctx := context.Background()

resp, err := client.GetGuestWithResponse(ctx, 789, nil)
```

**Ruby**

```ruby
config = Repull::Configuration.new
config.access_token = ENV.fetch('REPULL_API_KEY')
config.host = 'api.repull.dev'

client = Repull::ApiClient.new(config)

api = Repull::GuestsApi.new(client)
guest = api.get_guest(789)
```

**PHP**

```php
$config = Repull\Configuration::getDefaultConfiguration()
    ->setAccessToken(getenv('REPULL_API_KEY'));
$http = new GuzzleHttp\Client();

$api = new Repull\Api\GuestsApi($http, $config);
$guest = $api->getGuest(789);
```

**C#**

```csharp
using Repull.SDK;

var client = RepullClientFactory.Create(
    Environment.GetEnvironmentVariable("REPULL_API_KEY")!);

var guest = await client.V1.Guests["789"].GetAsync();
```

### Response

```
{
  "id": 88341,
  "displayName": "Sarah",
  "displayNameLong": "Sarah Mitchell",
  "language": "en",
  "country": "US",
  "phone": "+15551234567",
  "email": "sarah.mitchell@example.com",
  "totalReservations": 3,
  "totalRevenue": "4250.00",
  "currency": "USD",
  "isBlacklisted": false,
  "blacklistedReason": null,
  "riskLevel": "low",
  "verificationLevel": "verified_id_phone",
  "created_at": "2024-08-01T09:14:22.000Z",
  "contacts": [
    { "type": "email", "value": "sarah.mitchell@example.com", "verified": true,  "is_primary": true,  "last_used": "2026-04-30T18:14:09.000Z" },
    { "type": "phone", "value": "+15551234567",               "verified": true,  "is_primary": true,  "last_used": "2026-03-18T11:00:00.000Z" },
    { "type": "email", "value": "smitchell@work.example",     "verified": false, "is_primary": false, "last_used": null }
  ],
  "flags": [
    { "type": "info", "note": "Repeat guest — late checkout OK", "is_active": true, "created_at": "2025-09-12T10:11:00.000Z" }
  ],
  "notes": [
    { "id": 12, "body": "Allergic to feather pillows", "category": "preference", "created_at": "2025-09-12T10:13:00.000Z", "created_by": "ops@coastalstays.example" }
  ],
  "reservations_summary": {
    "total": 3,
    "future": 1,
    "past": 2,
    "cancelled": 0
  }
}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `currency` | `string` | No | Currency code for totalRevenue (when single-currency); null on mixed-currency totals. Nullable. |
| `isBlacklisted` | `boolean` | No | Workspace-level blacklist flag. |
| `blacklistedReason` | `string` | No | Free-text reason when blacklisted. Nullable. |
| `riskLevel` | `string` | No | Risk score: low, medium, high (or null when uncomputed). Nullable. |
| `verificationLevel` | `string` | No | Identity / contact verification level from the channel. Nullable. |
| `contacts` | `array` | No | All known contact channels (phones, emails). Up to 50. |
| `flags` | `array` | No | Risk / operational flags (info, warning, block). |
| `notes` | `array` | No | Free-form notes left by your team. |
| `reservations_summary` | `object` | No | Aggregate counts of attached reservations. |

## Update a guest

`PATCH /v1/guests/{id}` changes `firstName`, `lastName`, `email`, `phone` or `language`— send only what changes. Email and phone are added as the guest's newest contact; earlier ones are kept. Send an `Idempotency-Key` to make a retry safe.

```
curl -X PATCH 'https://api.repull.dev/v1/guests/790'   -H 'Authorization: Bearer sk_live_...'   -H 'Content-Type: application/json'   -d '{"lastName": "Rossi", "email": "marco.rossi@example.com"}'
```

> **Note: Guests in a connected PMS**
>
> Send `provider` (e.g. `"guesty"`) on `POST /v1/guests`to create the guest in that PMS too — its id there comes back as `pms.externalId`. A guest linked to a PMS is changed there first on `PATCH`, and `pms` on the response lists each PMS it reached. Hostaway has no guest records, so both answer `422 pms_write_unsupported` for it. See [Writing through a PMS](https://repull.dev/docs/pms-writes.md#guests).

## Common patterns

### Find a returning guest by email

`q` matches across name, email, and phone. Combine with `has_reservation=true` to skip browse-only leads.

```
const { data } = await repull.guests.list({
  q: 'sarah.mitchell@example.com',
  has_reservation: true,
  limit: 5,
})

if (data.length === 0) {
  // brand-new guest, create the reservation against a fresh profile
} else {
  const returning = data[0]
  console.log('Welcome back', returning.displayName,
    '— last stay', returning.lastStayedAt)
}
```

### Top spenders this year

Walk all guests with `has_reservation=true` and sort by `totalRevenue`client-side. Use a Decimal lib — the field is a string for a reason.

```
import Decimal from 'decimal.js'

const all: Array<{ id: string; name: string; rev: Decimal }> = []
let cursor: string | null | undefined

do {
  const page = await repull.guests.list({
    has_reservation: true,
    cursor: cursor ?? undefined,
    limit: 100,
  })
  for (const g of page.data) {
    if (g.lastStayedAt && g.lastStayedAt.startsWith('2026-')) {
      all.push({ id: g.id!, name: g.displayNameLong!, rev: new Decimal(g.totalRevenue!) })
    }
  }
  cursor = page.pagination.nextCursor
} while (cursor)

const top10 = all.sort((a, b) => b.rev.cmp(a.rev)).slice(0, 10)
for (const g of top10) console.log(g.name, '—', g.rev.toString())
```

### Guests with active reservations at one listing

Combine `listingId` with `has_reservation=true`, then enrich the ones whose `reservationsSummary.future > 0` by hitting the detail endpoint.

```
// The listing filter and the reservation summary are not on the SDK's
// guests.list() / Guest type, so this pattern calls the API directly.
const headers = { Authorization: `Bearer ${process.env.REPULL_API_KEY}` }

const { data } = await fetch(
  'https://api.repull.dev/v1/guests?listingId=4118&has_reservation=true&limit=100',
  { headers },
).then((r) => r.json())

const profiles = await Promise.all(
  data.map((g: { id: string }) =>
    fetch(`https://api.repull.dev/v1/guests/${g.id}`, { headers }).then((r) => r.json()),
  ),
)
const active = profiles.filter((p) => p.reservationsSummary.future > 0)

for (const g of active) {
  console.log(g.displayNameLong,
    '— upcoming:', g.reservationsSummary.future,
    '— last stay:', g.lastStayedAt)
}
```

## Related

- [Conversations](https://repull.dev/docs/conversations.md) — pull the message thread for any reservation linked to a guest.
- [Get Reservations](https://repull.dev/docs/get-reservations.md) — reservations are joined back to a guest by `guest_id`.
- [Connect (multi-channel)](https://repull.dev/docs/connect.md) — how Airbnb, Booking, and direct accounts feed into one unified guest.
