📚 API Documentation

Build with Zaple API

Comprehensive API documentation to integrate WhatsApp Business API into your applications. Send messages, manage catalogs, and automate at scale.

🚀 Getting Started

Introduction

Welcome to the Zaple.ai API documentation. Our RESTful API allows you to integrate WhatsApp Business capabilities directly into your applications, enabling automated messaging, contact management, catalog sync, and more.

Base URL

https://app.zaple.ai

All API requests must be made over HTTPS. Calls made over plain HTTP will fail.

Authentication

Zaple uses API key and secret authentication. Include these headers in every request:

// Required Headers
Zaple-Api-Key: your_api_key
Zaple-Api-Secret: your_api_secret
Content-Type: application/json

💡 Tip: Get your API credentials from Settings → API & Developer

💬 Messaging API

POST /api/v2/send-template-message

Send a pre-approved WhatsApp template message to a single recipient. The required fields in the request body vary by template type. Select your template type below to see the precise parameters and request format.

For simple templates with no variables and no media header.

Parameter Type Required Description
template_id string Required Template ID from your library
country_code string Required Country code without + (e.g., "91")
send_to string Required Recipient phone number
curl --location 'https://app.zaple.ai/api/v2/send-template-message' --header 'Zaple-Api-Key: your_zaple_api_key' --header 'Zaple-Api-Secret: your_zaple_api_secret' --form 'template_id="21460221760533881199999"' --form 'country_code="91"' --form 'send_to="1234567890"'

Response

200 OK
{
    "status": "Message sent successfully.",
    "message_id": "x927831064523907185K9CDMYNReFgHIPWz"
}
GET /api/v2/template-details

Retrieve details of all approved message templates in your account.

Example (cURL)

curl --location 'https://app.zaple.ai/api/v2/template-details' --header 'Zaple-Api-Key: your_zaple_api_key' --header 'Zaple-Api-Secret: your_zaple_api_secret'

Response

200 OK
{
  "data": [
    {
      "name": "Order cancle",
      "template_id": "443657917386635402102430",
      "content": {
        "components": [
          {
            "type": "BODY",
            "text": "Hi, this is to confirm we have successfully canceled your recent order {{1}}.
Thank you.",
            "example": {
              "body_text": [["order"]]
            }
          },
          {
            "type": "BUTTONS",
            "buttons": [
              {
                "type": "PHONE_NUMBER",
                "text": "Call Now",
                "phone_number": "+911234567890"
              }
            ]
          }
        ],
        "language": "en_US",
        "status": "APPROVED",
        "category": "UTILITY"
      },
      "type": "UTILITY",
      "status": "APPROVED",
      "status_update_reason": "NONE",
      "header_type": "none"
    }
  ],
  "links": {
    "first": "https://app.zaple.ai/api/v2/template-details?page=1",
    "last": "https://app.zaple.ai/api/v2/template-details?page=10",
    "prev": null,
    "next": "https://app.zaple.ai/api/v2/template-details?page=2"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 10,
    "links": [
      {"url": null, "label": "« Previous", "active": false},
      {"url": "https://app.zaple.ai/api/v2/template-details?page=1", "label": "1", "active": true},
      {"url": "https://app.zaple.ai/api/v2/template-details?page=10", "label": "10", "active": false},
      {"url": "https://app.zaple.ai/api/v2/template-details?page=2", "label": "Next »", "active": false}
    ],
    "path": "https://app.zaple.ai/api/v2/template-details",
    "per_page": 10,
    "to": 10,
    "total": 96
  }
}
GET /api/v2/message-status

Check the delivery status of a sent message using its message ID.

Example (cURL)

curl --location 'https://app.zaple.ai/api/v2/message-status?message_id=Zhyfge1254HGYRTFGDdsw8545244HUETE' --header 'Zaple-Api-Key: your_zaple_api_key' --header 'Zaple-Api-Secret: your_zaple_api_secret' --header 'Content-Type: application/json' --header 'Accept: application/json'

Response

200 OK
{
   "sent_at": 2026-09-05 18:53:00,
   "delivered_at": 2026-09-05 18:53:12,
   "read_at": 2026-09-05 18:54:24,
   "is_failed": 0,
   "mobile_number": 919876543210
}
GET /api/v2/message-count

Get message count and usage statistics for your account.

Parameter Type Required Description
from_date string Optional Format = "yyyy-mm-dd hh:mm:ss"
to_date string Optional Format = "yyyy-mm-dd hh:mm:ss"

Example (cURL)

curl --location 'https://app.zaple.ai/api/v2/message-count' --header 'Zaple-Api-Key: your_zaple_api_key' --header 'Zaple-Api-Secret: your_zaple_api_secret' --header 'Content-Type: application/json' --header 'Accept: application/json'

Response

200 OK
{
    "total_messages": 12547,
    "sent": 12500,
    "read": 11425
}

Messaging API (v3)

POST /api/v3/send-template-message

Send a pre-approved WhatsApp template message using multipart/form-data for advanced configuration including direct file uploads, quick reply payloads, and arbitrary callback tracking data.

💡 v3 vs v2: v3 uses form-data (not JSON), supports direct file uploads via file, and adds quick_reply_payloadN and biz_opaque_callback_data fields. Use v3 when you need any of these capabilities.

For simple templates with no variables and no media header.

Parameter Type Required Description
template_id string Required Template ID from your library
country_code string Required Country code without + (e.g., "91")
send_to string Required Recipient phone number
quick_reply_payloadN string Optional Custom payload for quick replies
biz_opaque_callback_data string Optional Arbritrary tracking data
curl --location 'https://app.zaple.ai/api/v3/send-template-message' --header 'Zaple-Api-Key: your_zaple_api_key' --header 'Zaple-Api-Secret: your_zaple_api_secret' --form 'template_id="21460221760533881199999"' --form 'country_code="91"' --form 'send_to="1234567890"' --form 'quick_reply_payload1="approve_67_schedule"' --form 'quick_reply_payload2="reject_67_schedule"' --form 'biz_opaque_callback_data="{"appointment_id":52,"message_id":528}"'

Response

200 OK
{
    "status": "Message sent successfully.",
    "message_id": "x927831064523907185K9CDMYNReFgHIPWz"
}

List Templates (v3)

GET /api/v3/templates

Retrieve a paginated list of your WhatsApp templates. You can optionally append query parameters to filter and paginate the results.

Query Parameters

Parameter Type Required Description
search string Optional Search by template label, name, or category.
page integer Optional The page number (e.g., 1).
per_page integer Optional Number of templates per page (e.g., 10).
category string Optional Filter by category (UTILITY, MARKETING, AUTHENTICATION, CAROUSEL).
status string Optional Filter by status (APPROVED, PENDING, REJECTED).
active boolean Optional Pass 1 or true to get active templates.
favorite boolean Optional Pass 1 or true to get your favorite templates.

Request

curl --location --request GET 'https://app.zaple.ai/api/v3/templates?page=1&per_page=10'   --header 'Zaple-Api-Key: your_zaple_api_key'   --header 'Zaple-Api-Secret: your_zaple_api_secret'   --header 'Accept: application/json'

Responses

200 OK
{
  "status": "success",
  "data": {
    "templates": [
      {
        "name": "Order update",
        "template_id": "1234567890",
        "category": "UTILITY",
        "status": "APPROVED",
        "header_type": "TEXT",
        "is_favorite": false,
        "is_default": false,
        "variable_count": 2,
        "created_at": "2023-10-25T10:00:00Z"
      },
      {
        "name": "Welcome Message",
        "template_id": "0987654321",
        "category": "MARKETING",
        "status": "PENDING",
        "header_type": "IMAGE",
        "is_favorite": true,
        "is_default": false,
        "variable_count": 0,
        "created_at": "2023-10-24T14:30:00Z"
      }
    ],
    "stats": [
      {
        "label": "Templates Created",
        "value": "15"
      },
      {
        "label": "Approved",
        "value": "10"
      },
      {
        "label": "Pending/Rejected",
        "value": "5"
      }
    ],
    "meta": {
      "current_page": 1,
      "last_page": 2,
      "per_page": 10,
      "total": 15
    }
  }
}

Get Template Details (v3)

GET /api/v3/template/{id}

Retrieve details for a single WhatsApp template. The {id} path value is the template identifier used by the API.

Request

curl --location --request GET 'https://app.zaple.ai/api/v3/template/1234567890'   --header 'Zaple-Api-Key: your_zaple_api_key'   --header 'Zaple-Api-Secret: your_zaple_api_secret'   --header 'Accept: application/json'

Responses

200 OK
{
  "status": "success",
  "message": null,
  "data": {
    "template": {
      "name": "Order update",
      "category": "UTILITY",
      "status": "APPROVED",
      "header_type": "TEXT",
      "media": null,
      "components": "{"components": [{"type": "BODY", "text": "Hi {{1}}, your order {{2}} is ready."}]}"
    }
  }
}

The components field is returned as a stringified JSON payload.

Preview Template (v3)

GET /api/v3/template/1234567890/preview

Preview a WhatsApp template using its template identifier. This helps verify the template content before using it in live requests.

Request

curl --location --request GET 'https://app.zaple.ai/api/v3/template/21460221760533881199999/preview'   --header 'Zaple-Api-Key: your_zaple_api_key'   --header 'Zaple-Api-Secret: your_zaple_api_secret'   --header 'Accept: application/json'

Responses

200 OK

Standard template preview

{
  "status": "success",
  "message": null,
  "data": {
    "template": {
      "id": 8547451245878454788754,
      "name": "Template Label/Title",
      "category": "MARKETING",
      "status": "APPROVED",
      "header_type": "text",
      "media": "https://app.zaple.ai/storage/media/example.png",
      "components": "[{"type": "HEADER", "format": "TEXT", "text": "Order Update"}, ...]",
      "extra_details": "{"is_order_details": false, ...}",
      "template_type": "utility",
      "is_carousal": 0,
      "is_flow": false,
      "flow_id": null,
      "variable_type": "numeric",
      "is_product_carousel": null,
      "is_order_details": null
    },
    "preview": {
      "contentType": "text",
      "header": "Order Update",
      "body": "Hello {{1}}, your order {{2}} has been confirmed.",
      "footer": "Thank you for shopping!",
      "buttons": [
        {
          "type": "quick_reply",
          "text": "Track Order",
          "url": null,
          "phone_number": null
        }
      ],
      "templateMedia": "https://app.zaple.ai/storage/media/example.png",
      "isCarousel": false
    }
  }
}

Create Template (v3)

POST /api/v3/create-template

Submit a WhatsApp template for Meta review. Zaple creates the template record, uploads optional header media, submits the template to Meta, refreshes the saved Meta components, and returns the local template_id you can use after approval.

WARNING: Zaple-Api-Key and Zaple-Api-Secret authorize template creation. Keep them on your server, store them in environment variables, and never place them in browser JavaScript, mobile app bundles, or public repositories.

Header Required Description
Zaple-Api-Key Required API key from Settings > API & Developer.
Zaple-Api-Secret Required API secret paired with the same WABA account.
Content-Type Required Use application/json for URL/base64 media, or multipart/form-data when uploading a PDF/video file.

Request Fields

Parameter Type Required Description
title string Required Internal label shown in Zaple. Maximum 255 characters.
category string Required One of utility, marketing, utility_marketing, or authentication. utility_marketing submits as utility and allows Meta category change.
language string Required WhatsApp language code such as en_US or en. Authentication templates are submitted with en_US.
content string Required Template body text. Use variables as {{1}}, {{2}}, or named variables when variable_type is named. Not required for authentication templates.
contentType string Optional none, text, image, video, document, or location. Defaults to none.
headerText string Optional Text header when contentType is text. Maximum 60 characters.
templateImage string Conditional Required for contentType=image. Send a public image URL or a base64 data URI.
templateVideo string or file object Conditional Required for contentType=video. Send a public video URL or upload templateVideo[file] as multipart data.
templateDocument string or PDF file Conditional Required for contentType=document. Send a public PDF URL or upload a PDF as multipart data.
templateLocation object Conditional Required for contentType=location. Include name, address, latitude, and longitude.
footerText string Optional Footer text. Maximum 60 characters.
variable_type string Optional Use numeric for positional variables or named for named Meta parameters. Defaults to numeric.
variable_samples array Optional Example values for template variables. Each item can be up to 1000 characters.
buttons array Optional Supports quick_reply, url, phone_number, copy_offer_code, and catalog. Button labels must be unique.
addSecurityRecommendation, copyOtpButtonText, enableCodeExpiration, codeExpirationMinutes mixed Auth only Include these when category is authentication. The OTP button text is used for the Meta copy-code button.

Create a Text Template

curl --location 'https://app.zaple.ai/api/v3/create-template'   --header 'Zaple-Api-Key: your_zaple_api_key'   --header 'Zaple-Api-Secret: your_zaple_api_secret'   --header 'Accept: application/json'   --header 'Content-Type: application/json'   --data '{
    "title": "Order update",
    "category": "utility",
    "language": "en_US",
    "contentType": "text",
    "headerText": "Order update",
    "content": "Hi {{1}}, your order {{2}} is ready for pickup.",
    "footerText": "Reply STOP to opt out",
    "variable_type": "numeric",
    "variable_samples": ["Priya", "ORD-1007"],
    "buttons": [
      {
        "type": "quick_reply",
        "replies": [
          { "text": "Track order" },
          { "text": "Contact support" }
        ]
      }
    ]
  }'

Create an Image Template

curl --location 'https://app.zaple.ai/api/v3/create-template'   --header 'Zaple-Api-Key: your_zaple_api_key'   --header 'Zaple-Api-Secret: your_zaple_api_secret'   --header 'Accept: application/json'   --header 'Content-Type: application/json'   --data '{
    "title": "New collection launch",
    "category": "marketing",
    "language": "en_US",
    "contentType": "image",
    "templateImage": "https://example.com/new-collection.jpg",
    "content": "Hi {{1}}, our new collection is live. Tap below to explore.",
    "variable_samples": ["Aarav"],
    "buttons": [
      {
        "type": "url",
        "websites": [
          {
            "text": "Shop now",
            "url": "https://example.com/collections"
          }
        ]
      }
    ]
  }'

Create an Authentication Template

curl --location 'https://app.zaple.ai/api/v3/create-template'   --header 'Zaple-Api-Key: your_zaple_api_key'   --header 'Zaple-Api-Secret: your_zaple_api_secret'   --header 'Accept: application/json'   --header 'Content-Type: application/json'   --data '{
    "title": "Login OTP",
    "category": "authentication",
    "language": "en_US",
    "contentType": "none",
    "addSecurityRecommendation": true,
    "copyOtpButtonText": "Copy code",
    "enableCodeExpiration": true,
    "codeExpirationMinutes": "10"
  }'

Responses

200 OK
{
  "success": true,
  "status_code": 200,
  "message": "Template submitted for review.",
  "template_id": 12345
}

Fetch Template for Editing (v3)

GET /api/v3/template/{id}/edit
Important: The {id} in the URL must be the numeric database ID of the template (e.g., 123).

Fetch the payload of an existing template so that the frontend can load it into the editor. This endpoint performs strict validations before allowing a template to be fetched for editing.

Request

curl --location --request GET 'https://app.zaple.ai/api/v3/template/123/edit' \
  --header 'Zaple-Api-Key: your_zaple_api_key' \
  --header 'Zaple-Api-Secret: your_zaple_api_secret' \
  --header 'Accept: application/json'

Responses

200 OK (Allowed to Edit)
{
  "success": true,
  "template_kind": "normal",
  "isEditing": true,
  "duplicate_template_id": 123,
  "template": {
    "id": 123,
    "title": "Order update",
    "category": "UTILITY",
    "language": "en_US",
    "content": "Hi {{1}}, your order {{2}} is ready.",
    "content_type": "TEXT",
    "header_text": "Order update",
    "footer_text": "Reply STOP to opt out",
    "media": null,
    "buttons": [],
    "variable_samples": ["Priya", "ORD-1007"],
    "variable_type": "numeric",
    "is_secure": 0,
    "is_flow": false
  }
}

Update Template (v3)

POST /api/v3/update-template

Update an existing WhatsApp template. You must provide the template_id along with the new template details.

Parameter Type Required Description
template_id number Required ID of the template to update
title string Required Title of the template
category string Required Template category (e.g., utility, marketing)
language string Required Template language code (e.g., en_US)
contentType string Required Type of content (e.g., text, image, video)
content string Required Body content of the template
headerText string Optional Text for the template header
footerText string Optional Text for the template footer
variable_type string Optional Type of variable (e.g., numeric)
variable_samples array Optional Sample values for the variables in the content
buttons array Optional Array of button objects (e.g., quick_reply, url)
curl --location 'https://app.zaple.ai/api/v3/update-template' \
  --header 'Zaple-Api-Key: your_zaple_api_key' \
  --header 'Zaple-Api-Secret: your_zaple_api_secret' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
    "template_id": 123,
    "title": "Order update",
    "category": "utility",
    "language": "en_US",
    "contentType": "text",
    "headerText": "Order update",
    "content": "Hi {{1}}, your order {{2}} is ready for pickup.",
    "footerText": "Reply STOP to opt out",
    "variable_type": "numeric",
    "variable_samples": ["Priya", "ORD-1007"],
    "buttons": [
      {
        "type": "quick_reply",
        "replies": [
          { "text": "Track order" },
          { "text": "Contact support" }
        ]
      }
    ]
  }'

Responses

200 OK
{
  "success": true,
  "status_code": 200,
  "message": "Template submitted for review.",
  "template_id": 123
}

Check Template Status (v3)

GET /api/v3/template/status

Check whether a template exists for your WABA account and whether Meta has approved it. Use this before sending if you need to confirm that the template identifier is ready for API use.

Note: template_id must be the Zaple template identifier used by the send-template API (templates.name in the app), not the template title/label. If you only have the local numeric id returned by create-template, fetch the template from Zaple first and use its API template identifier.

Header Required Description
Zaple-Api-Key Required API key from Settings > API & Developer.
Zaple-Api-Secret Required API secret paired with the same WABA account.

Query Parameters

Parameter Type Required Description
template_id string Required Template identifier used by Zaple API sending, for example 475546217187442007.

Request

curl --location 'https://app.zaple.ai/api/v3/template/status?template_id=475546217187442007'   --header 'Zaple-Api-Key: your_zaple_api_key'   --header 'Zaple-Api-Secret: your_zaple_api_secret'   --header 'Accept: application/json'

Responses

200 OK
{
  "status": "APPROVED",
  "template_id": "356449517806357372921670"
}

Activate/Deactivate Template (v3)

POST /api/v3/template-activation

Toggle the activation status of a template. Note that template_id refers to the unique name identifier of the template (e.g. the name or API template identifier), not the database primary key. Use activation_status of 1 to activate and 0 to deactivate.

Request Fields

Parameter Type Required Description
template_id string Required The unique name identifier of the template.
activation_status string Required Pass 1 to activate or 0 to deactivate the template.

Request

curl --location 'https://app.zaple.ai/api/v3/template-activation' \
  --header 'Zaple-Api-Key: your_zaple_api_key' \
  --header 'Zaple-Api-Secret: your_zaple_api_secret' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
    "template_id": "1234567890",
    "activation_status": "1"
  }'

Responses

200 OK
{
  "status": "Template activated successfully"
}

If activation_status is 0, the message will be "Template deactivated successfully".

Delete Template (v3)

POST /api/v3/template/delete
Important: This endpoint expects the numeric database ID of the template (e.g., 15) passed as an integer.

Delete a template. This successfully deletes the template locally and schedules it for deletion on Meta. Note that a template cannot be deleted if it is actively being used for a scheduled broadcast or rebroadcast.

Request Fields

Parameter Type Required Description
template_id integer Required The numeric database ID of the template.

Request

curl --location 'https://app.zaple.ai/api/v3/template/delete' \
  --header 'Zaple-Api-Key: your_zaple_api_key' \
  --header 'Zaple-Api-Secret: your_zaple_api_secret' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
    "template_id": 15
  }'

Responses

200 OK
{
  "success": true,
  "message": "Template deleted successfully"
}

Webhook Responses (v3)

When using v3 with opaque callback data or quick reply buttons, you will receive more detailed webhook events.

1. Message Sent Status

Includes biz_opaque_callback_data returned natively from WhatsApp.

{
  "object": "whatsapp_business_account",
  "entry": [
    {
      "id": "1147896940776789",
      "changes": [
        {
          "field": "messages",
          "value": {
            "messaging_product": "whatsapp",
            "metadata": {
              "display_phone_number": "911234567890",
              "phone_number_id": "838463922683351"
            },
            "statuses": [
              {
                "id": "wamid.HBgMOTE4ODY2MjMwNjYzFQIAERgSNzc2RUEzMEQwQUQ1NzhGNjZCAA==",
                "status": "sent",
                "timestamp": "1771854964",
                "recipient_id": "911234567890",
                "biz_opaque_callback_data": "{\"type\":\"zaple_api_call\",\"user_id\":\"56\",\"extra\":{\"send_to\":\"911234567890\",\"appointment_id\":\"52\",\"message_id\":\"528\"}}",
                "pricing": {
                  "billable": false,
                  "pricing_model": "PMP",
                  "category": "utility",
                  "type": "free_customer_service"
                }
              }
            ]
          }
        }
      ]
    }
  ]
}

2. Button Payload Webhook

Received when the user taps on your quick reply button. Includes the button payload originally passed in the send request.

{
  "object": "whatsapp_business_account",
  "entry": [
    {
      "id": "1147896940776789",
      "changes": [
        {
          "field": "messages",
          "value": {
            "messaging_product": "whatsapp",
            "metadata": {
              "display_phone_number": "911234567890",
              "phone_number_id": "838463922683351"
            },
            "contacts": [
              {
                "profile": {
                  "name": "test"
                },
                "wa_id": "911234567890"
              }
            ],
            "messages": [
              {
                "context": {
                  "from": "911234567890",
                  "id": "wamid.HBgMOTE4ODY2MjMwNjYzFQIAERgSNzc2RUEzMEQwQUQ1NzhGNjZCAA=="
                },
                "from": "911234567890",
                "id": "wamid.HBgMOTE4ODY2MjMwNjYzFQIAEhgWM0VCMEM3MDk5RTEyQkMyRDMwMjE5NAA=",
                "timestamp": "1771855045",
                "type": "button",
                "button": {
                  "payload": "approve_67_schedule",
                  "text": "Approve"
                }
              }
            ]
          }
        }
      ]
    }
  ]
}

3. Template Status Update Webhook

Received when the status of a message template changes (e.g., approved, rejected).

{
  "object": "whatsapp_business_account",
  "entry": [
    {
      "id": "1763896107907630",
      "time": 1780986772,
      "changes": [
        {
          "field": "message_template_status_update",
          "value": {
            "event": "APPROVED",
            "message_template_id": 1714854899796281,
            "message_template_name": "32744451781006434446818",
            "message_template_language": "en_US",
            "message_template_category": "MARKETING",
            "reason": "NONE",
            "waba_id": "1763896107907630"
          }
        }
      ]
    }
  ]
}

💬 Service Messages API

Generate and send new service messages.

Generate New Service Messages API

POST /api/v2/send-service-message

Send rich service messages over WhatsApp. Choose a template type and the payload validators for text, image, audio, video, location, or contact headers appear in the same tab.

Send a plain text service message.

Parameter Type Required Description
country_code string Required Country code without + (e.g., "91")
send_to string Required Recipient mobile number
type string Required Message type. Use text
text string Required Text message content

Request

curl --location 'https://app.zaple.ai/api/v2/send-service-message' --header 'Zaple-Api-Key: you_zaple_api_key' --header 'Zaple-Api-Secret: you_zaple_api_secret' --form 'country_code="91"' --form 'send_to="1234567890"' --form 'type="text"' --form 'text="hello, how are you?"'

Response

200 OK
{"status": Message Sent Successfully,  "message_id": "58761684655asdsad"}

📦 Batch API

Send messages to multiple recipients efficiently using batch operations.

POST /api/v2/lists

Create a new batch list for bulk messaging. Upload contacts with their template variables.

Parameters

Parameter Type Required Description
name string Required Name of the batch list

Request

curl --location 'https://app.zaple.ai/api/v2/lists' --header 'Zaple-Api-Key: your_zaple_api_key' --header 'Zaple-Api-Secret: your_zaple_api_secret' --form 'name="Zaple - Batch API"'

Response

200 Created
{
    "status": true,
    "list_id": 12345,
    "message": "List created successfully."
}
POST /api/v2/messages/batch

Trigger a batch message send for an existing list using a template.

Request Parameters

Parameter Type Required Description
template_id string Required Template ID to use for the batch send. Make sure the selected template's required fields and variables are not missing before triggering the batch.
list_id string Required Existing batch list ID that should receive the message send.
scheduled_datetime string Conditional Required if schedule_enabled is true. Scheduled date/time; ISO strings or JS Date strings are accepted and normalized to Asia/Kolkata. Example: 2026-06-20 15:30:00
scheduled_enabled boolean Optional Enable or disable scheduled batch sending. Use true to schedule the batch and false to send without scheduling. When true, provide scheduled_datetime.

Request

curl --location 'https://app.zaple.ai/api/v2/messages/batch' --header 'Zaple-Api-Key: your_zaple_api_key' --header 'Zaple-Api-Secret: your_zaple_api_secret' --form 'template_id="231245217727840054064050"' --form 'list_id="6574"'

Response

200 OK
{
    "status": true,
    "batch_id": "batch_17369325432094653",
    "message": "Batch message request submitted successfully."
}
POST /api/v2/lists/{list_id}/contacts

Create or update contacts inside a batch list.

Request

curl --location 'https://app.zaple.ai/api/v2/lists/6574/contacts' --header 'Zaple-Api-Key: your_zaple_api_key' --header 'Zaple-Api-Secret: your_zaple_api_secret' --header 'Content-Type: application/json' --data '{
  "contacts": [
    {
      "country_code": "91",
      "phone_number": "9876543210",
      "name": "John Doe"
    },
    {
      "country_code": "1",
      "phone_number": "5550123",
      "name": "Jane Smith"
    }
  ]
}
'

Response

200 OK
{
    "success": true,
    "message": "Contacts added/updated successfully."
}
GET /api/v2/batch/{id}/status

Check the processing status of a batch operation.

Request

curl --location --request GET 'https://app.zaple.ai/api/v2/messages/batch/batch_1772790945798814/status' --header 'Zaple-Api-Key: your_zaple_api_key' --header 'Zaple-Api-Secret: your_zaple_api_secret' --form 'template_id="231245217727840054064050"' --form 'list_id="6574"'

Response

200 OK
{
    "success": true,
    "batch_id": "batch_173693254320885494653",
    "status": "completed",
    "total_messages": 500,
    "sent": 307,
    "delivered": 298,
    "read": 253,
    "failed": 0
}
GET /api/v2/batch/{id}/details

Get detailed information about a batch including delivery stats and failed messages.

Request

curl --location --request GET 'https://app.zaple.ai/api/v2/messages/batch/batch_1772790945798814/details' --header 'Zaple-Api-Key: your_zaple_api_key' --header 'Zaple-Api-Secret: your_zaple_api_secret' --form 'template_id="231245217727840054064050"' --form 'list_id="6574"'

Response

200 OK
{
  "success": true,
  "batch_id": "batch_17369325432094653",
  "status": "completed",
  "total_messages": 500,
  "messages": {
    "data": [
      {
        "phone_number": 911234567890,
        "is_sent": 1,
        "sent_at": "2024-09-05 18:53:00",
        "is_delivered": 1,
        "is_failed": 0
      }
    ],
    "links": {
      "first": "...",
      "last": "...",
      "prev": null,
      "next": "..."
    },
    "meta": {
      "current_page": 1,
      "from": 1,
      "last_page": 90,
      "per_page": 20,
      "to": 20,
      "total": 1800
    }
  }
}
DELETE /api/v2/lists/{id}

Delete a customer list and all associated records.

Request

curl --location --request DELETE 'https://app.zaple.ai/api/v2/lists/6574' --header 'Zaple-Api-Key: your_zaple_api_key' --header 'Zaple-Api-Secret: your_zaple_api_secret' --form 'template_id="231245217727840054064050"' --form 'list_id="6574"'

Response

200 OK
{
  "status": true,
  "message": "List deleted successfully."
}
DELETE /api/v2/messages/batch/{batch_id}

Delete a future scheduled broadcast batch created through the API.

Request

curl --location --request DELETE 'https://app.zaple.ai/api/v2/messages/batch/batch_17369325432094653' --header 'Zaple-Api-Key: your_zaple_api_key' --header 'Zaple-Api-Secret: your_zaple_api_secret'

Response

200 OK
{
  "status": true,
  "message": "Batch deleted successfully."
}

🛍️ Catalog API

Manage product catalogs and sync with WhatsApp Commerce.

GET /api/v2/catalogs

Get all catalogs for the authenticated user.

Request

curl --location 'https://app.zaple.ai/api/v2/catalogs' --header 'Zaple-Api-Key: your_zaple_api_key' --header 'Zaple-Api-Secret: your_zaple_api_secret'

Response

200 OK
{
  "success": true,
  "data": [
    {
      "id": "1514923905937285",
      "name": "Summer Collection",
      "vertical": "commerce"
    }
  ]
}
POST /api/v2/catalogs

Create a new product catalog.

Request

curl --location 'https://app.zaple.ai/api/v2/catalogs' --header 'Zaple-Api-Key: your_zaple_api_key' --header 'Zaple-Api-Secret: your_zaple_api_secret' --form 'name="Zaple - Batch API"'

Response

200 OK
{
  "success": true,
  "data": {
    "id": "1514923905937285",
    "name": "New Catalog"
  },
  "message": "Catalog created successfully"
}
POST /api/v2/catalogs/{catalog_id}/connect

Connect a catalog to your WhatsApp Business Account.

Parameters

Parameter Type Required Description
catalog_id string Required ID of the catalog to connect

Examples

curl --location --request POST 'https://app.zaple.ai/api/v2/catalogs/4077255635858041/connect' --header 'Zaple-Api-Key: your_zaple_api_key' --header 'Zaple-Api-Secret: your_zaple_api_secret'

Response

200 OK
{
  "success": true,
  "data": {
    "status": "connected"
  },
  "message": "Catalog connected successfully"
}
POST /api/v2/catalogs/{catalog_id}/disconnect

Disconnect a catalog from your WhatsApp Business Account.

Parameters

Parameter Type Required Description
catalog_id string Required ID of the catalog to disconnect

Examples

curl --location --request POST 'https://app.zaple.ai/api/v2/catalogs/4077255635858041/disconnect' --header 'Zaple-Api-Key: your_zaple_api_key' --header 'Zaple-Api-Secret: your_zaple_api_secret'

Response

200 OK
{
  "success": true,
  "data": {
    "success": true
  },
  "message": "Catalog disconnected successfully"
}
GET /api/v2/catalogs/{catalog_id}/products

List all products in a catalog.

Request

curl --location 'https://app.zaple.ai/api/v2/catalogs/4077255635858041/products' --header 'Zaple-Api-Key: your_zaple_api_key' --header 'Zaple-Api-Secret: your_zaple_api_secret'

Response

200 OK
{
  "success": true,
  "data": [
    {
      "id": "41734658883668",
      "name": "Premium T-Shirt",
      "retailer_id": "TSH-001",
      "price": "599",
      "currency": "INR",
      "image_url": "https://example.com/image.jpg"
    }
  ]
}
POST /api/v2/catalogs/{catalog_id}/products

Create a new product inside a specific catalog.

Request

curl --location 'https://app.zaple.ai/api/v2/catalogs/4077255635858041/products' --header 'Zaple-Api-Key: your_zaplel_api_key' --header 'Zaple-Api-Secret: your_zaple_api_secret' --header 'Content-Type: application/json' --data '{
  "name": "Men'''s Classic Blue Jeans",
  "retailer_id": "SKU-12345",
  "price": 1299.00,
  "currency": "INR",
  "image_url": "https://example.com/images/jeans-main.jpg",
  "description": "High-quality slim fit blue jeans made from 100% organic cotton.",
  "brand": "Zaple Fashion",
  "category": "Apparel & Accessories > Clothing > Pants > Jeans",
  "condition": "new",
  "availability": "in stock",
  "url": "https://example.com/products/mens-classic-blue-jeans",
  "gender": "male",
  "size": "32",
  "color": "Blue",
  "material": "Denim",
  "pattern": "Solid",
  
  "sale_price": 999.00,
  "sale_price_start_date": "2024-03-01T00:00:00Z",
  "sale_price_end_date": "2024-03-31T23:59:59Z",
  
  "additional_image_urls": [
    "https://example.com/images/jeans-back.jpg",
    "https://example.com/images/jeans-side.jpg"
  ],
  "inventory": 50,
  "product_type": "Apparel",
  "origin_country": "IN",
  "visibility": "published"
}
'

Response

201 Created
{
  "success": true,
  "data": {
    "id": "41734658883668",
    "retailer_id": "TSH-001"
  },
  "message": "Product created successfully"
}
GET /api/v2/catalogs/commerce-settings

Retrieve your commerce configuration such as currency, country and visibility defaults.

Request

curl --location 'https://app.zaple.ai/api/v2/commerce/settings' --header 'Zaple-Api-Key: your_zaple_api_key' --header 'Zaple-Api-Secret: your_zaple_api_secret'

Response

200 OK
{
  "success": true,
  "data": {
    "catalog_id": "1514923905937285",
    "is_catalog_connected": true,
    "shop_status": "enabled",
    "cart_enabled": true
  }
}
POST /api/v2/catalogs/{catalog_id}/visibility

Toggle whether a catalog is visible to customers.

Request

curl --location 'https://app.zaple.ai/api/v2/catalogs/4077255635858041/visibility' --header 'Zaple-Api-Key: your_zaple_api_key' --header 'Zaple-Api-Secret: your_zaple_api_secret' --header 'Content-Type: application/json' --data '{
    "visible": true
}'

Response

200 OK
{
  "success": true,
  "data": {
    "success": true
  },
  "message": "Catalog visibility updated successfully"
}

🎯 Leads API

Capture leads from your website, landing pages, mobile apps, or backend systems and send them directly into Zaple Leads Hub with source tracking, deduplication, and custom fields.

POST /api/v1/leads

Submit a lead into the account connected to your Leads API credentials. Zaple resolves the customer account from the API key and secret, so you do not need to send a user_id.

WARNING: Do not place your Leads API secret in browser JavaScript, mobile app bundles, or any public client code. Submit leads from your backend or a secure serverless function, then call Zaple from there.

Base URL

https://app.zaple.ai/api

Primary endpoint

POST /api/v1/leads

Authentication

Use the Leads API credentials from Leads settings. The secret is visible only when credentials are first created or rotated.

X-Zaple-Api-Key: zpl_lead_xxx
X-Zaple-Api-Secret: zpls_xxx
Content-Type: application/json

Request Example

curl -X POST 'https://app.zaple.ai/api/v1/leads'   -H 'Content-Type: application/json'   -H 'X-Zaple-Api-Key: zpl_lead_xxx'   -H 'X-Zaple-Api-Secret: zpls_xxx'   -d '{
    "full_name": "Aisha Khan",
    "phone": "+971501234567",
    "email": "[email protected]",
    "campaign_name": "Website Pricing Form",
    "message": "Interested in the annual plan",
    "source": "website_form",
    "external_event_id": "website-form-123",
    "utm_source": "google",
    "utm_medium": "cpc",
    "utm_campaign": "spring_launch",
    "custom_fields": {
      "city": "Dubai",
      "budget": "25000",
      "preferred_plan": "Enterprise"
    },
    "meta": {
      "page_url": "https://example.com/pricing",
      "referrer": "https://google.com"
    }
  }'

Fields & Custom Fields

Every request must include at least one identity: phone, primary_phone, email, or primary_email. Use custom_fields for any extra form answers you want to keep on the lead.

Field Type Description
full_name string Lead name shown in Leads Hub.
phone string Lead phone number. Required if no email is provided.
email string Lead email address. Required if no phone is provided.
campaign_name string Campaign, ad, form, or landing page label.
message string Free-text inquiry or form message.
source string Optional source. Defaults to website_form.
external_event_id string Idempotency key from your system to prevent duplicate processing.
utm_source, utm_medium, utm_campaign string Campaign attribution fields saved with the lead.
meta object Extra metadata such as page URL, referrer, or form ID.
custom_fields object Custom answers saved on the lead and merged on repeat submissions.
{
  "custom_fields": {
    "property_type": "Apartment",
    "budget": "25000",
    "move_in_timeline": "Next month",
    "newsletter_opt_in": true
  }
}

Responses & Errors

A successful request creates or updates the matching lead after Zaple deduplicates by phone or email. Repeated requests with the same idempotency value return the existing result.

{
  "message": "Lead captured successfully",
  "data": {
    "id": 1842,
    "display_name": "Aisha Khan",
    "source": "website_form"
  },
  "inbound_event_id": 9811
}

Zaple removes API keys, API secrets, tokens, passwords, and secret-like fields before storing lead audit payloads.

🔔 Webhooks

Receive real-time notifications for messages, delivery updates, and more.

Webhook Setup

Configure your webhook URL in Settings → Webhooks

// Your server should accept POST requests
// with JSON body containing event data
{
  "event": "message.received",
  "timestamp": "2024-02-07T12:00:00Z",
  "data": { ... }
}

Ready to Start Building?

Get your API keys and start integrating WhatsApp into your application today.