AAvianyaAI·Docs
PricingBlogCompare← Back to site
Getting Started
IntroductionSend Message
Templates
Marketing Template
Utility Template
Authentication Template
Catalog Template
Session Messages
Text Message
Text Reply (Context)
Reaction Message
Location Message
Contact Message
Media
Image Message
Audio Message
Video Message
Document Message
Sticker Message
Interactive
List Message (Menu)
Reply Buttons
Carousel (URL Buttons)
Carousel (Quick Replies)
Commerce
Product Carousel
Single Product
Multi-Product List
Catalog Message
Bulk Broadcast
Bulk Send
Campaigns
Get TemplatesGet Template CSVCreate CampaignSend CampaignCampaign StatusList Campaigns
Webhook Forwarding
List WebhooksAdd WebhookEdit URLPause / ActivateDeleteDelivery LogsError Responses

Avianya Partner API

Integrate WhatsApp messaging directly into your application. Authenticate using your Partner Token and start sending messages.

View as Markdown
Base URL
https://api.avianya.com/wa/partner/v1

Send Message

POST/{phone_number_id}/messages

Send a WhatsApp message to a customer. Select a message type to view details and examples.

Authorizations

Authorizationstringrequired
Bearer authentication header. Format: Bearer <token>.

Marketing Template

Send a promotional template with an image header and variables.

typestring
Must be template.

Utility Template

Order updates, alerts, and account notifications.

Authentication Template

Send One-Time Passwords (OTP) with a copy-code button.

Catalog Template

Send a product catalog template to showcase items.

Text Message

Simple free-form text messages (Session only).

preview_urlboolean
If true, generates a preview for links.

Text Reply

Reply to a specific message using its ID.

Reaction Message

React to a message with an emoji.

Location Message

Send a static location map pin.

Contact Message

Share a contact card (vCard).

Image Message

Send an image via URL. Supported formats: JPEG, PNG.

Audio Message

Send an audio file. Supported formats: MP3, OGG, AMR.

Video Message

Send a video file. Supported formats: MP4, 3GP.

Document Message

Send a PDF or generic document.

Sticker Message

Send a static or animated sticker (WebP format).

List Message

Send a menu of up to 10 options. Safer than buttons as they don't disappear on click.

Reply Buttons

Send up to 3 quick reply buttons. Great for Yes/No questions.

Carousel with URL Buttons

Scrollable carousel of cards, each with a link button.

Carousel with Quick Replies

Carousel cards with actionable reply buttons.

Product Carousel

Scrollable carousel of products from your Catalog.

Single Product Message

Send a detailed view of a single product.

Multi-Product List

Send a curated list of up to 30 products organised in sections.

Catalog Message

Send the entire storefront/catalog.

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "template",
    "template": {
        "name": "seasonal_promo",
        "language": { "code": "en_US" },
        "components": [
            {
                "type": "header",
                "parameters": [
                    {
                        "type": "image",
                        "image": { "link": "https://example.com/banner.jpg" }
                    }
                ]
            },
            {
                "type": "body",
                "parameters": [
                    { "type": "text", "text": "John" },
                    { "type": "text", "text": "50%" }
                ]
            }
        ]
    }
}'
200 OKResponse
{
  "messaging_product": "whatsapp",
  "messages": [
    { "id": "wamid.HBgLMT..." }
  ]
}

Bulk Send

POST/{phone_number_id}/bulk_messages

Send a template message to multiple recipients in a single request. Separate phone numbers with ||| (triple pipe). Useful for broadcasts without the Campaign flow.

Authorizations

Authorizationstringrequired
Bearer authentication header. Format: Bearer <YOUR_TOKEN>.

Body Parameters

messaging_productstringrequired
Must be whatsapp.
tostringrequired
Recipient phone numbers in E.164 format separated by |||. Example: 91xxxxxxxxxx|||91yyyyyyyyyy.
typestringrequired
Must be template.
templateobjectrequired
Template name, language code, and components.
cURL
curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/bulk_messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "messaging_product": "whatsapp",
  "to": "91xxxxxxxxxx|||91yyyyyyyyyy",
  "type": "template",
  "template": {
    "name": "hello_world",
    "language": { "code": "en_US" },
    "components": []
  }
}'
200 Response
{
  "failed": 0,
  "processed": 2,
  "sent": 2,
  "success": true
}

Campaigns

Step 1 — Get Message Templates

GET/waba/{waba_id}/message_templates

Fetch all approved message templates for a WhatsApp Business Account (WABA). Use the returned template IDs in subsequent campaign steps.

waba_idstringpath
Your WhatsApp Business Account ID.
cURL
curl -X GET https://api.avianya.com/wa/partner/v1/waba/{waba_id}/message_templates \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json"
200 Response
{
  "data": [
    {
      "name": "hello_world",
      "parameter_format": "POSITIONAL",
      "components": [
        {
          "type": "HEADER",
          "format": "TEXT",
          "text": "Hello World"
        },
        {
          "type": "BODY",
          "text": "Welcome and congratulations!! This message demonstrates your ability to send a WhatsApp message notification from the Cloud API, hosted by Meta."
        },
        {
          "type": "FOOTER",
          "text": "WhatsApp Business Platform sample message"
        }
      ],
      "language": "en_US",
      "status": "APPROVED",
      "category": "UTILITY",
      "id": "{template_id}"
    },
    {
      "name": "shopify_order_confirmed",
      "parameter_format": "NAMED",
      "components": [
        {
          "type": "BODY",
          "text": "Hi! Your order {{order_number}} has been confirmed. Total: {{currency}} {{total_price}}. We'll notify you when it ships.",
          "example": {
            "body_text_named_params": [
              { "param_name": "order_number", "example": "1234" },
              { "param_name": "currency", "example": "₹" },
              { "param_name": "total_price", "example": "1234" }
            ]
          }
        }
      ],
      "language": "en_US",
      "status": "APPROVED",
      "category": "UTILITY",
      "id": "{template_id_2}"
    }
  ],
  "paging": {
    "cursors": {
      "before": "QVFIU0ZA...",
      "after": "QVFIU0lC..."
    }
  }
}

Step 2 — Get Template CSV

GET/campaigns/templates/{template_id}/csv

Download a pre-formatted CSV template for the selected message template. Fill in recipient phone numbers and variable values, then use this file in Step 3.

template_idstringpath
Template ID from Step 1.
cURL
curl -X GET https://api.avianya.com/wa/partner/v1/campaigns/templates/{template_id}/csv \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  --output template.csv
200 Response — text/csv
country_code,phone_number
+91,91XXXXXXXXXX
+91,91YYYYYYYYYY

# For templates with variables, columns are added automatically:
# country_code,phone_number,order_number,currency,total_price
# +91,91XXXXXXXXXX,1234,₹,999

Step 3 — Create Campaign

POST/{phone_number_id}/campaigns

Upload a filled CSV and create a campaign. Send as multipart/form-data.

namestringrequired
A human-readable campaign name.
template_idstringrequired
Template ID from Step 1.
filefilerequired
CSV file downloaded and filled from Step 2.
cURL
curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/campaigns \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -F "name=My Campaign" \
  -F "template_id={template_id}" \
  -F "file=@/path/to/recipients.csv"
200 Response
{
  "campaign_id": "c0f3d7a2-4b8e-4cf0-b9fd-60f8160c5f3a",
  "message": "Campaign created successfully. Use POST /campaigns/{campaign_id}/send to send it.",
  "skipped": 0,
  "success": true,
  "total_recipients": 2
}

Step 4 — Send Campaign

POST/campaigns/{campaign_id}/send

Trigger the dispatch of a created campaign. Returns immediately; delivery happens asynchronously. Poll Step 5 for status.

campaign_idstringpath
Campaign ID returned by Step 3.
cURL
curl -X POST https://api.avianya.com/wa/partner/v1/campaigns/{campaign_id}/send \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json"
200 Response
{
  "campaign_id": "c0f3d7a2-4b8e-4cf0-b9fd-60f8160c5f3a",
  "message": "Campaign queued for high-throughput send. Check status via GET /campaigns/c0f3d7a2-4b8e-4cf0-b9fd-60f8160c5f3a",
  "success": true
}

Step 5 — Campaign Status

GET/campaigns/{campaign_id}

Fetch the current status, delivery stats, and error summary for a campaign.

campaign_idstringpath
Campaign ID from Step 3.
cURL
curl -X GET https://api.avianya.com/wa/partner/v1/campaigns/{campaign_id} \
  -H "Authorization: Bearer <YOUR_TOKEN>"
200 Response
{
  "campaign_id": "c0f3d7a2-4b8e-4cf0-b9fd-60f8160c5f3a",
  "name": "Diwali Blast",
  "template_name": "hello_world",
  "template_language": "en_US",
  "status": "completed",
  "total_recipients": 2,
  "sent": 2,
  "delivered": 2,
  "read": 1,
  "failed": 0,
  "pending": 0,
  "phone_number_id": "{phone_number_id}",
  "enable_click_tracking": true,
  "created_at": "2026-08-04T10:00:00Z",
  "updated_at": "2026-08-04T10:01:00Z",
  "started_at": "2026-08-04T10:00:05Z",
  "completed_at": "2026-08-04T10:00:58Z"
}

List All Campaigns

GET/campaigns

Returns all campaigns for the authenticated partner token, with status and delivery counts.

cURL
curl -X GET https://api.avianya.com/wa/partner/v1/campaigns \
  -H "Authorization: Bearer <YOUR_TOKEN>"
200 Response
{
  "campaigns": [
    {
      "campaign_id": "c0f3d7a2-4b8e-4cf0-b9fd-60f8160c5f3a",
      "name": "Diwali Blast",
      "template_name": "hello_world",
      "template_language": "en_US",
      "status": "completed",
      "total_recipients": 2,
      "sent": 2,
      "delivered": 2,
      "read": 1,
      "failed": 0,
      "pending": 0,
      "phone_number_id": "{phone_number_id}",
      "enable_click_tracking": true,
      "created_at": "2026-08-04T10:00:00Z",
      "updated_at": "2026-08-04T10:01:00Z",
      "started_at": "2026-08-04T10:00:05Z",
      "completed_at": "2026-08-04T10:00:58Z"
    },
    {
      "campaign_id": "81103e7a-1192-4c8a-8309-9e55a983ea55",
      "name": "Cart Recovery Aug",
      "template_name": "shopify_cart_recovery",
      "template_language": "en_US",
      "status": "completed",
      "total_recipients": 100,
      "sent": 98,
      "delivered": 90,
      "read": 45,
      "failed": 2,
      "pending": 0,
      "phone_number_id": "{phone_number_id}",
      "enable_click_tracking": false,
      "created_at": "2026-08-03T08:00:00Z",
      "updated_at": "2026-08-03T08:05:00Z",
      "completed_at": "2026-08-03T08:04:55Z"
    }
  ],
  "pagination": {
    "limit": 20,
    "page": 1,
    "total": 165,
    "total_pages": 9
  }
}

Webhook Forwarding

Forward incoming WhatsApp events — messages, delivery receipts and status updates — from a WABA to your own endpoints. Register up to 5 webhooks per WABA, each independently active or paused.

Base URL: https://api.avianya.com. The paths /settings/waba-forwarding and /settings/waba-webhook hit the same handler — use either. All webhook URLs must use HTTPS. Get your waba_id from your Avianya dashboard.

List Webhooks

GET/settings/waba-forwarding

Returns every webhook registered on a WABA. An empty list is {"waba_id":"…","webhooks":[]} — never null.

Authorizationstringrequired
Bearer authentication header. Format: Bearer <YOUR_TOKEN>.
waba_idstringquery
The WhatsApp Business Account ID.
cURL
curl -X GET "https://api.avianya.com/settings/waba-forwarding?waba_id=123456789012345" \
  -H "Authorization: Bearer <YOUR_TOKEN>"
200 Response
{
  "waba_id": "123456789012345",
  "webhooks": [
    {"id": 12, "url": "https://yourapp.com/hooks/wa", "status": "active"},
    {"id": 19, "url": "https://backup.yourapp.com/wa", "status": "paused"}
  ]
}

Add a Webhook

PUT/settings/waba-forwarding

Send a webhook_url with no webhook_id to add one. Re-sending an existing URL upserts (reactivates) it rather than creating a duplicate.

waba_idstringbody
The WhatsApp Business Account ID.
webhook_urlstringbody
Publicly accessible HTTPS URL that will receive POST webhook events.
webhook_statusstringoptional
Set to paused to add pre-paused. Defaults to active.
cURL
curl -X PUT https://api.avianya.com/settings/waba-forwarding \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"waba_id":"123456789012345","webhook_url":"https://yourapp.com/hooks/wa"}'
200 Response
{"message": "Webhook updated successfully"}

Edit a Webhook's URL

PUT/settings/waba-forwarding

Include a webhook_id plus the new webhook_url. This re-activates the endpoint unless you also send "webhook_status":"paused".

waba_idstringbody
The WhatsApp Business Account ID.
webhook_idnumberbody
ID of the webhook to update (from List Webhooks).
webhook_urlstringbody
The new HTTPS endpoint URL.
cURL
curl -X PUT https://api.avianya.com/settings/waba-forwarding \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"waba_id":"123456789012345","webhook_id":12,"webhook_url":"https://yourapp.com/hooks/wa-v2"}'
200 Response
{"message": "Webhook updated successfully"}

Pause / Activate

PUT/settings/waba-forwarding

Toggle a single webhook with webhook_id + webhook_status. Omit webhook_id to apply the status to every webhook on the WABA.

waba_idstringbody
The WhatsApp Business Account ID.
webhook_idnumberoptional
Target a single webhook. Omit to affect all webhooks on the WABA.
webhook_statusstringbody
Either active or paused. (suspended is system-set only.)
Pause one
curl -X PUT https://api.avianya.com/settings/waba-forwarding \
  -H "Authorization: Bearer <YOUR_TOKEN>" -H "Content-Type: application/json" \
  -d '{"waba_id":"123456789012345","webhook_id":12,"webhook_status":"paused"}'
Activate one
curl -X PUT https://api.avianya.com/settings/waba-forwarding \
  -H "Authorization: Bearer <YOUR_TOKEN>" -H "Content-Type: application/json" \
  -d '{"waba_id":"123456789012345","webhook_id":12,"webhook_status":"active"}'
Pause ALL (omit webhook_id)
curl -X PUT https://api.avianya.com/settings/waba-forwarding \
  -H "Authorization: Bearer <YOUR_TOKEN>" -H "Content-Type: application/json" \
  -d '{"waba_id":"123456789012345","webhook_status":"paused"}'
200 Response
{"message": "Webhook updated successfully"}

Delete a Webhook

DELETE/settings/waba-forwarding

Delete one webhook by webhook_id, or omit it to delete ALL webhooks on the WABA — no confirmation, no undo. Deleting a non-existent webhook_id still returns 200.

waba_idstringquery
The WhatsApp Business Account ID.
webhook_idnumberoptional
Omit to delete every webhook on the WABA.
Delete one
curl -X DELETE "https://api.avianya.com/settings/waba-forwarding?waba_id=123456789012345&webhook_id=12" \
  -H "Authorization: Bearer <YOUR_TOKEN>"
Delete ALL (omit webhook_id)
curl -X DELETE "https://api.avianya.com/settings/waba-forwarding?waba_id=123456789012345" \
  -H "Authorization: Bearer <YOUR_TOKEN>"
200 Response
{"message": "Webhook deleted successfully"}

Delivery Logs

GET/settings/waba-forwarding-logs

Inspect recent delivery attempts — useful for debugging a failing endpoint. Each log includes the target URL, HTTP status, attempt count, error, and the forwarded payload.

waba_idstringquery
The WhatsApp Business Account ID.
limitnumberoptional
Default 50, max 200. Out-of-range values silently fall back to 50.
outcomestringoptional
Filter by delivered, failed, or dropped. Any other value is ignored, returning all.
cURL
curl -X GET "https://api.avianya.com/settings/waba-forwarding-logs?waba_id=123456789012345&limit=50&outcome=failed" \
  -H "Authorization: Bearer <YOUR_TOKEN>"
200 Response
{
  "waba_id": "123456789012345",
  "logs": [
    {
      "id": 88213,
      "target_url": "https://yourapp.com/hooks/wa",
      "outcome": "failed",
      "http_status": 502,
      "delivery_attempt": 3,
      "error": "unexpected status 502",
      "payload": "{\"entry\":[...]}",
      "created_at": "2026-08-12T09:14:22.881Z"
    }
  ]
}

Error Responses

All errors return JSON (except 405, which is plain text).

CodeBodyWhen
401{"message":"Authorization header required","success":false}Missing / invalid Authorization
404{"error":"WABA account not found or access denied"}Blank waba_id, or WABA not yours
400{"error":"Provide webhook_url and/or webhook_status"}PUT with neither field
400{"error":"webhook_url must use HTTPS (https://). Plain http:// endpoints aren't allowed."}Non-HTTPS URL
400{"error":"webhook_status must be 'active' or 'paused'"}Any other status (suspended is system-set only)
400{"error":"Maximum 5 webhooks per WABA"}Adding past the cap
404{"error":"Webhook not found"}Edit-URL with an unknown webhook_id
400{"error":"No webhook configured for this WABA"}Status-only change matching 0 rows
400{"error":"Failed to update webhook (URL may already exist for this WABA)"}Edit-URL colliding with another row
405Method not allowed (plain text)POST / PATCH
401 Response
{
  "message": "Authorization header required",
  "success": false
}

All API Message Types — Code Examples

Marketing Template

Marketing Template

Send a promotional template with an image header and variables.

typestring
Must be template.

cURL Example

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "template",
    "template": {
        "name": "seasonal_promo",
        "language": { "code": "en_US" },
        "components": [
            {
                "type": "header",
                "parameters": [
                    {
                        "type": "image",
                        "image": { "link": "https://example.com/banner.jpg" }
                    }
                ]
            },
            {
                "type": "body",
                "parameters": [
                    { "type": "text", "text": "John" },
                    { "type": "text", "text": "50%" }
                ]
            }
        ]
    }
}'

JSON Body

{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "template",
    "template": {
        "name": "seasonal_promo",
        "language": { "code": "en_US" },
        "components": [
            {
                "type": "header",
                "parameters": [
                    {
                        "type": "image",
                        "image": { "link": "https://example.com/banner.jpg" }
                    }
                ]
            },
            {
                "type": "body",
                "parameters": [
                    { "type": "text", "text": "John" },
                    { "type": "text", "text": "50%" }
                ]
            }
        ]
    }
}

Utility Template

Utility Template

Order updates, alerts, and account notifications.

cURL Example

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "template",
    "template": {
        "name": "order_update_v1",
        "language": { "code": "en_US" },
        "components": [
            {
                "type": "body",
                "parameters": [
                    { "type": "text", "text": "#ORD-123" },
                    { "type": "text", "text": "Shipped" }
                ]
            }
        ]
    }
}'

JSON Body

{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "template",
    "template": {
        "name": "order_update_v1",
        "language": { "code": "en_US" },
        "components": [
            {
                "type": "body",
                "parameters": [
                    { "type": "text", "text": "#ORD-123" },
                    { "type": "text", "text": "Shipped" }
                ]
            }
        ]
    }
}

Authentication Template

Authentication Template

Send One-Time Passwords (OTP) with a copy-code button.

cURL Example

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "template",
    "template": {
        "name": "auth_otp",
        "language": { "code": "en_US" },
        "components": [
            {
                "type": "body",
                "parameters": [ { "type": "text", "text": "123456" } ]
            },
            {
                "type": "button",
                "sub_type": "url",
                "index": "0",
                "parameters": [ { "type": "text", "text": "123456" } ]
            }
        ]
    }
}'

JSON Body

{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "template",
    "template": {
        "name": "auth_otp",
        "language": { "code": "en_US" },
        "components": [
            {
                "type": "body",
                "parameters": [ { "type": "text", "text": "123456" } ]
            },
            {
                "type": "button",
                "sub_type": "url",
                "index": "0",
                "parameters": [ { "type": "text", "text": "123456" } ]
            }
        ]
    }
}

Catalog Template

Catalog Template

Send a product catalog template to showcase items.

cURL Example

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "recipient_type": "individual",
    "to": "91xxxxxxxxxx",
    "type": "template",
    "template": {
        "name": "intro_catalog_offer",
        "language": { "code": "en_US" },
        "components": [
            {
                "type": "body",
                "parameters": [
                    { "type": "text", "text": "100" },
                    { "type": "text", "text": "400" },
                    { "type": "text", "text": "3" }
                ]
            },
            {
                "type": "button",
                "sub_type": "CATALOG",
                "index": 0,
                "parameters": [
                    {
                        "type": "action",
                        "action": {
                            "thumbnail_product_retailer_id": "2lc20305pt"
                        }
                    }
                ]
            }
        ]
    }
}'

JSON Body

{
    "messaging_product": "whatsapp",
    "recipient_type": "individual",
    "to": "91xxxxxxxxxx",
    "type": "template",
    "template": {
        "name": "intro_catalog_offer",
        "language": { "code": "en_US" },
        "components": [
            {
                "type": "body",
                "parameters": [
                    { "type": "text", "text": "100" },
                    { "type": "text", "text": "400" },
                    { "type": "text", "text": "3" }
                ]
            },
            {
                "type": "button",
                "sub_type": "CATALOG",
                "index": 0,
                "parameters": [
                    {
                        "type": "action",
                        "action": {
                            "thumbnail_product_retailer_id": "2lc20305pt"
                        }
                    }
                ]
            }
        ]
    }
}

Text Message

Text Message

Simple free-form text messages (Session only).

preview_urlboolean
If true, generates a preview for links.

cURL Example

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "text",
    "text": {
        "preview_url": false,
        "body": "Hello there!"
    }
}'

JSON Body

{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "text",
    "text": {
        "preview_url": false,
        "body": "Hello there!"
    }
}

Text Reply (Context)

Text Reply

Reply to a specific message using its ID.

cURL Example

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "context": {
        "message_id": "wamid.HBgLMT..."
    },
    "type": "text",
    "text": {
        "preview_url": false,
        "body": "This is a reply to your previous message."
    }
}'

JSON Body

{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "context": {
        "message_id": "wamid.HBgLMT..."
    },
    "type": "text",
    "text": {
        "preview_url": false,
        "body": "This is a reply to your previous message."
    }
}

Reaction Message

Reaction Message

React to a message with an emoji.

cURL Example

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "reaction",
    "reaction": {
        "message_id": "wamid.HBgLMT...",
        "emoji": "👍"
    }
}'

JSON Body

{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "reaction",
    "reaction": {
        "message_id": "wamid.HBgLMT...",
        "emoji": "👍"
    }
}

Location Message

Location Message

Send a static location map pin.

cURL Example

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "location",
    "location": {
        "latitude": "12.9716",
        "longitude": "77.5946",
        "name": "Avianya HQ",
        "address": "Bangalore, India"
    }
}'

JSON Body

{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "location",
    "location": {
        "latitude": "12.9716",
        "longitude": "77.5946",
        "name": "Avianya HQ",
        "address": "Bangalore, India"
    }
}

Contact Message

Contact Message

Share a contact card (vCard).

cURL Example

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "contacts",
    "contacts": [
        {
            "name": {
                "formatted_name": "John Doe",
                "first_name": "John",
                "last_name": "Doe"
            },
            "phones": [
                {
                    "phone": "+919999999999",
                    "type": "WORK"
                }
            ],
            "emails": [
                {
                    "email": "john@example.com",
                    "type": "WORK"
                }
            ]
        }
    ]
}'

JSON Body

{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "contacts",
    "contacts": [
        {
            "name": {
                "formatted_name": "John Doe",
                "first_name": "John",
                "last_name": "Doe"
            },
            "phones": [
                {
                    "phone": "+919999999999",
                    "type": "WORK"
                }
            ],
            "emails": [
                {
                    "email": "john@example.com",
                    "type": "WORK"
                }
            ]
        }
    ]
}

Image Message

Image Message

Send an image via URL. Supported formats: JPEG, PNG.

cURL Example

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "image",
    "image": {
        "link": "https://example.com/pic.jpg",
        "caption": "Check this out"
    }
}'

JSON Body

{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "image",
    "image": {
        "link": "https://example.com/pic.jpg",
        "caption": "Check this out"
    }
}

Audio Message

Audio Message

Send an audio file. Supported formats: MP3, OGG, AMR.

cURL Example

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "audio",
    "audio": {
        "link": "https://example.com/audio.mp3"
    }
}'

JSON Body

{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "audio",
    "audio": {
        "link": "https://example.com/audio.mp3"
    }
}

Video Message

Video Message

Send a video file. Supported formats: MP4, 3GP.

cURL Example

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "video",
    "video": {
        "link": "https://example.com/video.mp4",
        "caption": "Product Demo Video"
    }
}'

JSON Body

{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "video",
    "video": {
        "link": "https://example.com/video.mp4",
        "caption": "Product Demo Video"
    }
}

Document Message

Document Message

Send a PDF or generic document.

cURL Example

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "document",
    "document": {
        "link": "https://example.com/invoice.pdf",
        "caption": "Your Invoice for Order #123"
    }
}'

JSON Body

{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "document",
    "document": {
        "link": "https://example.com/invoice.pdf",
        "caption": "Your Invoice for Order #123"
    }
}

Sticker Message

Sticker Message

Send a static or animated sticker (WebP format).

cURL Example

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "sticker",
    "sticker": {
        "link": "https://example.com/sticker.webp"
    }
}'

JSON Body

{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "sticker",
    "sticker": {
        "link": "https://example.com/sticker.webp"
    }
}

List Message (Menu)

List Message

Send a menu of up to 10 options. Safer than buttons as they don't disappear on click.

cURL Example

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "interactive",
    "interactive": {
        "type": "list",
        "header": { "type": "text", "text": "Select an Option" },
        "body": { "text": "Please choose a department to contact." },
        "footer": { "text": "Avianya Support" },
        "action": {
            "button": "View Menu",
            "sections": [
                {
                    "title": "Sales",
                    "rows": [
                        { "id": "sales_new", "title": "New Inquiry", "description": "Start a new project" }
                    ]
                },
                {
                    "title": "Support",
                    "rows": [
                        { "id": "support_tech", "title": "Tech Support", "description": "Fix an issue" }
                    ]
                }
            ]
        }
    }
}'

JSON Body

{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "interactive",
    "interactive": {
        "type": "list",
        "header": { "type": "text", "text": "Select an Option" },
        "body": { "text": "Please choose a department to contact." },
        "footer": { "text": "Avianya Support" },
        "action": {
            "button": "View Menu",
            "sections": [
                {
                    "title": "Sales",
                    "rows": [
                        { "id": "sales_new", "title": "New Inquiry", "description": "Start a new project" }
                    ]
                },
                {
                    "title": "Support",
                    "rows": [
                        { "id": "support_tech", "title": "Tech Support", "description": "Fix an issue" }
                    ]
                }
            ]
        }
    }
}

Reply Buttons

Reply Buttons

Send up to 3 quick reply buttons. Great for Yes/No questions.

cURL Example

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "interactive",
    "interactive": {
        "type": "button",
        "body": { "text": "Do you want to confirm your appointment?" },
        "action": {
            "buttons": [
                {
                    "type": "reply",
                    "reply": { "id": "btn_yes_1", "title": "Yes" }
                },
                {
                    "type": "reply",
                    "reply": { "id": "btn_no_1", "title": "No" }
                }
            ]
        }
    }
}'

JSON Body

{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "interactive",
    "interactive": {
        "type": "button",
        "body": { "text": "Do you want to confirm your appointment?" },
        "action": {
            "buttons": [
                {
                    "type": "reply",
                    "reply": { "id": "btn_yes_1", "title": "Yes" }
                },
                {
                    "type": "reply",
                    "reply": { "id": "btn_no_1", "title": "No" }
                }
            ]
        }
    }
}

Carousel (URL Buttons)

Carousel with URL Buttons

Scrollable carousel of cards, each with a link button.

cURL Example

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "interactive",
    "interactive": {
        "type": "carousel",
        "body": { "text": "Check out these items:" },
        "action": {
            "cards": [
                {
                    "card_index": 0,
                    "type": "cta_url",
                    "header": {
                        "type": "image",
                        "image": { "link": "https://example.com/img1.jpg" }
                    },
                    "body": { "text": "*Blue Echeveria*" },
                    "action": {
                        "name": "cta_url",
                        "parameters": {
                            "display_text": "Buy now",
                            "url": "https://shop.example.com/item1"
                        }
                    }
                },
                {
                    "card_index": 1,
                    "type": "cta_url",
                    "header": {
                         "type": "image",
                         "image": { "link": "https://example.com/img2.jpg" }
                    },
                    "body": { "text": "*Zebra Haworthia*" },
                    "action": {
                        "name": "cta_url",
                        "parameters": {
                            "display_text": "Buy now",
                            "url": "https://shop.example.com/item2"
                        }
                    }
                }
            ]
        }
    }
}'

JSON Body

{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "interactive",
    "interactive": {
        "type": "carousel",
        "body": { "text": "Check out these items:" },
        "action": {
            "cards": [
                {
                    "card_index": 0,
                    "type": "cta_url",
                    "header": {
                        "type": "image",
                        "image": { "link": "https://example.com/img1.jpg" }
                    },
                    "body": { "text": "*Blue Echeveria*" },
                    "action": {
                        "name": "cta_url",
                        "parameters": {
                            "display_text": "Buy now",
                            "url": "https://shop.example.com/item1"
                        }
                    }
                },
                {
                    "card_index": 1,
                    "type": "cta_url",
                    "header": {
                         "type": "image",
                         "image": { "link": "https://example.com/img2.jpg" }
                    },
                    "body": { "text": "*Zebra Haworthia*" },
                    "action": {
                        "name": "cta_url",
                        "parameters": {
                            "display_text": "Buy now",
                            "url": "https://shop.example.com/item2"
                        }
                    }
                }
            ]
        }
    }
}

Carousel (Quick Replies)

Carousel with Quick Replies

Carousel cards with actionable reply buttons.

cURL Example

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "interactive",
    "interactive": {
        "type": "carousel",
        "body": { "text": "Choose options for each item:" },
        "action": {
            "cards": [
                {
                    "card_index": 0,
                    "type": "cta_url",
                    "header": {
                        "type": "image",
                        "image": { "link": "https://example.com/img1.jpg" }
                    },
                    "body": { "text": "*Blue Echeveria*" },
                    "action": {
                        "buttons": [
                            {
                                "type": "quick_reply",
                                "quick_reply": { "id": "btn_1", "title": "Buy" }
                            }
                        ]
                    }
                }
            ]
        }
    }
}'

JSON Body

{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "interactive",
    "interactive": {
        "type": "carousel",
        "body": { "text": "Choose options for each item:" },
        "action": {
            "cards": [
                {
                    "card_index": 0,
                    "type": "cta_url",
                    "header": {
                        "type": "image",
                        "image": { "link": "https://example.com/img1.jpg" }
                    },
                    "body": { "text": "*Blue Echeveria*" },
                    "action": {
                        "buttons": [
                            {
                                "type": "quick_reply",
                                "quick_reply": { "id": "btn_1", "title": "Buy" }
                            }
                        ]
                    }
                }
            ]
        }
    }
}

Product Carousel

Product Carousel

Scrollable carousel of products from your Catalog.

cURL Example

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "interactive",
    "interactive": {
        "type": "carousel",
        "body": { "text": "Check out our featured products!" },
        "action": {
            "cards": [
                {
                    "card_index": 0,
                    "type": "product",
                    "action": { 
                        "product_retailer_id": "item_1", 
                        "catalog_id": "123456789" 
                    }
                },
                {
                    "card_index": 1,
                    "type": "product",
                    "action": { 
                        "product_retailer_id": "item_2", 
                        "catalog_id": "123456789" 
                    }
                }
            ]
        }
    }
}'

JSON Body

{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "interactive",
    "interactive": {
        "type": "carousel",
        "body": { "text": "Check out our featured products!" },
        "action": {
            "cards": [
                {
                    "card_index": 0,
                    "type": "product",
                    "action": { 
                        "product_retailer_id": "item_1", 
                        "catalog_id": "123456789" 
                    }
                },
                {
                    "card_index": 1,
                    "type": "product",
                    "action": { 
                        "product_retailer_id": "item_2", 
                        "catalog_id": "123456789" 
                    }
                }
            ]
        }
    }
}

Single Product

Single Product Message

Send a detailed view of a single product.

cURL Example

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "interactive",
    "interactive": {
        "type": "product",
        "body": { "text": "Check out this item!" },
        "action": {
            "catalog_id": "123456",
            "product_retailer_id": "product_sku_123"
        }
    }
}'

JSON Body

{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "interactive",
    "interactive": {
        "type": "product",
        "body": { "text": "Check out this item!" },
        "action": {
            "catalog_id": "123456",
            "product_retailer_id": "product_sku_123"
        }
    }
}

Multi-Product List

Multi-Product List

Send a curated list of up to 30 products organised in sections.

cURL Example

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "interactive",
    "interactive": {
        "type": "product_list",
        "header": { "type": "text", "text": "Our Best Sellers" },
        "body": { "text": "Select items to view details." },
        "action": {
            "catalog_id": "123456",
            "sections": [
                {
                    "title": "Summer Collection",
                    "product_items": [
                        { "product_retailer_id": "SKU_1" },
                        { "product_retailer_id": "SKU_2" }
                    ]
                }
            ]
        }
    }
}'

JSON Body

{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "interactive",
    "interactive": {
        "type": "product_list",
        "header": { "type": "text", "text": "Our Best Sellers" },
        "body": { "text": "Select items to view details." },
        "action": {
            "catalog_id": "123456",
            "sections": [
                {
                    "title": "Summer Collection",
                    "product_items": [
                        { "product_retailer_id": "SKU_1" },
                        { "product_retailer_id": "SKU_2" }
                    ]
                }
            ]
        }
    }
}

Catalog Message

Catalog Message

Send the entire storefront/catalog.

cURL Example

curl -X POST https://api.avianya.com/wa/partner/v1/{phone_number_id}/messages \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "interactive",
    "interactive": {
        "type": "catalog_message",
        "body": { "text": "Hello! Check out our latest collection." },
        "action": {
            "name": "catalog_message",
            "parameters": {
                "thumbnail_product_retailer_id": "product_sku_123"
            }
        }
    }
}'

JSON Body

{
    "messaging_product": "whatsapp",
    "to": "91xxxxxxxxxx",
    "type": "interactive",
    "interactive": {
        "type": "catalog_message",
        "body": { "text": "Hello! Check out our latest collection." },
        "action": {
            "name": "catalog_message",
            "parameters": {
                "thumbnail_product_retailer_id": "product_sku_123"
            }
        }
    }
}