Skip to main content

Cobrowse API

Cobrowse endpoints exposed by the Devotel CPaaS API Base path: /api/v1/cobrowse Endpoint count: 6

title: “Errors worth branching on” description: “Per-endpoint failure templates matching the envelope — what actually fires, what to retry, what to surface to the operator.”

Errors worth branching on

These five failures cover the session attach (POST /api/v1/cobrowse/sessions//host), on every operator join. Each block below is a full { error, meta } envelope as the API returns it, and the matrix at the bottom answers retry vs surface for the same five classes. For the platform-wide decision table these branches plug into, see the error handling guide.

401 — Unauthorized

A 401 on this page is the bearer key failing before the route ran — it never means the resource is wrong. Rotate the key or re-mint the scoped token; retrying the same request changes nothing.

403 — Forbidden

A 403 means the key authenticated but the operation is gated by scope — check the key’s scopes on the developer page; a 403 is never a data-not-found shape.

422 — Schema

A 422 means the payload did not match the request schema — branch on error.details.field and resend with a JSON object for visitor_context instead of blind-retrying the same body.

429 — Rate

The Retry-After header and error.details.retry_after are both set on every 429 — resend the SAME request after the lower of the two.

409 — Conflict

Reconnect the WebSocket instead of re-creating — the session is still live.

60-second retry matrix

SDK surface bridge — End a co-browse session, accept the pending join request, or join for real with the operator’s live key.

These three tabs mirror SDK status and coverage. Python fronts client.request, Go fronts client.Request, and TS fronts fetch-TS — each with the live key.

End the co-browse session

Accept the pending join request

Alias-wait the join queue




Get the co-browse session for a conversation

GET /api/v1/cobrowse/{conversationId}
Returns the current co-browse session stamped on the conversation (metadata.cobrowse), or null when no session has been initiated. The inbox detail panel polls this to render the ‘Co-browse available / live’ CTA and the agent join affordance.
string
required
—
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Get the co-browse capture-time privacy policy

GET /api/v1/cobrowse/privacy
Returns the tenant’s capture-side masking policy (mask_all_inputs, allowlist_selectors, block_selectors, blocked_input_types, unmask_on_visitor_click) that the co-browse capture client uses to redact PII in the visitor’s browser before publishing a DOM packet, and that the server uses to guard the agent control channel. Returns the default-deny policy when none has been configured.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Send a guided-control packet (highlight / scroll / form-fill)

POST /api/v1/cobrowse/{conversationId}/control
Broadcasts an agent-initiated control packet into the co-browse data room, after validating the target selector (and, for form-fill, the input type) against the tenant’s cobrowse_privacy policy. A packet targeting a blocked selector, an always-blocked region, or a password-type input is rejected with 403 and audit-logged — this hard floor cannot be relaxed by tenant config. Requires the visitor to have granted control on this session.
string
required
—
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.
string (enum: highlight|scroll|form_fill)
required
What the visitor’s browser renders. Only form_fill writes a value into the page.
string
required
CSS selector of the DOM node the packet targets. Refused with COBROWSE_CONTROL_BLOCKED when it falls inside a privacy-blocked region.
string
Type of the targeted input (form_fill only), so the password hard floor is enforced even when the selector carries no attribute hint.
string
Text to write into the visitor’s field. Sent for form_fill only; ignored for highlight and scroll.

End a co-browse session

POST /api/v1/cobrowse/{conversationId}/end
Terminates the co-browse session from the operator side (status=‘ended’, stamps ended_at + ended_by=‘agent’). Idempotent on an already-ended session. The visitor can independently end from the widget; either side ending stops the data room.
string
required
—
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Join a live co-browse session

POST /api/v1/cobrowse/{conversationId}/join
Mints an orbit-media data-channel join token for the operator so they can view (and, when the visitor granted control, guide) the customer’s live browser session. The effective control grant is the AND of the agent’s requested control and the visitor’s stored consent — an observe-only session can never be escalated to guided control. Flips the session to ‘active’ and stamps the agent + start time. 404 when no joinable session exists (the visitor must initiate from the widget first). 503 when the media plane is not configured.
string
required
—
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.
boolean
Request guided control (highlight / scroll / form-fill). Effective only when the visitor consented; otherwise the agent joins observe-only.

Update the co-browse capture-time privacy policy

PUT /api/v1/cobrowse/privacy
Upserts the tenant’s capture-side masking + control-channel guard policy. Inputs default-deny (mask_all_inputs defaults true; tel/email/cc blocked by default); selectors round-trip verbatim. password-type inputs and the built-in always-blocked selectors remain blocked regardless of this policy (hard floor). The change reaches new co-browse sessions via the next session-start bootstrap for both visitor and agent.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.