---
title: "Send a Copilot chat message"
method: POST
path: "/ai-chats/{chatId}/messages"
tags: ["AIChats", "Beta"]
---

# Send a Copilot chat message

`POST /ai-chats/{chatId}/messages`

## Request

- Base URL: `https://public.escape.tech/v3`
- URL: `https://public.escape.tech/v3/ai-chats/{chatId}/messages`
- Auth: API key in header `X-ESCAPE-API-KEY`

Append a user message to a Copilot chat owned by the authenticated user and return the assistant reply.

## Path parameters

- `chatId` string, uuid, required: The chat ID

## Request body

- object
  - `content` string, required: The content of the user message
  - `template` 'COPILOT' | 'DEFAULT': The chat template to use. Defaults to COPILOT.

## Response `200`

OK

- object
  - `id` string, uuid, required: The id of the message
  - `role` 'ASSISTANT' | 'SYSTEM' | 'TOOL' | 'USER', required: The role of the message author
  - `content` string, required: The message content
  - `createdAt` string, date-time, required: The date and time the message was created

## Other responses

- `400`: Bad Request
- `404`: Not found

---

[API](https://skmtc.dev/escape/apis/escape-public-api.md) - [All operations](https://skmtc.dev/escape/apis/escape-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/escape/apis/escape-public-api/revisions/2eab35df40c7?raw)
