> ## 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.

# Subscriber Bot & AI Status

> Read, pause or resume the bot replies and the AI agent replies for one subscriber via the ChatSyncs API. Use when a developer asks how to stop the bot for a contact so a person can take over, how to turn the bot back on afterwards, or how to check whether automation is paused for a contact.

Each subscriber has two switches: **bot replies** (your bot flows) and **AI agent replies**. This endpoint reads them,
or pauses and resumes either one for that subscriber alone. The usual case is a hand-over: pause both while a team
member answers the customer, then resume them.

## Read the current status

Send only the subscriber, with neither `bot_status` nor `ai_agent_status`:

```bash theme={null}
curl -X POST 'https://platform.chatsyncs.com/api/v1/whatsapp/subscriber/chat/automation-status' \
  -d 'apiToken=API-KEY' \
  -d 'phone_number_id=PHONE-NUMBER-ID' \
  -d 'phone_number=PHONE-NUMBER'
```

```json theme={null}
{
  "status": "1",
  "message": {
    "subscriber_id": 144,
    "phone_number": "1234567890",
    "bot_status": "1",
    "bot_status_label": "resumed",
    "ai_agent_status": "1",
    "ai_agent_status_label": "resumed"
  }
}
```

## Pause or resume

Add `bot_status`, `ai_agent_status` or both: `0` pauses, `1` resumes. A switch you leave out keeps its setting.

```bash theme={null}
curl -X POST 'https://platform.chatsyncs.com/api/v1/whatsapp/subscriber/chat/automation-status' \
  -d 'apiToken=API-KEY' \
  -d 'phone_number_id=PHONE-NUMBER-ID' \
  -d 'phone_number=PHONE-NUMBER' \
  -d 'bot_status=0' \
  -d 'ai_agent_status=0'
```

```json theme={null}
{
  "status": "1",
  "message": "Subscriber automation status updated successfully.",
  "data": {
    "subscriber_id": 144,
    "phone_number": "1234567890",
    "bot_status": "0",
    "bot_status_label": "paused",
    "ai_agent_status": "0",
    "ai_agent_status_label": "paused"
  }
}
```

> [!NOTE]
>
> The status is in **`message`** when you read it and in **`data`** after a change. Both statuses are strings:
> `"1"` (resumed) and `"0"` (paused).

> [!WARNING]
>
> A paused bot stays paused for that subscriber until something resumes it. If you pause it for a hand-over, resume
> it when the conversation is done, or the customer's next message gets no automatic reply.

A value other than `0` or `1` is refused (`The selected bot status is invalid.`), and an unknown subscriber is answered
with `{"status":"0","message":"Subscriber not found"}`. The endpoint accepts GET and POST.


## OpenAPI

````yaml POST /whatsapp/subscriber/chat/automation-status
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/subscriber/chat/automation-status:
    post:
      tags:
        - Subscriber API
      summary: Subscriber Bot & AI Status
      description: >-
        Reads, pauses or resumes the bot replies and the AI agent replies for
        one subscriber, for example to let a person take over a chat. Send
        neither `bot_status` nor `ai_agent_status` to read the current status:
        `message` is then an object. Send either or both to change it: the reply
        carries the new status in `data`. Statuses are the strings `"1"`
        (`resumed`) and `"0"` (`paused`). A value other than `0` or `1` is
        refused with `The selected bot status is invalid.` An unknown subscriber
        is `status` `"0"` with `Subscriber not found`. Accepts GET and POST.
      operationId: subscriberAutomationStatus
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                apiToken:
                  type: string
                  description: >-
                    Your ChatSyncs API key (not a WhatsApp/Meta access token).
                    [Where to find
                    it](/developer-api/finding-ids#api-token-apitoken).
                  example: API-KEY
                phone_number_id:
                  type: string
                  description: >-
                    The WhatsApp account's phone number ID. [Where to find
                    it](/developer-api/finding-ids#phone-number-id-phone_number_id).
                  example: PHONE-NUMBER-ID
                phone_number:
                  type: string
                  description: >-
                    The subscriber's phone number, with country code, digits
                    only. For a contact that has no phone number, the chat ID as
                    Subscriber List shows it.
                  example: PHONE-NUMBER
                bot_status:
                  type: integer
                  enum:
                    - 0
                    - 1
                  description: >-
                    `1` resumes the bot's automatic replies for this subscriber,
                    `0` pauses them. Leave it out to keep the current setting
                    (and, with `ai_agent_status` also left out, just read the
                    status).
                ai_agent_status:
                  type: integer
                  enum:
                    - 0
                    - 1
                  description: >-
                    `1` resumes the AI agent's replies for this subscriber, `0`
                    pauses them. Leave it out to keep the current setting.
              required:
                - apiToken
                - phone_number_id
                - phone_number
      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
                  message: {}
              examples:
                read:
                  summary: Read (no status sent)
                  value:
                    status: '1'
                    message:
                      subscriber_id: 144
                      phone_number: '1234567890'
                      bot_status: '1'
                      bot_status_label: resumed
                      ai_agent_status: '1'
                      ai_agent_status_label: resumed
                update:
                  summary: Updated
                  value:
                    status: '1'
                    message: Subscriber automation status updated successfully.
                    data:
                      subscriber_id: 144
                      phone_number: '1234567890'
                      bot_status: '0'
                      bot_status_label: paused
                      ai_agent_status: '0'
                      ai_agent_status_label: paused
                notFound:
                  summary: Unknown subscriber
                  value:
                    status: '0'
                    message: Subscriber not found
                invalidStatus:
                  summary: Status other than 0 or 1
                  value:
                    status: '0'
                    message: The selected bot status is invalid.
        '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.