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-Idheader 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 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
workspaceIdnext 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 workspacebody 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.
Webhooks
Register your endpoints once, on your own workspace. Events from every customer workspace are delivered there, and each one carries the workspaceId it came from, so you can route it to the right customer. See Webhooks.
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 is shared across all your workspaces.
Moving customers off another PMS?
GET /v1/workspaces.