v51

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-014102371.0 MB
Webchat

End a webchat session.

Explicitly ends an active webchat session and returns the updated resource.

post/webchat_sessions/{id}/end

Path parameters

idstring uuid required

The unique identifier of the session. Returned from the POST /sessions response.

Response

Session ended successfully.

idstring uuid required

The unique identifier of the session, and the visitor's continuity token. Returned from the POST /sessions or GET /sessions response.

customer_idstring uuid required

The unique identifier of the associated customer. Returned from the GET /customers response.

widget_idstring uuid required

The widget this session belongs to. Returned from the POST /widgets or GET /widgets response.

status'active' | 'ended' required

The status of the session.

page_urlstring

The URL of the page the widget was embedded on when this session was created. Captured client-side from window.location.href at session-creation time; not re-captured on subsequent navigation within the same session.

referrerstring

document.referrer at session-creation time -- the page the visitor was on immediately before arriving at the page that embeds the widget. Distinct from page_url (the page the widget is currently embedded on). Captured client-side; not re-captured on subsequent navigation within the same session.

tm_last_activitystring date-time

Timestamp of the last activity on this session.

tm_createstring date-time

Timestamp when the session was created.

tm_updatestring date-time

Timestamp when the session was last updated.

tm_endstring date-time

Timestamp when the session ended.

Example response

{
  "id": "7a1bcb1a-1b8e-4f5c-9a6d-3e2f1a0b4c5d",
  "customer_id": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d",
  "widget_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "active",
  "page_url": "https://example.com/pricing",
  "referrer": "https://example.com/blog/some-article",
  "peer": {
    "type": "tel",
    "target": "+14155551234",
    "target_name": "John Smith",
    "name": "Main Office",
    "detail": "Primary contact number"
  },
  "local": {
    "type": "tel",
    "target": "+14155551234",
    "target_name": "John Smith",
    "name": "Main Office",
    "detail": "Primary contact number"
  },
  "tm_last_activity": "2026-01-15T09:30:00.000000Z",
  "tm_create": "2026-01-15T09:30:00.000000Z",
  "tm_update": "2026-01-15T09:30:00.000000Z",
  "tm_end": "2026-01-15T09:30:00.000000Z"
}