---
title: "List messages in a chat"
method: GET
path: "/v1/{account_id}/chats/{chat_id}/messages"
tags: ["Messaging"]
---

# List messages in a chat

`GET /v1/{account_id}/chats/{chat_id}/messages`

## Request

- Base URL: `https://api.curviate.com`
- URL: `https://api.curviate.com/v1/{account_id}/chats/{chat_id}/messages`
- Auth: HTTP bearer

Returns a paginated list of messages for the specified chat. Supports filtering by sender (`user_id`), date range, and pagination cursor.

## Path parameters

- `account_id` string, required
- `chat_id` string, required

## Query parameters

- `mode` 'live' | 'auto' | 'refill' | 'cache_only'
- `max_age` integer
- `user_id` string
- `before` string
- `after` string
- `limit` integer
- `cursor` string
- `expand` string

## Response `200`

A page of messages from the chat, newest first. Full message text is returned verbatim (content pass-through). `source` says whether the page came from Curviate's stored copy or from a fresh fetch, and `observed_at` says when the chat was last read end to end; a stored answer also carries an `Age` header and always sets `cursor` to null, because a page is served from the store only when it is the whole answer. Narrowing the request with `user_id`, `before`, `after` or a `cursor` always fetches.

- object
  - `object` 'message_list': Response type discriminator.
  - `items` object[]
    - `object` 'message': Response type discriminator.
    - `quoted` Message: A message. `quoted` carries the message this one quotes, when it quotes one; a quoted message has the same shape and may itself carry a `quoted`.
      - `object` 'message': Response type discriminator.
      - `quoted` Message (recursive)
      - `id` string: Message identifier.
      - `account_id` string: Account id that owns this message.
      - `chat_id` string: Chat this message belongs to.
      - `sender_id` string: Identifier of the sender.
      - `text` string, nullable: Full message text. Curviate does not keep it on the way out; reading a conversation back stores its message bodies in your tenant's inbox records, with no expiry.
      - `attachments` object[]: Attachment descriptors (no bytes, use the attachment endpoint to download).
        - `id` string: Attachment identifier.
        - `mimetype` string: MIME type of the attachment.
        - `type` string: Attachment kind: file | img | video | audio.
        - `filename` string: Original file name.
        - `file_size` number: Size in bytes.
        - `unavailable` boolean, nullable: True when the attachment is no longer available.
      - `timestamp` string: ISO-8601 UTC send timestamp.
      - `is_sender` boolean: True if the connected account sent this message. Omitted when Curviate cannot yet identify the connected account; treat a missing value as unknown, not as received.
      - `is_seen` boolean
      - `is_delivered` boolean
      - `is_edited` boolean
      - `is_mentionned` boolean: True if the account is mentioned in this message.
      - `reactions` object[]: Per-type reaction breakdown on the message.
        - `type` string
        - `count` number
      - `reaction_count` number: Total reaction count across all types (derived).
      - `provider` string: The platform this message originates from.
      - `specifics` object: Platform-specific detail on the message. Carries `subject` for an InMail, which is set on the thread's opening message; absent or empty for an ordinary message.
        - `subject` string, nullable: The message's subject line, when the platform carries one on this message. Typically an InMail opener, but an ordinary message sent with a subject carries one too. Reading a conversation back stores the subject in your tenant's inbox records alongside the body, with no expiry.
      - `sender` object: The sender's profile, when the platform returned one alongside the message. sender_id always carries the identifier; this object carries the rest of what is known about that person.
        - `id` string: Identifier of the counterpart.
        - `type` string: individual | organization.
        - `display_name` string
        - `profile_url` string
        - `public_picture_url` string
        - `public_identifier` string, nullable: The vanity slug from the profile URL, for example jane-smith. Present only when the request asks for it with expand=public_identifier, and then always present, carrying the slug or null when the platform surfaces none for this person.
        - `specifics` object: Platform-enriched detail about the sender (for example connection distance, premium or verified status), when the platform returns it.
    - `id` string: Message identifier.
    - `account_id` string: Account id that owns this message.
    - `chat_id` string: Chat this message belongs to.
    - `sender_id` string: Identifier of the sender.
    - `text` string, nullable: Full message text. Curviate does not keep it on the way out; reading a conversation back stores its message bodies in your tenant's inbox records, with no expiry.
    - `attachments` object[]: Attachment descriptors (no bytes, use the attachment endpoint to download).
      - `id` string: Attachment identifier.
      - `mimetype` string: MIME type of the attachment.
      - `type` string: Attachment kind: file | img | video | audio.
      - `filename` string: Original file name.
      - `file_size` number: Size in bytes.
      - `unavailable` boolean, nullable: True when the attachment is no longer available.
    - `timestamp` string: ISO-8601 UTC send timestamp.
    - `is_sender` boolean: True if the connected account sent this message. Omitted when Curviate cannot yet identify the connected account; treat a missing value as unknown, not as received.
    - `is_seen` boolean
    - `is_delivered` boolean
    - `is_edited` boolean
    - `is_mentionned` boolean: True if the account is mentioned in this message.
    - `reactions` object[]: Per-type reaction breakdown on the message.
      - `type` string
      - `count` number
    - `reaction_count` number: Total reaction count across all types (derived).
    - `provider` string: The platform this message originates from.
    - `specifics` object: Platform-specific detail on the message. Carries `subject` for an InMail, which is set on the thread's opening message; absent or empty for an ordinary message.
      - `subject` string, nullable: The message's subject line, when the platform carries one on this message. Typically an InMail opener, but an ordinary message sent with a subject carries one too. Reading a conversation back stores the subject in your tenant's inbox records alongside the body, with no expiry.
    - `sender` object: The sender's profile, when the platform returned one alongside the message. sender_id always carries the identifier; this object carries the rest of what is known about that person.
      - `id` string: Identifier of the counterpart.
      - `type` string: individual | organization.
      - `display_name` string
      - `profile_url` string
      - `public_picture_url` string
      - `public_identifier` string, nullable: The vanity slug from the profile URL, for example jane-smith. Present only when the request asks for it with expand=public_identifier, and then always present, carrying the slug or null when the platform surfaces none for this person.
      - `specifics` object: Platform-enriched detail about the sender (for example connection distance, premium or verified status), when the platform returns it.
  - `cursor` string, nullable: Next-page cursor; follow until items is empty.
  - `notices` object[]: Present only when expand=public_identifier was asked for and some people on this page went unresolved for a reason the payload cannot show: more of them needed a profile lookup than one request performs, the account is outside its activity window at this hour and enforces it, or the account's profile_views budget is at its configured ceiling and enforces that. Absent whenever there is nothing to report, so a response that resolved everyone carries no such key. Branch on each entry's code, never on its message.
    - `code` 'EXPANSION_LIMIT_REACHED' | 'EXPANSION_WITHHELD_ACTIVITY_WINDOW' | 'EXPANSION_WITHHELD_CEILING', required: EXPANSION_LIMIT_REACHED: more people on this page needed a profile lookup than one request performs, so the ones past the budget carry public_identifier null without ever having been looked up. Their null therefore does not mean the person has no public profile. Ask for a smaller page to resolve everyone. EXPANSION_WITHHELD_ACTIVITY_WINDOW: the profile lookups this page needed were refused because the account is outside its activity window at this hour and enforces it, so those people carry public_identifier null and their null does not mean they have no public profile either. Ask again inside the window, or widen the window on this account's safety policy. EXPANSION_WITHHELD_CEILING: the profile lookups this page needed were refused because the account's profile_views budget is at its configured ceiling and it enforces that, so those people carry public_identifier null and their null does not mean they have no public profile either. Raise the profile_views ceiling on this account's safety policy, or ask for a smaller page.
    - `message` string, required: One sentence explaining the condition and how to resolve it.
    - `field` string: The request field the notice is about, here expand.
    - `value` string: The expansion the notice is about, here public_identifier.
  - `observed_at` string, required: ISO-8601 timestamp for when this data was observed on LinkedIn. On a live fetch this is the time of the fetch; on a stored answer it is when the data was actually seen, not when you asked for it.
  - `source` 'store' | 'live', required: Whether this answer came from Curviate's stored copy or from a fresh LinkedIn fetch. A stored answer costs the connected account nothing and is never surfaced to the person being read. It also carries less: fields Curviate does not retain (message bodies, notes, attachments, third-party contact details) are only ever present on a live fetch. Pass mode=live when you need them.
  - `withdrawn` boolean, required: Whether LinkedIn has told us this resource no longer exists, such as a removed profile. When true, the answer above is the copy Curviate still holds and must not be treated as current. Always present; false is the normal case.
  - `withdrawn_at` string: ISO-8601 timestamp for when a fetch MOST RECENTLY found this resource gone on LinkedIn. Every later fetch that finds it gone again moves it. Present only when withdrawn is true.
  - `safety_warning` SafetyWarning: Present on a successful response when this account crossed an account-safety ceiling while the affected budget row is on the default warn posture. The action still happened. Field-identical to the BUDGET_EXHAUSTED error body except that blocked is false and hint.message describes the outcome, so one branch handles both postures and switching the account to enforce is a configuration change rather than a client rewrite.
    - `row` string, nullable, required: The budget row that breached, for example profile_views or pending_invites. Null when the breach is not about a row: an activity_window warning on an action that spends no budget of its own (editing a message, dismissing a notification, a Recruiter or Sales Navigator admin action) is still governed by the hours the account works in. Read hint.parameter for what to change; whenever this is null it names posture, because the activity window edges are set per action type and this action has none, so the levers that reach it are the account timezone and posture.
    - `reset_at` string, nullable, required: The instant the refusal lifts: the window roll on a ceiling refusal, the next window open on an activity-window one. Null in the two cases no clock frees, the pending_invites gauge and InMail credits (row inmail).
    - `hint` object, required
      - `parameter` string, required: The settable parameter on PATCH /v1/{account_id}/safety-policy.
      - `message` string, required: What the condition is and what changing that parameter would do. This is the one field whose text differs from the BUDGET_EXHAUSTED refusal: here it says the action went through, and on a ceiling breach how far past the ceiling this row now stands, rather than telling you to set posture to warn when it already is. Branch on parameter, reason and blocked, never on this text.
    - `reason` 'ceiling' | 'activity_window', required: Which rule was crossed. ceiling means the row's configured limit is spent; activity_window means the account is outside the hours it works in, which is a different fact with a different remedy. hint.parameter names the right setting for each.
    - `blocked` boolean, required: Always false here. True on the BUDGET_EXHAUSTED refusal carrying the same payload.

## Other responses

- `400`: limit out of range (1-25), malformed cursor, or invalid before/after datetime. INVALID_REQUEST also covers `mode=cache_only` sent together with `max_age`, and either parameter sent more than once, in either order.
- `401`: Missing or invalid API key.
- `404`: The chat does not exist for this account. An id whose connection was replaced or removed also stops resolving here, and it is already absent from the list, so re-read `GET /v1/accounts` for the current id.
- `422`: `mode=cache_only` and this chat's messages cannot be answered from the stored copy (NOT_STORED): either no complete read of the chat has been observed, or the request narrows the page in a way the stored copy cannot reproduce. Not a 404: the chat may exist. Re-read with `mode=refill`, `auto` or `live`, without the narrowing parameters.
- `429`: Rate limited.
- `500`: Internal error.
- `502`: A temporary error occurred. Please try again. Under `mode=cache_only` this specifically means the stored copy could not be read: no request was made to LinkedIn, and the same read is worth retrying.
- `503`: Service unavailable.
- `504`: Gateway timeout.

---

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