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

# Retrieve a chat

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

## Request

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

Retrieves a single chat by ID, including the most recent message. Returns 404 RESOURCE_NOT_FOUND if the chat does not exist or belongs to another account.

## Path parameters

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

## Query parameters

- `expand` string
- `mode` 'live' | 'auto' | 'refill' | 'cache_only'
- `max_age` integer

## Response `200`

The chat's metadata and most-recent message. `source` says whether it came from Curviate's stored copy or from a fresh fetch, and `observed_at` says when it was seen; a stored answer also carries an `Age` header.

- object
  - `object` 'chat': Response type discriminator.
  - `id` string: Chat identifier.
  - `account_id` string: Account id that owns this chat.
  - `name` string, nullable: Chat display name, or null.
  - `type` '1to1' | 'group' | 'channel': Conversation type.
  - `is_group` boolean
  - `is_1to1` boolean
  - `is_channel` boolean
  - `is_pinned` boolean
  - `is_readonly` boolean
  - `is_archived` boolean: True if the chat is archived.
  - `muted_until` boolean: True if notifications for this chat are muted.
  - `unread_count` number: Number of unread messages in this chat.
  - `folders` string[]: Folder labels assigned to this chat.
  - `provider` string: The platform this chat originates from.
  - `created_at` string: ISO-8601 UTC creation timestamp.
  - `last_message_timestamp` string: ISO-8601 UTC timestamp of the last message.
  - `user_id` string: Identifier of the 1:1 counterpart.
  - `last_message` object: The most recent message in the chat. Subjects are not previewed here, read the chat's messages for one.
    - `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.
    - `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.
  - `user` object: The 1:1 counterpart's profile.
    - `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.
  - `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`: A query parameter failed validation. INVALID_REQUEST also covers `mode=cache_only` sent together with `max_age`: that mode never reaches LinkedIn at any age, so a freshness threshold cannot change its answer, and the pair is refused rather than one of the two being ignored. Either parameter sent more than once is refused for the same reason, 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`: Nothing is stored for this chat and `mode=cache_only` never fetches (NOT_STORED). Not the same as a 404: the chat may exist, and this API holds no copy of it. Re-read with `mode=refill` or `mode=auto` to fetch it.
- `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)
