---
title: "One Workspace per Customer — Documentation"
canonical: "https://repull.dev/docs/workspaces"
description: "Give each customer their own Repull workspace: create it during Connect, then read and write their data with X-Workspace-Id and your one API key."
updated: "2026-11-30T00:48:58.694Z"
commit: "18314c12fefb59a7545ef7607c0893919de20aa9"
---

# One workspace per customer

TL;DR

Send `workspace: { name, externalRef }` to `POST /v1/connect` and your customer connects into a workspace of their own. Use the `workspaceId` you get back as the `X-Workspace-Id`header to read and write that customer's data with your own API key. Webhooks, plan and billing stay on your account.

If you serve many hosts or property managers, give each of them a workspace. Their connections, listings, reservations and conversations are kept apart from everyone else's, and one API key reaches all of them. The hosted Connect pages look the same as any other Connect session and carry your branding.

## Create a workspace while your customer connects

Add `workspace` to a normal [Connect](https://repull.dev/docs/connect.md) session. Repull opens a new workspace for that customer, and the channel they connect lands there.

```
curl -X POST https://api.repull.dev/v1/connect \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "redirectUrl": "https://app.example.com/connected",
    "workspace": { "name": "Seaside Rentals", "externalRef": "acct_8812" }
  }'

# → { "sessionId": "cs_…", "url": "https://connect.repull.dev/cs_…",
#     "expiresAt": "…", "workspaceId": "1204" }
```

- `name` — required, 1–120 characters. Shown to you, never to the guest.
- `externalRef` — optional, your own id for this customer. Returned when you list workspaces and usable as a filter.
- Store the `workspaceId` next to your customer record. It never changes.

## Read and write a customer's data

Every endpoint accepts `X-Workspace-Id`. With it, the request acts on that workspace instead of your own. You can only name workspaces you created; any other id returns `404`.

```
curl https://api.repull.dev/v1/reservations \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "X-Workspace-Id: 1204"
```

## Add or reconnect a channel later

Start a Connect session with `X-Workspace-Id` and no `workspace`body field. The connection lands in that customer's existing workspace. Sending both returns an error, so a retry never creates a second workspace by accident.

```
curl -X POST https://api.repull.dev/v1/connect \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "X-Workspace-Id: 1204" \
  -H "Content-Type: application/json" \
  -d '{ "redirectUrl": "https://app.example.com/connected" }'
```

## List your workspaces

```
curl "https://api.repull.dev/v1/workspaces?externalRef=acct_8812" \
  -H "Authorization: Bearer sk_live_YOUR_KEY"

# → { "data": [ { "workspaceId": "1204", "name": "Seaside Rentals", "externalRef": "acct_8812",
#                 "createdVia": "connect", "active": true, "createdAt": "…" } ],
#     "pagination": { "nextCursor": null, "hasMore": false, "total": 1 } }
```

Newest first, 25 per page by default (up to 100 with `limit`). Page with `cursor`.

## Offboard a customer

When a customer leaves, deactivate their workspace. Every account still connected in it is disconnected, its listings are switched off so they stop counting toward your plan, and the workspace is marked inactive. Nothing is deleted and nothing changes on the channels themselves. Calling it again is safe.

```
curl -X POST https://api.repull.dev/v1/workspaces/1204/deactivate \
  -H "Authorization: Bearer sk_live_YOUR_KEY"

# → { "data": { "workspaceId": "1204", "active": false, "deactivatedAt": "…", "alreadyInactive": false,
#               "disconnected": [ { "provider": "airbnb", "accountId": "79730216" } ],
#               "listingsDeactivated": [ "30594", "30595" ] } }
```

If they come back, reactivate it. The listings the deactivation switched off come back on and count toward your plan again, so a reactivation that would go over your listing cap is refused with `402 listings_limit_exceeded`. Accounts stay disconnected: start a Connect session with `X-Workspace-Id` so your customer can reconnect each one.

```
curl -X POST https://api.repull.dev/v1/workspaces/1204/reactivate \
  -H "Authorization: Bearer sk_live_YOUR_KEY"
```

## Routing events to a workspace

Register your endpoints once, on your own workspace. Events from every customer workspace are delivered there, and each one carries a top-level `workspaceId` naming the workspace it came from, so you can route it to the right customer.

```
{
  "event": "reservation.created",
  "eventId": "3f1c9a2e-8b7d-4c6a-9e0f-1a2b3c4d5e6f",
  "apiVersion": "2026-04",
  "timestamp": "2026-05-01T12:34:56.000Z",
  "account": { "id": 135, "provider": "airbnb", "externalAccountId": "79730216" },
  "workspaceId": 1204,
  "data": { /* per-event payload */ }
}
```

- Events from your own workspace don't have `workspaceId` at all.
- It is the `workspaceId` you got from `POST /v1/connect` and `GET /v1/workspaces`, but those return a string (`"1204"`) and the event carries a JSON number (`1204`). Compare as strings: `String(event.workspaceId)`.

See [Webhooks](https://repull.dev/docs/webhooks-introduction.md#routing-events-to-a-workspace).

## Plan, limits and billing

- Customer workspaces run on **your** plan. They don't need a plan of their own.
- Their active listings and API requests count toward your plan's limits, together with your own.
- Their listings are billed on your subscription, as part of your per-listing total.
- Requests are made with your API key, so the [per-key rate limit](https://repull.dev/docs/rate-limits.md) is shared across all your workspaces.

> **Note: Moving customers off another PMS?**
>
> Use [Repull Migrate](https://repull.dev/docs/migrate.md) instead: the same workspace, plus migration wording on the Connect pages and a live import progress screen. Every migrate workspace also appears in `GET /v1/workspaces`.
