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

# Send outbound WhatsApp message

> Wrapper on the WhatsApp Cloud API `/message` endpoint. Supports template (text / media / interactive / authentication) and session (text / image) messages.



## OpenAPI

````yaml POST /fbwrapper/outbound/{botnumberwithisd}
openapi: 3.0.3
info:
  title: NeuronCx API
  version: 1.0.0
  description: >-
    API collection of NeuronCx — Omnichannel Automations & Reasoning. NeuronCx
    APIs use Bearer as an authorization layer. Every API request must contain an
    `Authorization` HTTP header with a token. Tokens can be generated by admin
    role users on https://dash.neuroncx.in/.
servers:
  - url: https://domain-c.neuroncx.in
    description: Carrier domain (domain_c)
  - url: https://domain-g.neuroncx.in
    description: Get/lead domain (domain_g)
  - url: https://domain-i.neuroncx.in
    description: Interactive/messaging domain (domain_i)
  - url: https://events.neuroncx.in
    description: Event handler domain
  - url: https://automation.neuroncx.in
    description: Automation domain
security:
  - bearerAuth: []
tags:
  - name: Prospects
  - name: Messages
  - name: Attributes
  - name: Agent
  - name: Events
paths:
  /fbwrapper/outbound/{botnumberwithisd}:
    post:
      tags:
        - Messages
      summary: Send outbound WhatsApp message
      description: >-
        Wrapper on the WhatsApp Cloud API `/message` endpoint. Supports template
        (text/media/interactive/authentication) and session (text/image)
        messages. An optional `activity` object can be included to push activity
        data alongside the message.
      operationId: sendOutboundMessage
      parameters:
        - name: botnumberwithisd
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
            example:
              messaging_product: whatsapp
              recipient_type: individual
              to: PHONE_NUMBER
              type: template
              template:
                name: template_name
                language:
                  code: LANGUAGE_AND_LOCALE_CODE
                components:
                  - type: body
                    parameters:
                      - type: text
                        parameter_name: customer_name
                        text: John
      responses:
        '200':
          description: Accepted
          content:
            application/json:
              example:
                messages:
                  - id: wamid.HBg...
                    message_status: accepted
      x-codeSamples:
        - lang: JSON
          label: Text template
          source: |-
            {
              "messaging_product": "whatsapp",
              "recipient_type": "individual",
              "to": "PHONE_NUMBER",
              "type": "template",
              "template": {
                "name": "template_name",
                "language": { "code": "LANGUAGE_AND_LOCALE_CODE" },
                "components": [
                  {
                    "type": "body",
                    "parameters": [
                      { "type": "text", "parameter_name": "customer_name", "text": "John" },
                      { "type": "text", "parameter_name": "order_id", "text": "9128312831" }
                    ]
                  }
                ]
              },
              "activity": {
                "activityId": "",
                "activity_context": "",
                "activity_customdata": ""
              }
            }
        - lang: JSON
          label: Image header template
          source: |-
            {
              "messaging_product": "whatsapp",
              "recipient_type": "individual",
              "to": "PHONE_NUMBER",
              "type": "template",
              "template": {
                "name": "template_name",
                "language": { "code": "LANGUAGE_AND_LOCALE_CODE" },
                "components": [
                  {
                    "type": "header",
                    "parameters": [
                      { "type": "image", "image": { "link": "https://URL" } }
                    ]
                  },
                  {
                    "type": "body",
                    "parameters": [
                      { "type": "text", "text": "TEXT-STRING" }
                    ]
                  }
                ]
              },
              "activity": {
                "activityId": "",
                "activity_context": "",
                "activity_customdata": ""
              }
            }
        - lang: JSON
          label: Video header template
          source: |-
            {
              "messaging_product": "whatsapp",
              "recipient_type": "individual",
              "to": "PHONE_NUMBER",
              "type": "template",
              "template": {
                "name": "template_name",
                "language": { "code": "LANGUAGE_AND_LOCALE_CODE" },
                "components": [
                  {
                    "type": "header",
                    "parameters": [
                      { "type": "video", "video": { "link": "https://URL" } }
                    ]
                  },
                  {
                    "type": "body",
                    "parameters": [
                      { "type": "text", "text": "TEXT-STRING" }
                    ]
                  }
                ]
              },
              "activity": {
                "activityId": "",
                "activity_context": "",
                "activity_customdata": ""
              }
            }
        - lang: JSON
          label: Interactive template
          source: |-
            {
              "messaging_product": "whatsapp",
              "recipient_type": "individual",
              "to": "PHONE_NUMBER",
              "type": "template",
              "template": {
                "name": "template_name",
                "language": { "code": "LANGUAGE_AND_LOCALE_CODE" },
                "components": [
                  {
                    "type": "body",
                    "parameters": [
                      { "type": "text", "text": "TEXT_STRING" }
                    ]
                  },
                  {
                    "type": "button",
                    "sub_type": "quick_reply",
                    "index": "0",
                    "parameters": [
                      { "type": "payload", "payload": "PAYLOAD" }
                    ]
                  }
                ]
              },
              "activity": {
                "activityId": "",
                "activity_context": "",
                "activity_customdata": ""
              }
            }
        - lang: JSON
          label: Auth OTP template
          source: |-
            {
              "messaging_product": "whatsapp",
              "recipient_type": "individual",
              "to": "<USER_NUMBER>",
              "type": "template",
              "template": {
                "name": "TEMPLATE_NAME",
                "language": { "code": "en_US" },
                "components": [
                  {
                    "type": "body",
                    "parameters": [
                      { "type": "text", "text": "<OTP>" }
                    ]
                  },
                  {
                    "type": "button",
                    "sub_type": "url",
                    "index": "0",
                    "parameters": [
                      { "type": "text", "text": "<OTP>" }
                    ]
                  }
                ]
              }
            }
        - lang: JSON
          label: Session text
          source: |-
            {
              "messaging_product": "whatsapp",
              "recipient_type": "individual",
              "to": "919999900000",
              "type": "text",
              "text": {
                "preview_url": true,
                "body": "Hello world !!!"
              }
            }
        - lang: JSON
          label: Session image
          source: |-
            {
              "messaging_product": "whatsapp",
              "recipient_type": "individual",
              "to": "919999900000",
              "type": "image",
              "image": {
                "link": "<MEDIA_URL>",
                "caption": "<CAPTION>"
              }
            }
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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