---
title: "Read messages in a conversation"
method: GET
path: "/linkedin/conversations/{conversationUrn}/messages"
tags: ["LinkedIn — Outreach"]
---

# Read messages in a conversation

`GET /linkedin/conversations/{conversationUrn}/messages`

## Request

- Base URL: `https://anjal.app`
- URL: `https://anjal.app/linkedin/conversations/{conversationUrn}/messages`
- Auth: API key in header `X-API-Key`

Read messages in one thread, most-recent first.

## URL-encode the path parameter

`conversationUrn` contains parens and colons — both are reserved
characters in URL paths. Always wrap in `encodeURIComponent()`
before constructing the URL:

```ts
const encoded = encodeURIComponent(conv.conversationUrn);
const r = await fetch(`/v1/linkedin/conversations/${encoded}/messages?sessionId=${sessionId}`);
```

## Response shape

Unlike `GET /linkedin/conversations`, this endpoint **does** return
`senderName` and `senderSlug` for most messages — LinkedIn embeds
the sender's display data in the message payload. They're still
nullable for system-generated messages (e.g. "X joined the
conversation"), so guard before rendering.

Field map (exact names, camelCase):

- `messageUrn`        — `urn:li:msg_message:(…)`. Stable identifier
                        for reaction / attachment lookups.
- `text`              — Plain text body. Empty string for attachment-
                        only messages (check `attachmentCount > 0`).
- `senderUrn`         — Profile URN. Null only on system messages.
- `senderName`        — Display name; usually `"First Last"`.
                        Nullable.
- `senderSlug`        — `linkedin.com/in/<slug>` segment. Nullable.
                        Useful when you want to build a profile URL
                        without a separate lookup.
- `isFromViewer`      — `true` when sent by the authenticated session
                        holder. Use this for left/right bubble layout.
- `deliveredAt`       — Unix **ms** (not seconds). Nullable.

## Worked example response

```json
{
  "ok": true,
  "conversationUrn": "urn:li:msg_conversation:(urn:li:fsd_profile:ACoAAA…,2-MWE…)",
  "messages": [
    {
      "messageUrn": "urn:li:msg_message:(urn:li:fsd_profile:ACoAAA…,2-MWE…)",
      "conversationUrn": "urn:li:msg_conversation:(urn:li:fsd_profile:ACoAAA…,2-MWE…)",
      "text": "Sure, happy to chat — Tuesday at 2pm work?",
      "deliveredAt": 1715990400000,
      "senderUrn": "urn:li:fsd_profile:ACoAAA…aaaa",
      "senderName": "Jane Doe",
      "senderSlug": "jane-doe-1a2b3c",
      "attachmentCount": 0,
      "reactionCount": 0,
      "isFromViewer": false
    },
    {
      "messageUrn": "urn:li:msg_message:(urn:li:fsd_profile:ACoAAA…,2-XYZ…)",
      "conversationUrn": "urn:li:msg_conversation:(urn:li:fsd_profile:ACoAAA…,2-MWE…)",
      "text": "Hey Jane — quick one about your team's cold outbound setup. Got 5 minutes this week?",
      "deliveredAt": 1715986800000,
      "senderUrn": "urn:li:fsd_profile:ACoAAA…me",
      "senderName": "Me",
      "senderSlug": "me-1a2b3c",
      "attachmentCount": 0,
      "reactionCount": 0,
      "isFromViewer": true
    }
  ]
}
```

## Path parameters

- `conversationUrn` string, required

## Query parameters

- `sessionId` string, required

## Response `200`

Thread messages, newest first.

- object
  - `ok` boolean
  - `conversationUrn` string
  - `messages` object[]
    - `messageUrn` string: `urn:li:msg_message:(…)`. Stable identifier.
    - `conversationUrn` string: Echoes the path parameter; convenient for downstream filtering.
    - `text` string: Plain text body. Empty string for attachment-only messages — check `attachmentCount > 0`.
    - `deliveredAt` integer, nullable: Unix **ms** (not seconds).
    - `senderUrn` string, nullable: Profile URN. Null only on system messages.
    - `senderName` string, nullable: Display name, typically `"First Last"`. Null on system messages.
    - `senderSlug` string, nullable: `linkedin.com/in/<slug>` segment. Build a profile URL with `https://www.linkedin.com/in/${senderSlug}/` instead of doing a separate lookup.
    - `attachmentCount` integer: Number of files/images in this message. Non-zero with empty `text` = attachment-only.
    - `reactionCount` integer: Total emoji reactions on this message.
    - `isFromViewer` boolean: `true` when sent by the authenticated session holder. Use this for left/right bubble layout rather than comparing `senderUrn` against the viewer URN.

---

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