---
title: "Create Chat Message"
method: POST
path: "/chat/messages"
tags: ["chat"]
---

# Create Chat Message

`POST /chat/messages`

This will create and return a chat message chat item, however you should probably
use the websocket to receive chat items, not use this returned chat item directly.

## Response `200`

Successful Response

- ChatItem
  - `chat_item_id` string, uuid, required
  - `chat_message` ChatMessage
    - `chat_message_id` string, uuid, required
    - `user_id` string, required
    - `text` string, required
    - `user_profile` UserPublicProfile
      - `user_id` string, required
      - `username` string, nullable
      - `avatar_url` string, nullable
      - `member_since` string, date-time, nullable
    - `image_url` string, nullable
  - `chat_user_joined` ChatUserJoined
    - `chat_user_joined_id` string, uuid, required
    - `user_id` string, required
    - `user_profile` UserPublicProfile
      - `user_id` string, required
      - `username` string, nullable
      - `avatar_url` string, nullable
      - `member_since` string, date-time, nullable
  - `chat_system_message` ChatSystemMessage
    - `chat_system_message_id` string, uuid, required
    - `text` string, required
    - `link` string, required
  - `chat_user_activity` ChatUserActivity
    - `chat_user_activity_id` string, uuid, required
    - `activity_type` 'COMMENT', required
    - `transcript_id` string, nullable
    - `transcript_title` string, nullable
    - `user_profiles` UserPublicProfile[]
      - `user_id` string, required
      - `username` string, nullable
      - `avatar_url` string, nullable
      - `member_since` string, date-time, nullable
  - `created_at` string, date-time, required
  - `reactions` ChatReactions
    - `reactions_metadata` object, required

## Other responses

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

---

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