---
title: "Init Conversation"
method: POST
path: "/chat/init"
tags: ["Chat Widget"]
---

# Init Conversation

`POST /chat/init`

Initialize a new chat conversation.

Called by the widget when a user first opens it. Returns a session token,
conversation ID, widget theming config, and the greeting message.

## Request body

- ChatInitRequest
  - `firm_id` string, required — Embed identifier: a chat widget ID (new snippets) or a customer/firm ID (legacy snippets, resolves to the default widget)
  - `origin_url` string, nullable — Page URL where chat was started
  - `visitor_id` string, nullable — Persistent visitor identifier from localStorage for grouping conversations
  - `is_test` boolean — Whether this is a test conversation (excluded from pipeline/lead generation)
  - `visitor_language` string, nullable — Visitor's browser language tag (e.g., 'es-419'); resolved against the supported-language registry

## Response `200`

Successful Response

- ChatInitResponse
  - `conversation_id` string, uuid, required
  - `session_token` string, required
  - `greeting` AppChatSchemasMessageResponse, required
    - `id` string, uuid, required
    - `role` string, required
    - `content` string, required
    - `created_at` string, date-time, required
  - `widget_config` WidgetConfigResponse, required
    - `chat_widget_id` string, uuid, nullable
    - `firm_id` string, uuid, nullable
    - `accent_color` string, required
    - `secondary_color` string, nullable
    - `position` string, required
    - `greeting_message` string, required
    - `assistant_name` string, required
    - `enabled` boolean
    - `teaser_enabled` boolean
    - `teaser_message` string, nullable
    - `teaser_delay_seconds` integer
    - `show_online_status` boolean
    - `show_unread_badge` boolean
    - `tab_notification_enabled` boolean
    - `avatar_url` string, nullable
    - `avatar_video_url` string, nullable
    - `avatar_video_in_header` boolean
    - `launcher_avatar_enabled` boolean
    - `intro_video_enabled` boolean
    - `intro_video_url` string, nullable
    - `intro_video_autoplay_on_load` boolean
    - `attention_grabber_enabled` boolean
    - `attention_grabber_message` string, nullable
    - `attention_grabber_delay_seconds` integer
    - `idle_message` string, nullable
    - `idle_delay_seconds` integer, nullable
    - `quick_exit_enabled` boolean
    - `mobile_bottom_offset_px` integer, nullable
    - `default_language` string, nullable
  - `language_code` string

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/openintake/apis/fastapi.md) · [All operations](https://skmtc.dev/openintake/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openintake/fastapi/revisions/4a81645b59f6/schema)
