---
title: "Send message"
method: POST
path: "/chat-app/messages/{chatId}"
tags: ["💬 Chat App"]
---

# Send message

`POST /chat-app/messages/{chatId}`

This API endpoint enables logged-in users to send messages to a specific chat identified by the provided `chatId` in the path variable.

By making a `POST` request to this endpoint, developers can seamlessly integrate message transmission functionality into their applications, allowing users to engage in real-time conversations within the designated chat. User can send image files as `attachments` as well (maximum 5 attachments are allowed)

## Response `201`

Send message

- object
  - `data` object
    - `__v` number
    - `_id` string
    - `attachments` object[]
      - `_id` string
      - `localPath` string
      - `url` string
    - `chat` string
    - `content` string
    - `createdAt` string
    - `sender` object
      - `_id` string
      - `avatar` object
        - `_id` string
        - `localPath` string
        - `url` string
      - `email` string
      - `username` string
    - `updatedAt` string
  - `message` string
  - `statusCode` number
  - `success` boolean

---

[API](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi.md) · [All operations](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hiteshchoudhary-ssesph/freeapi/versions/a9f3a290e4dc/schema)
