Skip to main content

Co-browse API

Co-browse is the real-time twin of session replay. When a customer is stuck on your site, they start a co-browse session from the native chat widget; a support agent then joins from the inbox to watch the customer’s live page and, when the customer grants control, highlight elements, scroll, and assist with form fields. The page DOM is mirrored over a data channel — it is not a screen share, so off-screen content the agent was never shown is never transmitted, and the visitor can revoke at any time. This page documents the operator half: reading the session state, joining the live session, and ending it. The visitor starts and ends co-browse from the widget runtime — those calls are authenticated with the visitor’s widget token and are not part of this API key surface. Base path: /api/v1/cobrowse Authentication: API key (X-API-Key) or session JWT. Scopes & roles:
  • Reads (GET) require the conversations:read scope.
  • Writes — joining and ending a session — require the conversations:write scope and an owner, admin, or developer role.
A session is keyed by its conversationId — the conversation it belongs to. Sessions are tenant-scoped: you only ever see sessions on your own account’s conversations.

The session object

Every endpoint returns the current session under cobrowse, or null when the conversation has never started one.

Read the session state

Returns the current co-browse session stamped on the conversation, or null when no session has been started. The inbox detail panel polls this to decide whether to show the “Co-browse available” or “Co-browse live” affordance.
cobrowse is null when the conversation exists but carries no session. Requesting a conversation that isn’t in your account returns 404 NOT_FOUND. A malformed conversationId returns 422 VALIDATION_ERROR.

Join the session

Mints a data-channel join token for the agent so they can view — and, when the visitor granted control, guide — the customer’s live browser session. The call flips the session to active and stamps the agent and start time. Pass control: true to request guided control. The effective grant is the AND of your request and the visitor’s stored consent: if the visitor joined observe-only, the session can never be escalated to guided control, regardless of this flag. The grant is enforced when the token is minted, not just in the UI.
The body is optional; control defaults to false (observe-only).
Use token and ws_url to connect to the room with the orbit-media client SDK. The token expires after expires_in seconds (30 minutes); the SDK re-mints on reconnect by calling this endpoint again, which is idempotent on an already-active session — it re-stamps the agent without resetting started_at. control in the response is the effective grant after the visitor’s consent ceiling is applied.

End the session

Ends the co-browse session from the agent side: status becomes ended, with ended_at and ended_by: "agent" stamped. The call is idempotent — ending an already-ended session is a no-op and returns the same record. The visitor can independently end from the widget; either side ending stops the data room. To start co-browsing again, the visitor must re-initiate from the widget so consent is re-confirmed.
Returns 404 NOT_FOUND when the conversation — or its session — isn’t in your account.

See also