---
title: "V1 Chat"
method: POST
path: "/v1/chat"
tags: ["public-api"]
---

# V1 Chat

`POST /v1/chat`

## Request

- Base URL: `https://api.palisade.run` (the document declares no server; this is the origin it was published from)
- URL: `https://api.palisade.run/v1/chat`
- Auth: none declared

Stream a chat response as Server-Sent Events.

Returns text/event-stream with JSON payloads:
  - {"type": "status", "message": "..."}       — status updates
  - {"type": "narration", "content": "..."}     — narration text
  - {"type": "content", "content": "..."}       — assistant response
  - {"type": "properties", "properties": [...]} — property cards
  - {"type": "result_set", ...}                 — result set metadata
  - {"type": "escalation", ...}                 — escalation to agent
  - {"type": "callback_form", ...}              — callback form data
  - data: [DONE]                                — stream complete

## Query parameters

- `k` string, nullable

## Headers

- `authorization` string, nullable
- `x-api-key` string, nullable

## Request body

- V1ChatRequest
  - `message` string, required: The user's message as sent to the LLM (may include page-context prefix)
  - `conversation_id` string, nullable: Unique conversation ID. Generated server-side if omitted.
  - `conversation_history` V1ChatMessage[]: Prior messages in this conversation
    - `role` string, required: 'user' or 'assistant'
    - `content` string, required
    - `properties` object[], nullable
    - `result_set_id` string, nullable
    - `result_set_property_ids` integer[], nullable
    - `result_set_count` integer, nullable
  - `page_context` object, nullable: Optional context about the page the user is viewing
  - `user_message_id` string, nullable: UUID the client is using for this user message; server reuses it for analytics.
  - `assistant_message_id` string, nullable: UUID the client is using for the upcoming assistant message; server reuses it for analytics.
  - `raw_message` string, nullable: The user's message without page-context enrichment. Preferred for analytics storage.

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/palisade-run/apis/twiddy-chatbot-api.md) - [All operations](https://skmtc.dev/palisade-run/apis/twiddy-chatbot-api/llms.txt) - [OpenAPI document](https://skmtc.dev/palisade-run/apis/twiddy-chatbot-api/revisions/80ab7d8068c0?raw)
