List all messages from a chat

GEThttps://api.postpress.ai/v1/chats/{chat_id}/messages

Return a paginated list of messages in a chat. Optional filters narrow the range by date or sender.

Authorization

X-API-KEYstringrequired
API key from your postpress dashboard. Sent as a request header.

Path parameters

chat_idstringrequired
The id of the chat whose messages should be returned.

Query parameters

cursorstringoptional
Pagination cursor returned by the previous page. Length ≥ 1.
beforestringoptional
ISO 8601 UTC datetime. Returns messages created strictly before this moment.
afterstringoptional
ISO 8601 UTC datetime. Returns messages created strictly after this moment.
limitintegeroptional
Page size. Between 1 and 250. Default 100.
sender_idstringoptional
Filter to messages from a specific sender id.

Response 200 OK

objectstringMessageListrequired
itemsarray of objectsrequired
Messages on this page, ordered by timestamp.
items array
objectstringMessagerequired
idstringlength ≥ 1required
postpress message id.
message_idstringlength ≥ 1
Alias of `id` returned by some providers.
provider_idstringrequired
Provider-native message id.
account_idstringlength ≥ 1required
chat_idstringlength ≥ 1required
chat_provider_idstringrequired
sender_idstringrequired
sender_attendee_idstringlength ≥ 1required
timestampstringrequired
textstringrequired
Nullable when the message has no text body.
is_sendernumberrequired
01
1 if the connected account sent the message.
attachmentsarray of objectsrequired
Each attachment is one of the variants below.
attachments array
imgobject
Image attachment.
img object
idstringrequired
typestringrequired
file_sizenumber
unavailablebooleanrequired
mimetypestring
urlstring
url_expires_atnumber
sizeobjectrequired
size object
widthnumberrequired
heightnumberrequired
stickerbooleanrequired
videoobject
Video attachment.
video object
idstringrequired
typestringrequired
file_sizenumber
unavailablebooleanrequired
mimetypestring
urlstring
url_expires_atnumber
sizeobjectrequired
size object
widthnumberrequired
heightnumberrequired
gifbooleanrequired
audioobject
Audio attachment.
audio object
idstringrequired
typestringrequired
file_sizenumber
unavailablebooleanrequired
mimetypestring
urlstring
url_expires_atnumber
durationnumber
voice_notebooleanrequired
fileobject
Generic file attachment.
file object
idstringrequired
typestringrequired
file_sizenumber
unavailablebooleanrequired
mimetypestring
urlstring
url_expires_atnumber
file_namestringrequired
linkedin_postobject
LinkedIn post attachment.
linkedin_post object
idstringrequired
typestringrequired
file_sizenumber
unavailablebooleanrequired
mimetypestring
urlstring
url_expires_atnumber
video_meetingobject
Video meeting attachment.
video_meeting object
idstringrequired
typestringrequired
file_sizenumber
unavailablebooleanrequired
mimetypestring
urlstring
url_expires_atnumber
starts_atnumberrequired
Unix epoch; nullable.
expires_atnumberrequired
Unix epoch; nullable.
time_rangenumberrequired
Duration in seconds; nullable.
quotedobject
The message this one quotes, when applicable.
quoted object
message_idstringlength ≥ 1
postpress message id.
provider_idstringrequired
sender_idstringrequired
textstringrequired
Nullable when the quoted message has no text.
attachmentsarray of objectsrequired
Each attachment is one of the variants below.
attachments array
imgobject
Image attachment.
img object
idstringrequired
typestringrequired
file_sizenumber
unavailablebooleanrequired
mimetypestring
urlstring
url_expires_atnumber
sizeobjectrequired
size object
widthnumberrequired
heightnumberrequired
stickerbooleanrequired
videoobject
Video attachment.
video object
idstringrequired
typestringrequired
file_sizenumber
unavailablebooleanrequired
mimetypestring
urlstring
url_expires_atnumber
sizeobjectrequired
size object
widthnumberrequired
heightnumberrequired
gifbooleanrequired
audioobject
Audio attachment.
audio object
idstringrequired
typestringrequired
file_sizenumber
unavailablebooleanrequired
mimetypestring
urlstring
url_expires_atnumber
durationnumber
voice_notebooleanrequired
fileobject
Generic file attachment.
file object
idstringrequired
typestringrequired
file_sizenumber
unavailablebooleanrequired
mimetypestring
urlstring
url_expires_atnumber
file_namestringrequired
linkedin_postobject
LinkedIn post attachment.
linkedin_post object
idstringrequired
typestringrequired
file_sizenumber
unavailablebooleanrequired
mimetypestring
urlstring
url_expires_atnumber
video_meetingobject
Video meeting attachment.
video_meeting object
idstringrequired
typestringrequired
file_sizenumber
unavailablebooleanrequired
mimetypestring
urlstring
url_expires_atnumber
starts_atnumberrequired
Unix epoch; nullable.
expires_atnumberrequired
Unix epoch; nullable.
time_rangenumberrequired
Duration in seconds; nullable.
is_forwardedboolean
True if the message was forwarded.
reactionsarray of objectsrequired
Reactions left on the message.
reactions array
valuestringrequired
Unicode emoji of the reaction.
sender_idstringrequired
is_senderbooleanrequired
seennumberrequired
01
seen_byobjectrequired
Map of attendee id -> seen timestamp (string) or boolean.
seen_by object
<attendee_id>string or boolean
Per-attendee read receipt.
hiddennumberrequired
01
deletednumberrequired
01
editednumberrequired
01
is_eventnumberrequired
01
deliverednumberrequired
01
behaviornumberrequired
Provider-specific behavior code; nullable.
event_typenumber
012345678910111213
Provider event code when `is_event` is 1.
originalstringrequired
Original raw payload as returned by the provider.
repliesnumber
Number of replies in a thread.
reply_byarray of strings
Attendee ids that have replied.
reply_by array
<attendee_id>string
parentstringlength ≥ 1
Parent message id for threaded replies.
subjectstring
Message subject; nullable.
message_typestring
MESSAGEINVITATIONINMAILINMAIL_DECLINEINMAIL_REPLYINMAIL_ACCEPT
attendee_typestring
MEMBERORGANIZATIONOTHER
attendee_distancenumber
1234-1
LinkedIn-style connection distance.
sender_urnstring
reply_toobject
The message this one replies to, when applicable.
reply_to object
idstringlength ≥ 1required
provider_idstringrequired
timestampstringrequired
sender_attendee_idstringlength ≥ 1required
sender_idstringrequired
textstringrequired
Nullable.
cursorstringrequired
Cursor for the next page; `null` when there are no more results.

Example request

curl --request GET \
  --url 'https://api.postpress.ai/api/v1/chats/chat_01HXYZ4QK3WJ8FN3M6QH7TZ8GR/messages?limit=100' \
  --header 'X-API-KEY: pp_live_...' \
  --header 'accept: application/json'

Example response

{
  "object": "MessageList",
  "items": [
    {
      "object": "Message",
      "id": "msg_01HXYZ4QK3WJ8FN3M6QH7TZ8GR",
      "provider_id": "urn:li:msg:2-NTRkZDA4...",
      "account_id": "acc_01HXYZ4QK3WJ8FN3M6QH7TZ8GR",
      "chat_id": "chat_01HXYZ4QK3WJ8FN3M6QH7TZ8GR",
      "chat_provider_id": "2-NTRkZDA4M2QtZDcxZS00YzY5...",
      "sender_id": "ACoAACr-1eYBl...",
      "sender_attendee_id": "att_01HXYZ4QK3WJ8FN3M6QH7TZ8GR",
      "timestamp": "2026-05-17T09:42:11.000Z",
      "text": "Sounds good - let's chat tomorrow.",
      "is_sender": 0,
      "attachments": [],
      "reactions": [],
      "seen": 1,
      "seen_by": { "att_01HXYZ4QK3WJ8FN3M6QH7TZ8GR": true },
      "hidden": 0,
      "deleted": 0,
      "edited": 0,
      "is_event": 0,
      "delivered": 1,
      "behavior": 0,
      "original": "{...raw provider payload...}"
    }
  ],
  "cursor": "eyJza2lwIjoxMDB9"
}

Errors

Every error response follows the same envelope:

titlestringrequired
Short error title.
detailstringoptional
Human-readable explanation.
instancestringoptional
Request identifier for support.
typestringrequired
Error type identifier.
statusnumberrequired
HTTP status code.
401 Unauthorized13 types

Credentials are missing, expired, or otherwise invalid.

  • errors/missing_credentials - Some credentials are necessary to perform the request.
  • errors/multiple_sessions - LinkedIn limits multiple sessions on certain Recruiter accounts. Use the cookie connection method.
  • errors/invalid_checkpoint_solution - The checkpoint resolution did not pass successfully. Retry.
  • errors/invalid_proxy_credentials - The provided proxy credentials are invalid.
  • errors/checkpoint_error - The checkpoint does not appear to be resolvable.
  • errors/invalid_credentials - The provided credentials are invalid.
  • errors/expired_credentials - Credentials have expired. Reconnect the account.
  • errors/insufficient_privileges - This resource is out of your API-key scopes.
  • errors/disconnected_account - The account is disconnected from the provider service.
  • errors/disconnected_feature - The service you're trying to reach is disconnected.
  • errors/invalid_credentials_but_valid_account_imap - IMAP/SMTP credentials are invalid but the account is otherwise valid.
  • errors/expired_link - This link has expired. Generate a new one.
  • errors/wrong_account - The provided credentials do not match the correct account.
403 Forbidden9 types

Authenticated but the account is restricted or the action is not allowed.

  • errors/account_restricted - The account has been restricted by the provider.
  • errors/account_mismatch - This action cannot be done with your account.
  • errors/insufficient_permissions - Valid authentication but insufficient permissions to perform the request.
  • errors/session_mismatch - Token user id does not match client session id.
  • errors/feature_not_subscribed - The requested feature has not been subscribed or authenticated properly.
  • errors/subscription_required - A subscription is required to use this feature.
  • errors/unknown_authentication_context - An additional step seems necessary to complete login.
  • errors/action_required - An additional step is required.
  • errors/resource_access_restricted - You don't have access to this resource.
404 Not Found2 types

The chat id does not match any chat visible to this API key.

  • errors/resource_not_found - The requested resource was not found.
  • errors/invalid_resource_identifier - The provided identifier is not a valid chat id.
500 Internal Server Error3 types

Something went wrong on our side or with the upstream provider.

  • errors/unexpected_error - Something went wrong.
  • errors/provider_error - The provider is experiencing operational problems. Retry later.
  • errors/authentication_intent_error - The current authentication intent was killed after failure.
503 Service Unavailable5 types

postpress is temporarily unable to handle the request.

  • errors/no_client_session - No client session is currently running.
  • errors/no_channel - No channel to client session.
  • errors/no_handler - Handler missing for that request.
  • errors/network_down - Network is down on the server side. Retry shortly.
  • errors/service_unavailable - Service temporarily unavailable. Retry later.
504 Gateway Timeout1 types

The upstream provider did not respond in time.

  • errors/request_timeout - Request timed out. Retry, and contact support if it persists.
Updated May 2026