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

# Trigger Bot Flow

> Trigger a specific Keyword Replies flow for any mobile number via the ChatSyncs API, using the flow's unique ID. Use when a developer asks how to programmatically start a bot conversation instead of waiting for the user to message first.

Starts a specific [Keyword Replies](https://help.chatsyncs.com/docs/whatsapp-keyword-chatbot) flow for a phone number — useful for
kicking off a conversation from your own system instead of waiting for the user to message
first.

<Tip>
  **Where to find `bot_flow_unique_id`:** call [Bot Flow List](/developer-api/whatsapp/get-bot-flow-list) — the `unique_id`
  of each flow — or open **Chatbot Manager → Automation → Keyword Replies**, where it's the **Unique ID** column. See
  [Finding Your IDs & API Token](/developer-api/finding-ids#bot-flow-and-whatsapp-bot-id-bot_flow_unique_id)
  for a screenshot.
</Tip>

<Warning>
  **The flow id isn't checked.** An unknown `bot_flow_unique_id` still returns `"status":"1"` and
  `Bot Flow has been trigger successfully`, and nothing happens. Take the id from
  [Bot Flow List](/developer-api/whatsapp/get-bot-flow-list).
</Warning>


## OpenAPI

````yaml POST /whatsapp/trigger-bot
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/trigger-bot:
    post:
      tags:
        - WhatsApp API
      summary: Trigger Bot Flow
      description: >-
        The flow id is not checked: an unknown `bot_flow_unique_id` still
        returns success and nothing happens. Get valid ids from Bot Flow List.
      operationId: triggerBotFlow
      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
                bot_flow_unique_id:
                  type: string
                  description: >-
                    The Bot Flow's unique ID to trigger. [Where to find
                    it](/developer-api/finding-ids#bot-flow-and-whatsapp-bot-id-bot_flow_unique_id).
                  example: BOT-FLOW-UNIQUE-ID
                phone_number:
                  type: string
                  description: >-
                    The subscriber's phone number, with country code, digits
                    only.
                  example: PHONE-NUMBER
              required:
                - apiToken
                - phone_number_id
                - bot_flow_unique_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
                    description: '`"1"` = success, `"0"` = failure.'
                  message:
                    type: string
                    description: Human-readable result message.
              examples:
                success:
                  summary: Success
                  value:
                    status: '1'
                    message: Bot Flow has been trigger successfully
                error:
                  summary: A required field is missing
                  value:
                    status: '0'
                    message: >-
                      The phone number id field is required., The bot flow
                      unique id field is required., The phone number field is
                      required.
                unknownFlowStillOk:
                  summary: An unknown bot_flow_unique_id is NOT rejected
                  value:
                    status: '1'
                    message: Bot Flow has been trigger successfully
        '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.