Inbox bridges

Bring your own inbox. An inbox bridge connects another system's inbox (your CRM, a helpdesk, your team's own tools) to Pagebee's support inbox in both directions. Every conversation, message, status change and assignment is sent to your system as it happens, and your system replies, adds notes, closes and assigns through Pagebee. Replies reach the person through the messenger and by email, exactly as a reply written in Pagebee would, and show in Pagebee as sent by your teammate "via" the bridge.

Nobody has to sign in to two places, and Pagebee stays the source of truth.

This page is the bridge contract, version 2026-11-24. Every delivery and GET /v1/bridge carry the version, and a change that could break a receiver gets a new one.

Connect one

In the dashboard: Settings, Inbox bridges, Connect an inbox. Give it a name (shown on replies, like "Sam via NBS platform"), the URL Pagebee should post to, and optionally the one site or app it covers. You get two things:

  • The bridge token (pbb_...). Your system sends it to the bridge API. It's shown once; make a new one from the bridge's row if it's lost.
  • The signing secret (whsec_...). Your system checks every delivery with it. You can see it again from the bridge's row.

Keep both in your system's secret store, never in a repo.

Or let your agent do it: with a support or dev key, MCP has add_inbox_bridge, list_inbox_bridges, test_inbox_bridge and remove_inbox_bridge. The REST API has the same under /v1/bridges:

bash
curl -X POST https://api.pagebee.ai/v1/bridges \
  -H "Authorization: Bearer pb_ak_your_support_key" \
  -H "Content-Type: application/json" \
  -d '{"name":"NBS platform","url":"https://example.com/hooks/pagebee"}'
json
{
  "bridge": { "id": "6f1c...", "name": "NBS platform", "url": "https://example.com/hooks/pagebee", "site_ids": null, "paused": false, "token_hint": "pbb_...x9Qa", "contract": "2026-11-24" },
  "token": "pbb_...",
  "secret": "whsec_..."
}

Add "site_ids": ["<site id>"] to cover only some sites and apps. Leave it out to cover all of them, including ones you add later.

Press Test on the bridge (or call test_inbox_bridge) to send a signed bridge.test event and see what came back.

Events Pagebee sends

Each event is a POST to your URL with a JSON body:

json
{
  "id": "0b6e2f9c-6d0a-4a51-9a3e-2d4f6c1b8e21",
  "type": "message.created",
  "contract": "2026-11-24",
  "created_at": "2026-11-24T10:15:00.000Z",
  "workspace_id": "1a2b...",
  "bridge": { "id": "6f1c...", "name": "NBS platform" },
  "data": { "conversation": { }, "message": { } }
}
typeWhendata
conversation.createdSomeone writes in for the first time, or your team starts a conversationconversation, message (the first one)
message.createdA new message: from the person, a reply, an internal note, or a note from Pagebeeconversation, message
conversation.status_changedOpened, snoozed or closed. A person writing again reopens itconversation, from, to, actor
conversation.assignedAssigned, reassigned or unassignedconversation, from, to ({ id, name } or null), actor
conversation.updatedPriority, tags or subject changed, or the person left their emailconversation, changes (the fields), actor
conversation.deletedDeleted for good (an erasure request, or spam)conversation ({ id, property_id, deleted: true })
bridge.testThe test buttonmessage

actor is { id, name } for who made the change, or null when it was the person or Pagebee.

Changes your system makes through the bridge API are not sent back to it. Other bridges still hear about them.

The conversation

Every event (except conversation.deleted) carries the whole conversation as it is now:

json
{
  "id": "c0ffee00-...",
  "workspace_id": "1a2b...",
  "property": { "id": "9d8c...", "name": "Kiln", "domain": "kiln.example" },
  "environment": "production",
  "channel": "web",
  "status": "open",
  "priority": 0,
  "subject": null,
  "assignee": { "id": "nbs-user-1", "name": "Sam Lee" },
  "tags": ["billing"],
  "snoozed_until": null,
  "context": { "path": "/pricing", "pages": ["/", "/pricing"] },
  "contact": { "id": "...", "name": "Ada Lovelace", "email": "ada@example.com", "external_id": "user_42", "verified": true, "traits": { "plan": "pro" }, "last_seen_at": "..." },
  "last_message": { "author": "contact", "body": "My export is empty", "note": false, "created_at": "..." },
  "unread": true,
  "last_message_at": "...",
  "created_at": "...",
  "updated_at": "...",
  "pagebee_url": "https://pagebee.ai/w/your-team/inbox?c=c0ffee00-..."
}

property is the site or app it came in on. contact.email is there once the person has left one or your server identified them.

The message

json
{
  "id": "m1...",
  "conversation_id": "c0ffee00-...",
  "author": "contact",
  "author_ref": null,
  "body": "My export is empty",
  "note": false,
  "via": null,
  "created_at": "..."
}

author is contact (the person), teammate, bot or system. For a teammate, author_ref is { id, name }. note: true is an internal note the person never sees. via is { bridge_id, bridge_name } when it was posted through a bridge.

Headers

HeaderValue
Pagebee-Signaturet=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>" with the signing secret>
Pagebee-Event-IdThe event id, the same as id in the body
Pagebee-Event-TypeThe event type
Pagebee-Bridge-IdWhich bridge it's for, if one receiver serves several
Pagebee-Contract2026-11-24
Pagebee-Delivery-Attempt1 for the first try, then 2, 3 and so on

Checking the signature

Check the signature on the raw body before parsing it, and refuse anything older than five minutes:

ts
import crypto from "node:crypto";

export function verifyPagebee(header: string, rawBody: string, secret: string): boolean {
  const [, t, v1] = /^t=(\d+),v1=([0-9a-f]+)$/.exec(header) ?? [];
  if (!t || !v1 || Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
  const mac = crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
  return mac.length === v1.length && crypto.timingSafeEqual(Buffer.from(mac), Buffer.from(v1));
}

Answering, retries and duplicates

Answer with any 2xx within 10 seconds. Do the work after answering if it is slow.

Anything else (an error status, a timeout, a redirect) is tried again after 1, 5, 15 and 30 minutes, then 1, 2, 4 and 8 hours: nine tries over about 16 hours. After the last one the delivery is marked failed and kept, and you can send it again from the bridge's delivery log (one, or all failed ones at once).

Every try of an event sends the same event id. Keep the ids you have handled and ignore one you have seen, so a retry never adds a message twice. Message and conversation ids are stable too.

Events can arrive out of order when one is retried. Each one carries the conversation as it was when the event happened, with updated_at; keep the newest. If you need to be certain, read the conversation from the bridge API.

A paused bridge keeps its events and sends them when it's resumed. Delivered events are kept in the log for 30 days and failed ones for 90.

The bridge API

Your system calls these with the bridge token. It sees only the sites and apps the bridge covers.

bash
curl https://api.pagebee.ai/v1/bridge -H "Authorization: Bearer pbb_your_bridge_token"
Method and pathDoes
GET /v1/bridgeWho the bridge is: bridge, workspace, contract, events, signing_secret, and sites (each id, name, domain, kind)
GET /v1/bridge/conversationsConversations, newest activity first. status (open, snoozed, closed, all, default all), since (an ISO time, to catch up), limit (up to 100)
GET /v1/bridge/conversations/:idThe conversation and every message, notes included
POST /v1/bridge/conversations/:id/messagesA reply to the person, or an internal note (below)
PATCH /v1/bridge/conversations/:idStatus, assignment, priority and tags (below)

Reply or add a note

bash
curl -X POST https://api.pagebee.ai/v1/bridge/conversations/<id>/messages \
  -H "Authorization: Bearer pbb_your_bridge_token" \
  -H "Content-Type: application/json" \
  -d '{"body":"Fixed now, sorry about that","author":{"id":"u_17","name":"Sam Lee","email":"sam@yourteam.com"},"external_id":"your-message-id"}'
Field
bodyRequired. Up to 5,000 characters
authorRequired. { id, name }, with optional email and avatar_url. The person sees the first name
notetrue for an internal note, which is never shown to the person or emailed
external_idYour own id for the message. Posting the same one again returns the first and sends nothing twice

A reply reaches the person in their messenger at once, and by email if they left one and don't have the chat open (within the email limits). The answer is 201 with the message.

Status and assignment

bash
curl -X PATCH https://api.pagebee.ai/v1/bridge/conversations/<id> \
  -H "Authorization: Bearer pbb_your_bridge_token" \
  -H "Content-Type: application/json" \
  -d '{"status":"closed","assignee":{"id":"u_17","name":"Sam Lee"},"actor":{"id":"u_17","name":"Sam Lee"}}'
Field
statusopen, snoozed (with snoozed_until, an ISO time in the future) or closed
assignee{ id, name } from your system, or null to unassign
priority0 normal, 1 high
tagsThe whole list of tags
actorWho made the change, for other bridges and the record

Errors

Errors are { "error": "<code>", "message": "..." } with the status: 400 for a body that doesn't fit (details says which field), 401 for a token that isn't valid (replaced, or the bridge removed), 403 for a paused bridge, and 404 for a conversation the bridge can't see.

Managing bridges

With a support or dev key that covers every site (a key limited to some sites can't), or as a workspace admin in the dashboard:

Method and pathDoes
GET /v1/bridgesEvery bridge, with how deliveries are going (pending, failed, delivered_24h)
POST /v1/bridgesAdd one: name, url, optional site_ids
GET /v1/bridges/:idOne bridge
PATCH /v1/bridges/:idname, url, site_ids, paused
DELETE /v1/bridges/:idRemove it. The token stops working at once and its log is deleted. Conversations stay
GET /v1/bridges/:id/secretThe signing secret
POST /v1/bridges/:id/tokenA new token. The old one stops working at once
POST /v1/bridges/:id/testSend a bridge.test event now: ok, status, duration_ms, error
GET /v1/bridges/:id/deliveriesThe delivery log, newest first. status (pending, delivered, failed), limit
GET /v1/bridges/:id/deliveries/:deliveryOne delivery, with the body that was sent
POST /v1/bridges/:id/deliveries/:delivery/retrySend it again now, with a fresh set of retries
POST /v1/bridges/:id/retry-failedSend every failed delivery again

Bridges or webhooks

Webhooks are one-way and lighter: three event types, three retries, no log. Use a bridge when your system works the inbox, so replies, notes, status and assignment come back, and when you need every event to arrive.

MCP

ToolWhat it does
add_inbox_bridgeConnect another inbox: name, URL, optional sites. Returns the token and secret
list_inbox_bridgesEvery bridge and how deliveries are going; with bridge_id, its recent deliveries
test_inbox_bridgeSend a signed test event and say what came back
remove_inbox_bridgeDisconnect one

See MCP.