---
title: "Request Proactive Greeting"
method: POST
path: "/api/livechat/public/{widget_key}/proactive-greeting"
tags: ["livechat", "livechat"]
---

# Request Proactive Greeting

`POST /api/livechat/public/{widget_key}/proactive-greeting`

## 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}/proactive-greeting`
- Auth: none declared. Required headers: `X-Session-Token`

Request a proactive greeting for a visitor.

This endpoint is called by the widget after the configured delay
when the visitor has been on the page without interaction.

The greeting is:
1. Generated using AI based on page context
2. Kept in the session and pushed to the widget over its realtime channel
3. Written to the database as the chat's first row only when the visitor
   answers (no thread is made for a visitor who never writes)

Returns success=false with reason if:
- greeting_sent flag is already set in session
- proactive_greeting is disabled in widget config

## Path parameters

- `widget_key` string, required

## Headers

- `X-Session-Token` string, required

## Request body

- ProactiveGreetingRequest: Request to trigger a proactive greeting.
  - `language_hint` string, nullable

## Response `200`

Successful Response

- ProactiveGreetingResponse: Response after requesting proactive greeting.
  - `success` boolean, required
  - `message_id` string, nullable
  - `reason` string, nullable
  - `is_draft` boolean

## 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)
