---
title: "Get all messages"
method: GET
path: "/chat-app/messages/{chatId}"
tags: ["💬 Chat App"]
---

# Get all messages

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

This API endpoint enables logged-in users to retrieve a comprehensive list of messages by providing the unique `chatId` as a parameter.

This API empowers developers to efficiently access and display all messages associated with a specific chat, facilitating seamless communication history exploration within their applications.

## Response `200`

Get all messages

- object
  - `data` object[]
    - `__v` number
    - `_id` string
    - `chat` string
    - `content` string
    - `createdAt` string
    - `file` unknown
    - `files` object[]
      - `_id` string
      - `localPath` string
      - `url` 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/revisions/a9f3a290e4dc/schema)
