---
title: "List messages in a conversation"
method: GET
path: "/v1/{appId}/conversations/{conversationId}/messages"
tags: ["Messages"]
---

# List messages in a conversation

`GET /v1/{appId}/conversations/{conversationId}/messages`

## Request

- Base URL: `https://api.talkjs.com`
- URL: `https://api.talkjs.com/v1/{appId}/conversations/{conversationId}/messages`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
- TypeScript: <https://skmtc.dev/talkjs/apis/talkjs-api/docs/v1/:appId/conversations/:conversationId/messages/get.ts> (a function with typed inputs; its response is checked against the schema)

Lists messages in a specific conversation.

## Path parameters

- `appId` string, required
- `conversationId` string, required

## Query parameters

- `startingAfter` string
- `limit` integer

## Response `200`

Messages listed successfully.

- Messages: A data object that wraps an array of messages from a conversation.
  - `data` Message[]: An array of messages from a conversation.
    - `id` string: An automatically generated unique identifier of this message.
    - `type` 'UserMessage' | 'SystemMessage': Whether this message is a [message](https://talkjs.com/docs/Reference/Concepts/Messages/) sent by a user, or a [system message](https://talkjs.com/docs/Reference/Concepts/System_Messages/).
    - `origin` 'web' | 'rest' | 'email' | 'import': Indicates how this message was sent. Possible origin options are: - web browser or mobile WebView (`"web"`) - REST API (`"rest"`) - reply-to-email (`"email"`) - REST API import operation (`"import"`)
    - `location` number[]: An array of two numbers that represent the longitude and latitude of a location, respectively. `location` is only given if the message's type is a shared location.
    - `text` string, nullable: Text of a message body. `text` is only given if the message type is text.
    - `custom` object: A custom object with key-value pairs that you want to associate with a message. Both keys and values must be strings. You can access a custom property in for example API responses, webhook events, and themes.
    - `attachment` object, nullable: An object with the dimensions, location, and filesize (in bytes) of a file attached to this message. `attachment` is a read-only property that is only given if a message is a file transfer.
      - `dimensions` object: The dimensions of the attachment in pixels.
        - `height` integer: The height of the attachment, in pixels.
        - `width` integer: The width of the attachment, in pixels.
      - `size` integer: The size of the attached file, in bytes.
      - `url` string: The URL where the attachment is stored.
    - `conversationId` string: Unique ID of the conversation this message is part of.
    - `createdAt` number, nullable: The time at which the message was posted. For welcome messages the timestamp is always `nil`.
    - `senderId` string, nullable: A unique identifier of the user who sent the message. For asystem messages the sender is always `nil`.
    - `editedAt` integer: Timestamp when this message was edited, expressed as the number of milliseconds since the UNIX epoch (1970-1-1, 00:00:00 UTC).
    - `referencedMessageId` string, nullable: Unique identifier of the message that this message is replying to. Referencing a message can be done via TalkJS UI.
    - `readBy` unknown[], nullable: An array of user IDs of users who have read this message. **Note:** `readBy` is only used for conversations with at most 300 participants. For conversations with 301 or more participants, the `readBy` field will be empty.
      - unknown

## Other responses

- `400`: Bad request
- `401`: Authorization information is missing or invalid.
- `404`: Resource not found
- `429`: Too many requests
- `500`: Internal server error

---

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