---
title: "Send a chat message"
method: POST
path: "/api/v1/ask-chat/{askWidgetId}/chat"
tags: ["Ask Chat"]
---

# Send a chat message

`POST /api/v1/ask-chat/{askWidgetId}/chat`

## Request

- Base URL: `https://brew.marketbrew.ai/api/v1`
- URL: `https://brew.marketbrew.ai/api/v1/api/v1/ask-chat/{askWidgetId}/chat`
- Auth: API key in header `API-Key`

Creates a new Ask conversation or continues an existing one for a configured Ask Widget.

## Path parameters

- `askWidgetId` integer, required

## Query parameters

- `websiteHost` string

## Headers

- `X-Ask-Session-Token` string

## Request body

- ChatRequest
  - `websiteHost` string
  - `conversationId` integer
  - `userMessage` string

## Response `200`

Chat response payload

- ChatResponse
  - `conversationId` integer
  - `assistantResponse` string
  - `chatBoxHTML` string
  - `metrics` object
  - `messageId` integer
  - `sources` AnswerSource[]
    - `citationNumber` integer
    - `title` string
    - `url` string
  - `followUps` string[]

## Other responses

- `402`: No active license or remaining entitlements for the Ask Widget on this site
- `429`: Public widget session or source IP exceeded its request rate
- `500`: Internal error processing the chat request
- `503`: Ask Widget is inactive or has no retrievable grounded corpus

---

[API](https://skmtc.dev/marketbrew/apis/market-brew-api-documentation.md) · [All operations](https://skmtc.dev/marketbrew/apis/market-brew-api-documentation/llms.txt) · [OpenAPI document](https://skmtc.dev/marketbrew/apis/market-brew-api-documentation/revisions/11e3674a43d7?raw)
