---
title: "Update Page Context"
method: POST
path: "/api/livechat/public/{widget_key}/page-context"
tags: ["livechat", "livechat"]
---

# Update Page Context

`POST /api/livechat/public/{widget_key}/page-context`

## Request

- Base URL: `https://api.dialogbrain.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.dialogbrain.com/api/livechat/public/{widget_key}/page-context`
- Auth: none declared. Required headers: `X-Session-Token`

Update page context for visitor session.

Called when the visitor navigates within an SPA.
Updates the session with new page URL and content.

## Path parameters

- `widget_key` string, required

## Headers

- `X-Session-Token` string, required

## Request body

- PageContextRequest: Request to update page context after SPA navigation.
  - `page_url` string, required
  - `page_title` string, nullable
  - `page_content` PageContent: Page content extracted from the widget's host page.
    - `url` string, required
    - `title` string, required
    - `description` string, nullable
    - `headings` string[]
    - `mainContent` string, nullable
    - `language` string, nullable
    - `timezone` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway.md) · [All operations](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/revisions/77bef09a9209?raw)
