> ## Documentation Index
> Fetch the complete documentation index at: https://developer.chatsyncs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Conversation

> Fetch the message history of a particular WhatsApp subscriber via the ChatSyncs API, with limit/offset pagination. Use when a developer asks how to pull a subscriber's chat history into their own system.

Returns the conversation history for a specific subscriber.

## Example Request

```bash theme={null}
curl --request GET \
  --url 'https://platform.chatsyncs.com/api/v1/whatsapp/get/conversation?apiToken=API-KEY&phone_number_id=PHONE-NUMBER-ID&phone_number=PHONE-NUMBER&limit=10&offset=1'
```

## Pagination

**`offset` is a page number, starting at 1 — it is not a count of messages to skip.** `limit` is the page size (up to 50),
and page 1 holds the newest messages. Say the conversation has 30 messages and you set `limit=10`:

| Call | offset | What you get back |
| - | - | - |
| 1st call | `1` (or `0`) | The most recent 10 messages |
| 2nd call | `2` | The next 10, older |
| 3rd call | `3` | The oldest 10 |

Each time, add **1** to the previous `offset`. The response carries `nextOffset`, the value to send next.

## What comes back

Each row has a `sender` — `user` for the contact, `bot` for messages sent by a flow, a team member or the API,
`ai_agent`, `sequence`, or `system` for notes such as `Label added: Interested Lead`. `message_content` is a **JSON
string**: for messages the contact sent it is the whole WhatsApp webhook, for messages you sent it is the request that
was sent, so parse it before reading it. A `limit` below 1 behaves as 1, a `limit` that isn't a whole number is rejected
(`The limit must be an integer.`), and past the last page you get an empty list with `nextOffset` `null`.


## OpenAPI

````yaml GET /whatsapp/get/conversation
openapi: 3.1.0
info:
  title: ChatSyncs Developer API
  version: 1.0.0
  description: >-
    REST API for sending WhatsApp messages and managing subscribers through
    ChatSyncs.


    **Authentication.** Send your key as the `apiToken` parameter, or as
    `Authorization: Bearer <key>` — both work on every endpoint **except Custom
    Fields List**, which only accepts the `apiToken` parameter (a Bearer header
    alone is answered with *The api token field is required.*). A wrong key
    returns HTTP 401 `{"status":"0","message":"Unauthenticated."}`; no key at
    all redirects to the login page.


    **Methods.** Every endpoint accepts both GET and POST with the same
    parameters, except Upload Media, which is POST-only. Use POST for anything
    that changes data.


    **Errors.** Failures usually come back as HTTP 200 with `"status":"0"` and
    the reason in `message`, so always check `status`. `status` is the string
    `"1"` or `"0"` on most endpoints and a boolean on a few.


    **Lists.** Endpoints that return rows put them in `message` as a list; there
    is no `data` field (Custom Fields List is the exception and uses `data`).
servers:
  - url: https://platform.chatsyncs.com/api/v1
security: []
paths:
  /whatsapp/get/conversation:
    get:
      tags:
        - WhatsApp API
      summary: Get Conversation
      description: >-
        Page 1 holds the newest messages. A `limit` below 1 behaves as 1, and
        one that is not a whole number is rejected. Past the last page the
        response is an empty list with `nextOffset` `null`. System notes such as
        `Label added: …` and `Conversation was Reopened by …` appear as rows
        with `sender` `system`.
      operationId: getConversation
      parameters:
        - name: apiToken
          in: query
          required: true
          schema:
            type: string
            example: API-KEY
          description: >-
            Your ChatSyncs API key (not a WhatsApp/Meta access token). [Where to
            find it](/developer-api/finding-ids#api-token-apitoken).
        - name: phone_number_id
          in: query
          required: true
          schema:
            type: string
            example: PHONE-NUMBER-ID
          description: >-
            The WhatsApp account's phone number ID. [Where to find
            it](/developer-api/finding-ids#phone-number-id-phone_number_id).
        - name: phone_number
          in: query
          required: true
          schema:
            type: string
            example: PHONE-NUMBER
          description: The subscriber's phone number, with country code, digits only.
        - name: limit
          in: query
          required: true
          schema:
            type: number
            example: 10
          description: Rows per page, up to 50.
        - name: offset
          in: query
          required: false
          schema:
            type: number
            example: 1
          description: >-
            The **page number**, starting at 1 — not a count of rows to skip.
            `0` and `1` both return the first page; `2` returns the next. The
            response's `nextOffset` is the value to send next.
      responses:
        '200':
          description: >-
            Standard ChatSyncs response. `status` is `"1"` on success and `"0"`
            on failure.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: '`"1"` = success, `"0"` = failure.'
                  message:
                    type: array
                    description: >-
                      The rows, as a list. There is no `data` field on this
                      endpoint.
                    items:
                      type: object
                  nextOffset:
                    type:
                      - integer
                      - 'null'
                    description: >-
                      The `offset` to send for the next page, or `null` on the
                      last page.
              examples:
                success:
                  summary: Success
                  value:
                    status: '1'
                    message:
                      - id: 8453
                        whatsapp_bot_subscriber_subscriber_id: 919876543210-123
                        whatsapp_bot_id: 123
                        sender: bot
                        agent_name: Support Agent
                        message_content: >-
                          {"messaging_product":"whatsapp","to":"919876543210","text":{"body":"Hello!","preview_url":true}}
                        conversation_time: '2026-10-03 18:44:17'
                        wa_message_id: >-
                          wamid.HBgNODgwMTcyMzMwOTAwMxUCABEYEjlGQkY3MEFEMEVGODhCNDkxNQA=
                        reaction_data: null
                        message_status: read
                        delivery_status_updated_at: '2026-10-03 18:44:19'
                        read_time: '2026-10-03 18:44:32'
                        failed_time: null
                        failed_reason: ''
                        related_id: 0
                    nextOffset: 2
                error:
                  summary: A required field is missing
                  value:
                    status: '0'
                    message: >-
                      The phone number id field is required., The phone number
                      field is required., The limit field is required.
                lastPage:
                  summary: Past the last page
                  value:
                    status: '1'
                    message: []
                    nextOffset: null
                badLimit:
                  summary: limit is not a whole number
                  value:
                    status: '0'
                    message: The limit must be an integer.
        '401':
          description: >-
            `apiToken` is wrong. (With no token at all the API redirects to the
            login page with HTTP 302 instead of returning JSON.)
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  message:
                    type: string
              examples:
                unauthenticated:
                  summary: Wrong apiToken
                  value:
                    status: '0'
                    message: Unauthenticated.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.