---
title: "Add Chat Message"
method: POST
path: "/chat/sessions/{session_id}/messages"
tags: ["chat"]
---

# Add Chat Message

`POST /chat/sessions/{session_id}/messages`

## Request

- Base URL: `https://studio-api.meganova.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://studio-api.meganova.ai/chat/sessions/{session_id}/messages`
- Auth: OAuth 2
  - Password
  - Token URL: `auth/token`

## Path parameters

- `session_id` string, uuid, required

## Request body

- MessageCreate
  - `role` string
  - `content` string, required

## Response `200`

Successful Response

- Message
  - `role` string, required
  - `content` string, required
  - `id` string, uuid, required
  - `chat_id` string, uuid, required
  - `timestamp` string, date-time, required
  - `edited` boolean
  - `edited_at` string, date-time, nullable
  - `prev_id` string, uuid, nullable
  - `option` boolean, nullable
  - `stage_install_id` string, uuid, nullable

## Other responses

- `404`: Not found
- `422`: Validation Error

## Changes

- **2026-10-16** `c683584f6060`: 2 info
  - added the optional property `stage_install_id` to the response with the `200` status
  - the `role` response's property pattern `^(user|assistant|system|bot)$` was removed for the status `200`

[Operation history](https://skmtc.dev/meganova/apis/meganova-api/changes/chat/sessions/:session_id/messages/post.md)

---

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