---
title: "List messages"
method: GET
path: "/v1/social/chats/{chat_id}/messages"
tags: ["Direct Messages"]
---

# List messages

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

## Request

- Base URL: `https://apihub.co.il`
- URL: `https://apihub.co.il/v1/social/chats/{chat_id}/messages`
- Auth: HTTP bearer

Returns a paginated list of messages in a chat, ordered by external_posted_at descending (pending outbound messages without external_posted_at are ordered by created_at).

**Billing:** Read request · **Rate limit:** 120/min

## Path parameters

- `chat_id` string, required: Chat ID — accepts the Postproxy hashid or the platform's external_conversation_id

## Query parameters

- `page` integer: Page number (1-based). Passing 0 returns page 1.
- `status` 'pending' | 'published' | 'failed_waiting_for_retry' | 'failed' | 'received': Filter by message status
- `per_page` integer: Number of items per page.
- `direction` 'inbound' | 'outbound': Filter by direction: inbound or outbound

## Headers

- `Idempotency-Key` string
- `X-Tag` string

## Response `200`

Completed

- object
  - `id` string: Execution id — stable across internal retries; use it with GET /v1/executions/{id}
  - `status` 'pending' | 'processing' | 'completed' | 'partial' | 'failed' | 'cancelled' | 'timeout'
  - `operation` string
  - `tag` string, nullable: Your X-Tag, if sent
  - `created_at` string, date-time
  - `completed_at` string, date-time, nullable
  - `output` object: Paginated list of messages in a chat.
    - `data` object[]
      - `id` string: Message hashid
      - `body` string, nullable: Message text
      - `card` object, nullable: Facebook and Instagram only — the card fields (subtitle, image_url, default_action) sent alongside buttons
      - `status` 'pending' | 'published' | 'failed_waiting_for_retry' | 'failed' | 'received': pending/published/failed_waiting_for_retry/failed for outbound, received for inbound
      - `buttons` object[], nullable: Facebook and Instagram only — the buttons attached to the message
        - `url` string: Required for web_url buttons, must be an https:// URL
        - `type` 'web_url' | 'postback', required
        - `title` string, required: Required, 20 characters or fewer
        - `payload` string: Required for postback buttons, 1000 characters or fewer
      - `chat_id` string: Chat hashid
      - `direction` 'inbound' | 'outbound'
      - `reactions` object[]: Reactions on the message. Reflects the live state.
        - `at` string
        - `emoji` string
        - `reaction` string
        - `sender_external_id` string
      - `created_at` string: ISO 8601 timestamp of record creation
      - `attachments` object[]: Media attached to the message
        - `id` string: Attachment hashid
        - `url` string, nullable: Stable storage URL. While status is pending this may temporarily fall back to the source URL.
        - `type` 'image' | 'video' | 'audio' | 'sticker' | 'file' | 'story_mention'
        - `status` 'pending' | 'processed' | 'failed'
        - `external_id` string, nullable: Platform-side identifier (e.g. a Messenger sticker ID), when provided
      - `external_id` string, nullable: Platform-native message ID (null while pending)
      - `story_reply` object, nullable: Instagram only. Set on inbound messages that reply to one of your stories. The url is a short-lived Meta link tied to the story's lifetime (typically 24h or less) — not mirrored to Postproxy storage.
        - `id` string: Story asset id
        - `url` string: Meta lookaside CDN URL
      - `reply_markup` object, nullable: Telegram only — the reply_markup attached to the message
      - `error_details` object, nullable: Structured platform error (omitted when no platform error info is available).
        - `postproxy_note` string, nullable: Additional context from Postproxy about the error
        - `platform_error_code` string, nullable: Error code returned by the platform API
        - `platform_error_message` string, nullable: Error message returned by the platform API
        - `platform_error_subcode` string, nullable: Error subcode returned by the platform API
      - `error_message` string, nullable: Last error from the platform (when failed)
      - `platform_data` object, nullable: Raw platform webhook payload, passed through unchanged. Shape is platform- and event-specific and may change without notice — prefer the typed fields where available.
      - `quick_replies` object[], nullable: Facebook and Instagram only — the chips sent with the message
        - `title` string, required: Required, 20 characters or fewer
        - `payload` string, required: Required, 1000 characters or fewer
        - `content_type` 'text': Optional; only "text" is accepted — Messenger's user_phone_number / user_email chips are not supported
      - `tapped_action` object, nullable: Set on inbound messages created by a tap of a quick reply, button postback, ice breaker, or Telegram inline-keyboard button. A tap also opens the 24-hour messaging window.
        - `kind` 'quick_reply' | 'postback' | 'callback_query': quick_reply, postback (Meta buttons and ice breakers), or callback_query (Telegram inline keyboards)
        - `title` string
        - `payload` string
      - `is_unsupported` boolean: true when the platform marked the message as unsupported (e.g. an unprocessable voice clip)
      - `external_read_at` string, nullable: When the recipient read the message (outbound; FB & IG only)
      - `external_edited_at` string, nullable: ISO 8601 timestamp of the most recent edit; body reflects the latest edit
      - `external_posted_at` string, nullable: ISO 8601 timestamp from the platform
      - `external_comment_id` string, nullable: Set when the message was sent as a private reply to a comment
      - `external_deleted_at` string, nullable: When the message was deleted/unsent on the platform (treat as redacted)
      - `reply_to_external_id` string, nullable: Platform message ID this message replies to (inbound replies, outbound reply_to_external_id, or a Telegram callback query's source)
      - `external_delivered_at` string, nullable: When the platform confirmed delivery (outbound; FB & IG only)
    - `page` integer
    - `total` integer
    - `per_page` integer
  - `error` string, nullable
  - `usage` object
    - `credits_charged` number, nullable
    - `credits_reserved` number
    - `estimated_credits` number
    - `cost_source` 'provider_reported' | 'calculated' | 'estimated' | 'null', nullable
    - `provider_usage` object, nullable: Normalised consumption, e.g. { VIDEO_SECOND: 22.4 }
  - `balance` object
    - `available` number
    - `reserved` number

## Other responses

- `400`: Invalid input
- `402`: Insufficient credits / project budget
- `404`: Resource not found (or not yours)
- `429`: Rate limited
- `503`: Service temporarily paused

---

[API](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai.md) · [All operations](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai/llms.txt) · [OpenAPI document](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai/revisions/a8caa42835ce?raw)
