Pingtochat The WhatsApp Business Platform with pingtochat. Articles WhatsApp Api International SMS API RCS Documentation WhatsApp Api The WhatsApp API enables businesses to integrate WhatsApp messaging into their customer communication workflows, providing a reliable, secure, and scalable way to interact with customers. It supports sending notifications, automated messages, and real-time customer interactions. Features of the WhatsApp API in Pingtochat Rich Messaging Supports text, images, videos and documents. Interactive messages like buttons and list messages. Notification Messaging Send alerts, order updates, and reminders to customers. Business Profile Display company information, contact details, and catalogs. Multi-Agent Access Support multiple agents interacting through one WhatsApp number. Signing Up To use Pingtochat Messaging APIs with WhatsApp, you will need a WhatsApp-enabled phone number, also referred to as a WhatsApp Sender. Once you have an approved WhatsApp Sender, continue on below to get started with a WhatsApp Create Token in the language of your choice! API Overview The REST API allows developers to interact programmatically with our platform to access and manage resources such as users, messages, and configurations. It follows standard RESTful principles, ensuring a stateless, secure, and scalable design. With the REST API, you can: Send messages Fetch , list and delete messages Fetch , list and delete media messages We have three categories of messaging, which are Marketing Utility Authentication We provide simple messages and template messages. Template messages also support media messages. Authentication To add authentication, you need to register on our platform Pingtochat and log in to your account. Then, create the API key and access token. Click here on Add Token to learn more about creating the token. Create Token First, you need to create an API key and token for WhatsApp configuration. To create these, click on the Pingtochat Register link to register, or the Pingtochat Login link to log in to Pingtochat. After successfully registering or logging in, you will find an option to add an API key and token on the left side of the dashboard. To Generate Token Navigate to: Settings ->API ->Token. Select your WABA ID and Sender ID, then choose the version. Finally, click the “Generate Token” button to create your Token Generate the Whatsapp Sender If you don’t have a WhatsApp sender number, click the “Register” link for Sender ID to create one. Follow the steps provided to complete the registration process. Once registered, ensure the sender number is verified and linked to your account before proceeding with token generation. Webhook Pingtochat supports webhooks that can alert you of the following via callback URLs. Messages received Messages sent (Template & Session) Status of the messages sent (Sent/Delivered/read) How to add a Webhook to Pingtochat? Navigate to:Settings ->API ->Webhook. Create an HTML URL for the webhook. Enter your Hub Verification Token in the designated field on the webhook form. When an event occurs, we will send the hub verify token along with the hub challenge to the provided URL. For verification, the customer must return the same hub challenge to confirm receipt. This ensures successful integration and validation of webhook events. Example : <?php $input = file_get_contents('php://input'); $hub_challenge = json_decode($input)->hub_challenge; $verify_token = json_decode($input)->hub_verify_token; $expected_token = '123'; if ($verify_token === $expected_token) { http_response_code(200); echo $hub_challenge; exit; } http_response_code(400); echo json_encode(["message" => "Bad request!"]); ?> Session Message A session message in WhatsApp refers to any message exchanged between a business and a customer within a 24-hour messaging window that starts when the customer sends a message to the business. These messages are not pre-approved by WhatsApp and can include free-form text, media, or interactive content. URL http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/simpleMessages Method POST Headers Content-Type: application/json Authorization: Bearer <your_access_token> Request Payloads Sending a Text Message The payload for sending a plain text message via the WhatsApp API is structured as follows: Example : { "messaging_product": "whatsapp", "to": "91xxxxxxxxxx", "type": "text", "text": { "body": "Hello!" } } Field Descriptions messaging_product: (string) Specifies the messaging product. For WhatsApp, this is always whatsapp. to: (string) The recipient’s phone number in E.164 format. Example: 919880132082. type: (string) The type of message being sent. Use text for plain text messages. text: (object) Contains the message text. body: (string) The text message content. Example: "Hello!". Response Example Success Response A successful request returns a 200 OK status and a response payload similar to the following: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "RfzuNs4qpN" } ] } Field Descriptions messaging_product: (string) The messaging product used. Always whatsapp. contacts: (array) Contains information about the recipient. input: (string) The phone number you provided in the request. wa_id: (string) The WhatsApp ID associated with the provided phone number. messages: (array) Contains information about the sent message. id: (string) The unique identifier for the sent message. Notes Domain and Credentials: Replace {{your_domain}}, {{phone_number_id}}, and {{key}} with your API domain, phone number ID, and API key respectively. Rate Limits: Ensure your API calls comply with the rate limits set by WhatsApp to avoid being throttled. Session Window: Text messages can only be sent within a 24-hour window of the last user interaction. Template Pre-Approval: For template messages, ensure they are approved in the WhatsApp Business Manager before use. Language Code Matching: Language codes in templates must match the approved template language. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “text”, “text”: { “body”: “Hello!” } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “text”, “text”: { “body”: “Hello!” } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”text\”,\r\n \”text\”: {\r\n \”body\”: \”Hello!\”\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “text”, “text”: { “body”: “Hello!” } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “text”, “text”: { “body”: “Hello!” } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”text\”,\r\n \”text\”: {\r\n \”body\”: \”Hello!\”\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “text”, “text”: { “body”: “Hello!” } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Whatsapp In PinToChat, we provide three distinct categories of messages, each with its own supported types and functionalities Categories: Authentication: Supports only the Body component for message templates. Primarily used for identity verification and authentication purposes, such as sending OTPs or login confirmations. Marketing: Supports all types of messaging, including text and media. Ideal for promotional campaigns and engaging with users through rich media content. Utility: Supports all types of messaging, including text and media. Designed for sending notifications, alerts, and other informative content. Message Types: Messages are available in two main types: Text: Simple text-based messages for quick and clear communication. Media: Includes rich content for enhanced engagement, categorized into: Image: Sending photos or images. Video: Sharing video clips. Document: Sending files like PDFs, Word documents, or spreadsheets Message Types: Messages are available in two main types: Text: Simple text-based messages for quick and clear communication. Media: Includes rich content for enhanced engagement, categorized into: Image: Sending photos or images. Video: Sharing video clips. Document: Sending files like PDFs, Word documents, or spreadsheets. Button Types: Interactive buttons can be added to messages for better user engagement. The available button types are: Quick Reply Button: Enables users to respond quickly with predefined options. Visit Website Button: Directs users to a specific webpage. URL Button: Opens a designated URL in the browser. Phone Number Button: Allows users to call a predefined phone number directly. WhatsApp Number Button (Call on WhatsApp): Initiates a call directly on WhatsApp to a given contact. Copy Offer Code Button: Provides an option to copy a promo or offer code to the clipboard. Authentication Template Message API Authentication templates are specialized message formats used by businesses to verify user identities through one-time passcodes (OTPs) delivered via messaging platforms like WhatsApp. These templates ensure secure and efficient user authentication during processes such as account verification, recovery, and integrity challenges. Key Features of Authentication Templates: Preset Message Content: The templates include fixed text, such as “<VERIFICATION_CODE> is your verification code,” along with optional security disclaimers and expiration warnings. Interactive Buttons: They feature buttons like “COPY_CODE,” which allows users to copy the OTP to their clipboard, and “ONE_TAP,” enabling automatic code autofill within the app. Zero-Tap Authentication Templates Zero-tap authentication templates allow your users to receive one-time passwords or codes via WhatsApp without having to leave your app.’ One-Tap Autofill Authentication Templates One-tap autofill authentication templates allow you to send a one-time password or code along with an one-tap autofill button to your users. When a WhatsApp user taps the autofill button, the WhatsApp client triggers an activity which opens your app and delivers it the password or code. Copy Code Authentication Templates Copy code authentication templates allow you to send a one-time password or code along with a copy code button to your users. When a WhatsApp user taps the copy code button, the WhatsApp client copies the password or code to the device’s clipboard. The user can then switch to your app and paste the password or code into your app. Marketing Template Message API Overview Marketing templates on WhatsApp are designed to send promotional messages, share information about products or services, or communicate business-related updates. These templates are pre-approved by WhatsApp and must comply with the platform’s policies to ensure they provide value to users without being spammy or intrusive. Below is the detailed documentation on marketing templates, their structure, and best practices. Key Characteristics of Marketing Templates Purpose: To promote products, services, or offers. To share informational updates about the business. To engage users with campaigns, announcements, or events. Use Cases: Sending special offers or discounts. Announcing a new product or service. Inviting users to events or webinars. Sharing business updates, such as holiday hours or relocations. Compliance: Must adhere to WhatsApp’s Business Policy. Requires explicit user opt-in for promotional content. Components of a Marketing Template Marketing templates can consist of the following elements: 1. Header (Optional) Type: Text, Image, Video, or Document. Purpose: To grab attention with a visually appealing or textual header. Example: Including a product image or a “Special Offer” banner. 2. Body (Required) Type: Text. Purpose: Contains the primary message content, such as promotional text or product details. Example: “Get 20% off on your next purchase! Use code SAVE20. Offer valid till Jan 31, 2025.” “Introducing our latest collection! Check it out now and enjoy exclusive discounts.” 3. Footer (Optional) Type: Text. Purpose: Provides additional context, disclaimers, or contact information. Example: “Terms and conditions apply. Visit our website for more details.” 4. Buttons (Optional) Types: Quick Reply , URL ,Phone Number and Copy Code Purpose: To encourage user interaction and provide actionable options. Quick Reply: Predefined responses (e.g., “I’m interested”). URL: Redirects to a webpage (e.g., “Shop Now”). Phone: Contact number or Company Phone number (e.f., +919xxxxxxxxx). Copy Code : Use the code for any offers (e,g.,”12345axw”). Utility Template Message API Overview Utility templates on WhatsApp are specifically designed to provide functional and transactional support for existing orders or accounts. These templates are pre-approved by WhatsApp to ensure they meet compliance guidelines and are not used for promotional or marketing purposes. Below is the documentation detailing their usage, structure, and limitations. Key Characteristics of Utility Templates Purpose: To provide updates related to a customer’s existing order or account. Includes transactional messages such as: Order confirmations. Shipping updates. Account notifications (e.g., password reset). Restrictions: Cannot be used for marketing or promotional purposes. Only supports transactional and service-related use cases. Compliance: Must comply with WhatsApp’s Business Policy. Requires prior approval in WhatsApp Business Manager. Components of a Utility Template Utility templates can consist of the following dynamic and static elements: 1. Header (Optional) Type: Text, Image, Video, or Document. Purpose: To highlight the primary content of the message. Example: Including an order invoice or a delivery tracking image. 2. Body (Required) Type: Text. Purpose: Contains the main content of the message. Example: “Your order #12345 has been shipped. Track your delivery here: [tracking link].” “Your account password was successfully changed.” 3. Footer (Optional) Type: Text. Purpose: Adds additional context, disclaimers, or legal information. Example: “For assistance, reply HELP or contact our support.” 4. Buttons (Optional) Types: Quick Reply ,URL and Phone Number. Purpose: To enhance interactivity by providing actionable options. Quick Reply: For user responses (e.g., “Need Assistance”). URL: Redirect to a webpage (e.g., “Track Your Order”). Phone: Contact number or Company Phone number (e.f., +919xxxxxxxxx). Authentication Template Creation API Marketing Template Creation API Utility Template Creation API Edit Templates API Edit Authentication Template API Template Library Template status check Overview The Template Status Check API allows users to retrieve the approval status of a specific WhatsApp Business API message template. This API is useful for monitoring template approvals and ensuring that a template is available for use in messaging. API End point http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_status Replace the placeholders with: {phone_number_id} → Your WhatsApp Business Account phone number ID. {key} → Your authentication key (API key or access token). {template_id} → The unique ID of the template whose status is being checked. Example Response Success Response (Template Found) { "success": true, "id": "353335", "name": "edit_al", "category": "marketing", "status": "APPROVED" } Explanation of Fields success Type: boolean Value: true or false Description: Indicates whether the API request was successful. id Type: string Example: "353335" Description: A unique identifier assigned to the template. name Type: string Example: "edit_al" Description: The name of the WhatsApp template. category Type: string Example: "marketing" Description: Specifies the category of the template (e.g., "marketing", "utility", "authentication"). status Type: string Values: "APPROVED", "PENDING", "REJECTED" Description: The current approval status of the template. Postman Supported File Formats This document outlines the supported file types that can be sent as attachments in a session message. Attachments are categorized by media type: Image, Video, Audio, and Documents. 1. 📷 Image Attachments Image files can be shared to visually communicate content such as photos, screenshots, infographics, or promotional materials. FormatDescription.jpgJPEG image format. Widely used for photos and web graphics..pngPortable Network Graphics. Supports transparency, ideal for UI elements and screenshots. 2. 🎥 Video Attachments Video files allow for sending motion content, tutorials, clips, and marketing videos. FormatDescription.3gp3GPP multimedia format, optimized for mobile use..mp4MPEG-4 format. Commonly used for high-quality video and audio compression. 3. 📄 Document Attachments Documents can be shared to convey textual, tabular, or presentation-based information. FormatDescription.txtPlain text file. Lightweight format for notes or code..xlsMicrosoft Excel (Legacy). Spreadsheet format for tabular data..xlsxMicrosoft Excel (Modern). Supports advanced Excel features..docMicrosoft Word (Legacy). Used for formatted text documents..docxMicrosoft Word (Modern). Common word processing format..pptMicrosoft PowerPoint (Legacy). Used for slide presentations..pptxMicrosoft PowerPoint (Modern). Supports multimedia presentations..pdfPortable Document Format. Preserves layout and formatting across devices. Error Types Pingtochat uses conventional HTTP response codes to indicate the success or failure of an API request.Below, we provide some common error codes: API Verification Code Error code Description300Your token not valid.301Your key is Invalid.303Your current key phrase is expired. Please regenerate token.304User is not valid.305phone_number_id is incorrect.306waba sender id data not found.307WabaConfiguration not found.308SupplierConfiguration Token is Required.309Api Service Not Activated.310Domain not valid.311User Supplier Configuration Not Activated. Contact to Support.312WhatsApp API Setting URL and Token Required.313Supplier Operator not providing service.314missing whatsapp service packages table data Template Creation Code Error CodeDescription400Required whatsapp number or contact group or contact upload.401Creadits Not Sufficient to send message.403There is already content for this template. You can create a new template and try again.404Template Not Found for You. Default Rate Limits CategoryLimitTime WindowGeneral Requests1000 requestsPer HourHigh-Volume APIs200 requestsPer MinuteBulk Operations5000 requests (e.g., message sends)Per Day Flow Template Creation Sandbox International SMS API Introduction Introduction to International APIs An International API (Application Programming Interface) enables software applications to interact across borders by providing access to global services, data, or platforms. These APIs are designed to support multi-language, multi-currency, and multi-regional operations, making them essential for businesses that operate in multiple countries or serve international users. International APIs can be found in various domains such as: Payments and Banking (e.g., Stripe, PayPal, Wise) Shipping and Logistics (e.g., FedEx, DHL, EasyPost) Travel and Booking (e.g., Skyscanner, Amadeus, Booking.com) Localization and Translation (e.g., Google Translate, Microsoft Translator) Social Media and Communication (e.g., WhatsApp Business API, Facebook Graph API) These APIs help developers: Standardize integration with international services. Handle global compliance and localization. Enable real-time communication and data exchange across countries. As globalization increases, international APIs play a key role in connecting businesses, services, and users worldwide. Create Token First, you need to create an API key and token for WhatsApp configuration. To create these, click on the Pingtochat Register link to register, or the Pingtochat Login link to log in to Pingtochat. After successfully registering or logging in, you will find an option to add an API key and token on the left side of the dashboard. To Generate Token Navigate to: Settings ->API ->Internationak SMS Token. Select your WABA ID and Sender ID, then choose the version. Finally, click the “Generate Token” button to create your Token Generate the Whatsapp Sender If you don’t have a WhatsApp sender number, click the “Register” link for Sender ID to create one. Follow the steps provided to complete the registration process. Once registered, ensure the sender number is verified and linked to your account before proceeding with token generation. Send SMS API Overview This API allows you to send international SMS messages via the Your Domain (pingtochat.com) service. It is useful for businesses looking to reach users across different countries with messages such as alerts, notifications, OTPs, or promotional content. URL https://{{your_domain}}/api/v1.0/{{key}}/Internationalsms Method POST Headers Content-Type: application/json Authorization: Bearer <your_access_token> Request PayloadsYour Domain (pingtochat.com) Sending a Text Message The payload for sending a plain text message via the WhatsApp API is structured as follows: Example : { "messaging_product": "sms", "to": "91 xxxxxxxxxx", "from": "PINGTOCHAT", "message": "test message", "templateId":6, "bulkId":1 } Field description FieldTypeDescriptionmessaging_productstringType of messaging product (must be "sms" for SMS sending).tostringRecipient’s mobile number in international format. E.g., "91xxxxxxxxxx".fromstringSender name or ID (e.g., "PINGTOCHAT").messagestringMessage content to be sent.templateIdintID of the predefined message template (if applicable).bulkIdintID for grouping multiple messages as a bulk operation. ✅ Success Response HTTP 200 OK { "status": "success", "messaging_product": "sms", "bulk_id": 1, "contacts": [ { "phone_number": "+91xxxxxxxxxx", "status": "sent" } ], "messages": [ { "transaction_id": "ABCDEFGHIJ" } ] } ❌ Error Responses HTTP StatusMeaningSample Error Message400Bad Request"Invalid phone number format"401Unauthorized"Invalid API key"403Forbidden"Access denied"500Internal Server Error"Unexpected error occurred. Try again later" RCS Documentation RCS stands for Rich Communication Services. It’s a protocol designed to enhance traditional SMS (Short Message Service) and MMS (Multimedia Messaging Service) by offering a richer, more interactive messaging experience. While SMS is limited to basic text messages, RCS supports multimedia content, group chats, read receipts, typing indicators, and many other advanced features. Introduction Create Token Basic Template Create Overview This API allows you to create a basic RCS template with a text type. A basic template is a simpler form of RCS message that contains text-based content only, making it ideal for simple notifications, greetings, or alerts. API Endpoint POST https://{{your_domain}}/api/v1.0/{{key}}/rcs_templates URL Parameters: {{key}}: The account key in the URL should be replaced with your actual account key. . HTTP Method POST: This method is used to send the data to create a new RCS template. Headers Content-Type: application/json Authorization: Bearer <your_access_token> Replace <your_access_token> with your actual Bearer token for authentication. Request Payload The request body should be a JSON object containing the RCS template details. Below is an example of the JSON payload for creating a new RCS template: Example Request Payload: { "name": "welcome_template", "type": "basic", "basic_types": "text", "components": [ { "message": "welcome to PINGTOCHAT" } ] } Field Descriptions: Field NameTypeDescriptionnamestringThe name of the template (e.g., "welcome_template"). This is used for identification.typestringThe type of template. For a basic template, this should be "basic".basic_typesstringThe type of basic template. For text content, this should be "text".componentsarrayAn array that contains the components of the template (e.g., messages).messagestringThe text content of the template (e.g., "welcome to PINGTOCHAT"). Success Response If the template is successfully created, you will receive a 200 OK HTTP status with the details of the newly created template. Example Response: { "id": "3232", "status": "PENDING", "type": "BASIC" } Single Template Creation Overview This API allows you to create RCS templates for rich communication services. These templates can contain multiple cards, each with a title, description, media content, and buttons. The API is helpful for businesses that want to send rich, interactive messages to users via platforms that support RCS. API Endpoint POST https://{{your_domain}}/api/v1.0/{{key}}/rcs_templates URL Parameters: {{key}}: The account key in the URL should be replaced with your actual account key. . HTTP Method POST: This method is used to send the data to create a new RCS template. Headers Content-Type: application/json Authorization: Bearer <your_access_token> Replace <your_access_token> with your actual Bearer token for authentication. Request Payload The request body should be a JSON object containing the RCS template details. Below is an example of the JSON payload for creating a new RCS template: Example Request Payload: { "name": "template_name", "type": "advance", "advance_types": "single", "orientation": "vertical", "components": [ { "cards": [ { "title": "your_title", "description": "your_description", "media": { "height": "MEDIUM", "fileUrl": "https://your_file_path" }, "buttons": [ { "type": "url", "text": "link", "url": "https://example.com" }, { "type": "call", "text": "call now", "number": "9198xxxxxxxx" } ] } ] } ] } Field Descriptions: Field NameTypeDescriptionnamestringThe name of the template, typically used for identification. Example: "rcs_template_one".typestringThe type of template. It can be “advance” (for rich templates with media).advance_typesstringSpecifies the type of advance template. For example, “single”.orientationstringThe orientation of the template. Can be “vertical” or “horizontal”.componentsarrayAn array containing the template components (e.g., cards).cardsarrayAn array of cards in the template, each representing a message or content block.titlestringThe title of the card (e.g., "HI").descriptionstringA description or content for the card (e.g., "This is a sample rcs description").mediaobjectThe media object for the card, containing the height and fileUrl.heightstringSpecifies the height of the media. Example: “MEDIUM”.fileUrlstringThe URL to the media file to be included in the card. Example: image URL.buttonsarrayAn array of buttons for interaction in the card (e.g., link, call).typestringThe type of button, e.g., “url” (a link button) or “call” (a call button).textstringThe text displayed on the button (e.g., "link", "call now").urlstringThe URL to be opened when the user clicks the button (for “url” type buttons).numberstringThe phone number to be called when the “call” button is clicked. Success Response If the template is created successfully, the server will return a 200 OK status with details of the created template. Example Response: { "id": "3232", "status": "PENDING", "type": "ADVANCE" } Multicard Template Creation Overview This API allows you to create multiple RCS templates with a slider configuration. The slider type template lets you add multiple cards to the message, where each card can contain different content such as images, text, and interactive buttons. These types of templates are ideal for promotional offers, product galleries, or multiple steps in an onboarding process. API Endpoint POST https://{{your_domain}}/api/v1.0/{{key}}/rcs_templates URL Parameters: {{key}}: The account key in the URL should be replaced with your actual account key. . HTTP Method POST: This method is used to send the data to create a new RCS template. Headers Content-Type: application/json Authorization: Bearer <your_access_token> Replace <your_access_token> with your actual Bearer token for authentication. Request Payload The request body should be a JSON object containing the RCS template details. Below is an example of the JSON payload for creating a new RCS template: Example Request Payload: { "name": "template_name", "type": "advance", "advance_types": "slider", "thumbnail_alignment": "left", "card_width": "small", "components": [ { "cards": [ { "title": "title_one", "description": "description_one", "media": { "height": "MEDIUM", "fileUrl": "https://example.com/image.png" }, "buttons": [ { "type": "url", "text": "link", "url": "https://example.com" }, { "type": "call", "text": "call now", "number": "9198xxxxxxxx" } ] }, { "title": "title_two", "description": "description_two", "media": { "height": "MEDIUM", "fileUrl": "https://example.com/image.png" }, "buttons": [ { "type": "url", "text": "link", "url": "https://example.com" }, { "type": "call", "text": "call now", "number": "9198xxxxxxxx" } ] } ] } ] } Field Descriptions: Field NameTypeDescriptionnamestringThe name of the template (e.g., "template_one"). This is used for identification.typestringThe type of template. For an advance template, this should be "advance".advance_typesstringThe type of advance template. For a slider template, this should be "slider".thumbnail_alignmentstringThe alignment of the thumbnail for the media. Can be “left” or “right”.card_widthstringThe width of each card in the template. Options could include “small”, “medium”, or “large”.componentsarrayAn array that contains the template components (e.g., cards).cardsarrayA list of cards in the template, each representing a different content block.titlestringThe title of the card (e.g., "title_one").descriptionstringA description or content for the card (e.g., "description_one").mediaobjectThe media object for the card, containing the height and fileUrl.heightstringThe height of the media. This can be “SMALL”, “MEDIUM”, or “LARGE”.fileUrlstringThe URL of the image or media file. Example: "https://example.com/image.png".buttonsarrayA list of buttons to be included on the card. Each button can have a different type (e.g., “url” or “call”).typestringThe type of button. Can be “url” for a link button or “call” for a call button.textstringThe text displayed on the button (e.g., "link", "call now").urlstringThe URL to open when the “url” button is clicked. Example: "https://example.com".numberstringThe phone number to be called when the “call” button is clicked. Example: "9198xxxxxxxx". Success Response If the template is successfully created, you will receive a 200 OK HTTP status, along with the details of the newly created template. Example Response: { "id": "3232", "status": "PENDING", "type": "ADVANCE" } Send Single Card Message Overview This API allows you to send an RCS message to an individual recipient, using an advance card template. The message can contain a single card with media, buttons, title, and description. It’s ideal for sending rich content, such as promotional offers, product updates, or alerts, to a user’s device. API Endpoint POST https://{{your_domain}}/api/v1.0/{{key}}/rcs_message {{your_domain}}: Replace this with your actual domain (e.g., pingtochat.com). {{key}}: Replace this with your API key. HTTP Method POST: Used to send a message using the provided template. Headers Content-Type: application/json Authorization: Bearer <your_access_token> Replace <your_access_token> with your actual Bearer token for authentication. Request Payload This is the JSON structure used to send the RCS message with a single card template: Example Request Payload: { "messaging_product": "rcs", "recipient_type": "individual", "to": "9198xxxxxxxx", "type": "advance", "template": { "name": "basicmessgage", "components": [ { "cards": [ { "title": "your_title", "description": "your_description", "media": { "height": "MEDIUM", "fileUrl": "https://your_image_path" }, "buttons": [ { "type": "url", "text": "link", "url": "https://example.com" }, { "type": "call", "text": "call now", "number": "9198xxxxxxxx" } ] } ] } ] } } Field Description Field NameTypeDescriptionExamplemessaging_productStringSpecifies the messaging product. Set to "rcs" for RCS messaging."rcs"recipient_typeStringDefines the recipient type. Set to "individual" for sending messages to an individual user."individual"toStringThe phone number of the recipient. This is where the message will be sent."9198xxxxxxxx"typeStringDefines the type of the template. For an advanced template, this should be "advance"."advance"templateObjectContains the template details for the message. Includes the template name and components (e.g., cards).N/Atemplate.nameStringThe name of the template, used for identification."basicmessage"template.componentsArrayAn array containing the components of the message (e.g., cards, media, buttons).N/Atemplate.components.cardsArrayAn array of cards that make up the template. Each card can have a title, description, media, and buttons.N/Atemplate.components.cards.titleStringThe title of the card, typically a headline or product name."your_title"template.components.cards.descriptionStringA short description of the card content (e.g., product details, promotional text)."your_description"template.components.cards.mediaObjectContains media details like image URL and height.N/Atemplate.components.cards.media.heightStringSpecifies the height of the media. Can be "SMALL", "MEDIUM", or "LARGE"."MEDIUM"template.components.cards.media.fileUrlStringThe URL of the image or media file that will be displayed in the card."https://your_image_path"template.components.cards.buttonsArrayAn array of buttons to be included in the card. Each button can be either a URL button or a call button.N/Atemplate.components.cards.buttons.typeStringThe type of button. It can be "url" (to open a link) or "call" (to initiate a call)."url" or "call"template.components.cards.buttons.textStringThe text displayed on the button (e.g., “link”, “call now”)."link" or "call now"template.components.cards.buttons.urlStringThe URL to open when the button type is "url"."https://example.com"template.components.cards.buttons.numberStringThe phone number to call when the button type is "call"."9198xxxxxxxx" Success Response If the message is successfully sent, you will receive a 200 OK HTTP status, along with details about the sent message. Example Response: { "status": "success", "message": "Message send successfully", "transaction_id": "abvXXXXXXXXX" } Send Basic Message Overview This API allows you to send a basic RCS message to an individual recipient. In this case, no media, buttons, or advanced components are included, just a simple text message using a basic template. API Endpoint POST https://{{your_domain}}/api/v1.0/{{key}}/rcs_message {{your_domain}}: Replace this with your actual domain (e.g., pingtochat.com). {{key}}: Replace this with your API key. HTTP Method POST: Used to send the basic message. Headers Content-Type: application/json Authorization: Bearer <your_access_token> Replace <your_access_token> with your actual Bearer token for authentication. Request Payload This is the JSON structure used to send the basic RCS message with no advanced components: Example Request Payload: { "messaging_product": "rcs", "recipient_type": "individual", "to": "9198xxxxxxxx", "type": "basic", "template": { "name": "basicmessgage", "components": [ { "message": "Hello! Welcome to P2C." } ] } } Field description Field NameTypeDescriptionExamplemessaging_productStringSpecifies the messaging product. Set to "rcs" for RCS messaging."rcs"recipient_typeStringDefines the recipient type. Set to "individual" for sending messages to an individual user."individual"toStringThe phone number of the recipient. This is where the message will be sent."9198xxxxxxxx"typeStringDefines the type of the template. For a basic template, this should be "basic"."basic"templateObjectContains the template details for the message. Includes the template name and components (e.g., message body).N/Atemplate.nameStringThe name of the template, used for identification."basicmessage"template.componentsArrayAn array containing the components of the message. In this case, it contains a single message.N/Atemplate.components.messageStringThe actual message content that will be displayed in the message body."Hello! Welcome to P2C." Success Response If the message is successfully sent, you will receive a 200 OK HTTP status, along with details about the sent message. Example Response: { "status": "success", "message": "Message send successfully", "transaction_id": "abcxxxxxxxx" } Send Carousel Message Overview This API allows you to create and send advanced RCS templates with carousel configuration. The carousel template enables you to display multiple cards that users can swipe through. Each card can contain different content such as images, text, and interactive buttons. This template is ideal for showcasing multiple products, offers, or steps in a process. API Endpoint POST https://{{your_domain}}/api/v1.0/{{key}}/rcs_message {{your_domain}}: Replace this with your actual domain (e.g., pingtochat.com). {{key}}: Replace this with your API key. HTTP Method POST: Used to send the basic message. Headers Content-Type: application/json Authorization: Bearer <your_access_token> Replace <your_access_token> with your actual Bearer token for authentication. Request Payload This is the JSON structure used to send the basic RCS message with no advanced components: Example Request Payload: { "messaging_product": "rcs", "recipient_type": "individual", "to": "9198xxxxxxxx", "type": "advance", "template": { "name": "basicmessage", "components": [ { "cards": [ { "title": "title_one", "description": "description_one", "media": { "height": "MEDIUM", "fileUrl": "https://example.com/image.png" }, "buttons": [ { "type": "url", "text": "link", "url": "https://example.com" }, { "type": "call", "text": "call now", "number": "9198xxxxxxxx" } ] }, { "title": "title_two", "description": "description_two", "media": { "height": "MEDIUM", "fileUrl": "https://example.com/image.png" }, "buttons": [ { "type": "url", "text": "link", "url": "https://example.com" }, { "type": "call", "text": "call now", "number": "9198xxxxxxxx" } ] } ] } ] } } Field Descriptions: Field NameTypeDescriptionExamplemessaging_productStringSpecifies the messaging product. Set to "rcs" for RCS messaging."rcs"recipient_typeStringDefines the recipient type. Set to "individual" for sending messages to an individual user."individual"toStringThe phone number of the recipient. This is where the message will be sent."9198xxxxxxxx"typeStringDefines the type of template. For an advanced carousel template, this should be "advance"."advance"templateObjectContains the template details for the message. Includes the template name and components (e.g., cards).N/Atemplate.nameStringThe name of the template, used for identification."basicmessage"template.componentsArrayAn array containing the components of the message. In this case, it contains an array of cards.N/Atemplate.components.cardsArrayContains an array of cards, each representing a different part of the message (e.g., image, text, buttons).N/Atemplate.components.cards.titleStringThe title for the card, typically a heading or the name of the product/offer."title_one"template.components.cards.descriptionStringA short description or content for the card (e.g., product details, promo description)."description_one"template.components.cards.mediaObjectContains media details like the image URL and height.N/Atemplate.components.cards.media.heightStringSpecifies the height of the media (e.g., "SMALL", "MEDIUM", or "LARGE")."MEDIUM"template.components.cards.media.fileUrlStringThe URL to the image or media content displayed on the card."https://example.com/image.png"template.components.cards.buttonsArrayA list of buttons that are interactive on the card. Buttons can be of types "url" or "call".N/Atemplate.components.cards.buttons.typeStringThe type of button. This can either be "url" (to open a link) or "call" (to make a call)."url", "call"template.components.cards.buttons.textStringThe label text displayed on the button (e.g., "link", "call now")"link", "call now"template.components.cards.buttons.urlStringThe URL to open when the button type is "url"."https://example.com"template.components.cards.buttons.numberStringThe phone number to dial when the button type is "call"."9198xxxxxxxx" Success Response If the template is successfully created, you will receive a 200 OK HTTP status, along with the details of the newly created template. Example Response: { "status": "success", "message": "Message send successfully", "transaction_id": "abcxxxxxxxx" }
WhatsApp Api The WhatsApp API enables businesses to integrate WhatsApp messaging into their customer communication workflows, providing a reliable, secure, and scalable way to interact with customers. It supports sending notifications, automated messages, and real-time customer interactions. Features of the WhatsApp API in Pingtochat Rich Messaging Supports text, images, videos and documents. Interactive messages like buttons and list messages. Notification Messaging Send alerts, order updates, and reminders to customers. Business Profile Display company information, contact details, and catalogs. Multi-Agent Access Support multiple agents interacting through one WhatsApp number. Signing Up To use Pingtochat Messaging APIs with WhatsApp, you will need a WhatsApp-enabled phone number, also referred to as a WhatsApp Sender. Once you have an approved WhatsApp Sender, continue on below to get started with a WhatsApp Create Token in the language of your choice! Articles API Overview Create Token Webhook Session Message Whatsapp Authentication Template Message API Marketing Template Message API Utility Template Message API Authentication Template Creation API Marketing Template Creation API Utility Template Creation API Edit Templates API Edit Authentication Template API Template Library Template status check Postman Supported File Formats Error Types Flow Template Creation Sandbox API Overview The REST API allows developers to interact programmatically with our platform to access and manage resources such as users, messages, and configurations. It follows standard RESTful principles, ensuring a stateless, secure, and scalable design. With the REST API, you can: Send messages Fetch , list and delete messages Fetch , list and delete media messages We have three categories of messaging, which are Marketing Utility Authentication We provide simple messages and template messages. Template messages also support media messages. Authentication To add authentication, you need to register on our platform Pingtochat and log in to your account. Then, create the API key and access token. Click here on Add Token to learn more about creating the token. Create Token First, you need to create an API key and token for WhatsApp configuration. To create these, click on the Pingtochat Register link to register, or the Pingtochat Login link to log in to Pingtochat. After successfully registering or logging in, you will find an option to add an API key and token on the left side of the dashboard. To Generate Token Navigate to: Settings ->API ->Token. Select your WABA ID and Sender ID, then choose the version. Finally, click the “Generate Token” button to create your Token Generate the Whatsapp Sender If you don’t have a WhatsApp sender number, click the “Register” link for Sender ID to create one. Follow the steps provided to complete the registration process. Once registered, ensure the sender number is verified and linked to your account before proceeding with token generation. Webhook Pingtochat supports webhooks that can alert you of the following via callback URLs. Messages received Messages sent (Template & Session) Status of the messages sent (Sent/Delivered/read) How to add a Webhook to Pingtochat? Navigate to:Settings ->API ->Webhook. Create an HTML URL for the webhook. Enter your Hub Verification Token in the designated field on the webhook form. When an event occurs, we will send the hub verify token along with the hub challenge to the provided URL. For verification, the customer must return the same hub challenge to confirm receipt. This ensures successful integration and validation of webhook events. Example : <?php $input = file_get_contents('php://input'); $hub_challenge = json_decode($input)->hub_challenge; $verify_token = json_decode($input)->hub_verify_token; $expected_token = '123'; if ($verify_token === $expected_token) { http_response_code(200); echo $hub_challenge; exit; } http_response_code(400); echo json_encode(["message" => "Bad request!"]); ?> Session Message A session message in WhatsApp refers to any message exchanged between a business and a customer within a 24-hour messaging window that starts when the customer sends a message to the business. These messages are not pre-approved by WhatsApp and can include free-form text, media, or interactive content. URL http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/simpleMessages Method POST Headers Content-Type: application/json Authorization: Bearer <your_access_token> Request Payloads Sending a Text Message The payload for sending a plain text message via the WhatsApp API is structured as follows: Example : { "messaging_product": "whatsapp", "to": "91xxxxxxxxxx", "type": "text", "text": { "body": "Hello!" } } Field Descriptions messaging_product: (string) Specifies the messaging product. For WhatsApp, this is always whatsapp. to: (string) The recipient’s phone number in E.164 format. Example: 919880132082. type: (string) The type of message being sent. Use text for plain text messages. text: (object) Contains the message text. body: (string) The text message content. Example: "Hello!". Response Example Success Response A successful request returns a 200 OK status and a response payload similar to the following: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "RfzuNs4qpN" } ] } Field Descriptions messaging_product: (string) The messaging product used. Always whatsapp. contacts: (array) Contains information about the recipient. input: (string) The phone number you provided in the request. wa_id: (string) The WhatsApp ID associated with the provided phone number. messages: (array) Contains information about the sent message. id: (string) The unique identifier for the sent message. Notes Domain and Credentials: Replace {{your_domain}}, {{phone_number_id}}, and {{key}} with your API domain, phone number ID, and API key respectively. Rate Limits: Ensure your API calls comply with the rate limits set by WhatsApp to avoid being throttled. Session Window: Text messages can only be sent within a 24-hour window of the last user interaction. Template Pre-Approval: For template messages, ensure they are approved in the WhatsApp Business Manager before use. Language Code Matching: Language codes in templates must match the approved template language. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “text”, “text”: { “body”: “Hello!” } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “text”, “text”: { “body”: “Hello!” } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”text\”,\r\n \”text\”: {\r\n \”body\”: \”Hello!\”\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “text”, “text”: { “body”: “Hello!” } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “text”, “text”: { “body”: “Hello!” } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”text\”,\r\n \”text\”: {\r\n \”body\”: \”Hello!\”\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “text”, “text”: { “body”: “Hello!” } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Whatsapp In PinToChat, we provide three distinct categories of messages, each with its own supported types and functionalities Categories: Authentication: Supports only the Body component for message templates. Primarily used for identity verification and authentication purposes, such as sending OTPs or login confirmations. Marketing: Supports all types of messaging, including text and media. Ideal for promotional campaigns and engaging with users through rich media content. Utility: Supports all types of messaging, including text and media. Designed for sending notifications, alerts, and other informative content. Message Types: Messages are available in two main types: Text: Simple text-based messages for quick and clear communication. Media: Includes rich content for enhanced engagement, categorized into: Image: Sending photos or images. Video: Sharing video clips. Document: Sending files like PDFs, Word documents, or spreadsheets Message Types: Messages are available in two main types: Text: Simple text-based messages for quick and clear communication. Media: Includes rich content for enhanced engagement, categorized into: Image: Sending photos or images. Video: Sharing video clips. Document: Sending files like PDFs, Word documents, or spreadsheets. Button Types: Interactive buttons can be added to messages for better user engagement. The available button types are: Quick Reply Button: Enables users to respond quickly with predefined options. Visit Website Button: Directs users to a specific webpage. URL Button: Opens a designated URL in the browser. Phone Number Button: Allows users to call a predefined phone number directly. WhatsApp Number Button (Call on WhatsApp): Initiates a call directly on WhatsApp to a given contact. Copy Offer Code Button: Provides an option to copy a promo or offer code to the clipboard. Authentication Template Message API Authentication templates are specialized message formats used by businesses to verify user identities through one-time passcodes (OTPs) delivered via messaging platforms like WhatsApp. These templates ensure secure and efficient user authentication during processes such as account verification, recovery, and integrity challenges. Key Features of Authentication Templates: Preset Message Content: The templates include fixed text, such as “<VERIFICATION_CODE> is your verification code,” along with optional security disclaimers and expiration warnings. Interactive Buttons: They feature buttons like “COPY_CODE,” which allows users to copy the OTP to their clipboard, and “ONE_TAP,” enabling automatic code autofill within the app. Zero-Tap Authentication Templates Zero-tap authentication templates allow your users to receive one-time passwords or codes via WhatsApp without having to leave your app.’ One-Tap Autofill Authentication Templates One-tap autofill authentication templates allow you to send a one-time password or code along with an one-tap autofill button to your users. When a WhatsApp user taps the autofill button, the WhatsApp client triggers an activity which opens your app and delivers it the password or code. Copy Code Authentication Templates Copy code authentication templates allow you to send a one-time password or code along with a copy code button to your users. When a WhatsApp user taps the copy code button, the WhatsApp client copies the password or code to the device’s clipboard. The user can then switch to your app and paste the password or code into your app. Parameter with button This API enables you to send WhatsApp authentication template messages using the provided template configuration. The messages are sent to individual recipients using a specific template ID, phone number ID, and API key. Request Format HTTP Method POST API Version V1.0 Request URL http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Body { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "bulk_id":"12345", "type": "template", "template": { "name": "authentication_template", "language": { "code": "en" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "958625" } ] }, { "type": "button", "sub_type": "url", "index": "0", "parameters": [ { "type": "text", "text": "958625" } ] } ] } } Response Success Response HTTP Status Code: 200 OK Sample Response: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "ODIxMTE=" } ], "messages": [ { "id": "RFPQoMGZWt", "message_status": "accepted" } ] } Message Sample View 958625 is your verification code. For your security, do not share this code. Field Descriptions Root-Level Fields FieldTypeDescriptionmessaging_productstringMust be whatsapp. Identifies the messaging platform being used.recipient_typestringMust be individual. Specifies the type of recipient.tostringThe recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx).typestringMust be template. Specifies the type of message being sent. Template-Level Fields FieldTypeDescriptionnameStringName of the template. For example, "otp_message".languageObjectSpecifies the language of the template.componentsArrayContains the components of the message (body, buttons). Notes Ensure the template name matches an approved template in your WhatsApp Business Account. The phone number must be in E.164 format (e.g., 91xxxxxxxxxx for Indian numbers). Language codes must follow ISO 639-1 standards. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “bulk_id”:”12345″, “type”: “template”, “template”: { “name”: “authentication_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] }, { “type”: “button”, “sub_type”: “url”, “index”: “0”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “bulk_id”:”12345″, “type”: “template”, “template”: { “name”: “authentication_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] }, { “type”: “button”, “sub_type”: “url”, “index”: “0”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”bulk_id\”:\”12345\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”authentication_template\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”958625\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”url\”,\r\n \”index\”: \”0\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”958625\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “bulk_id”: “12345”, “type”: “template”, “template”: { “name”: “authentication_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] }, { “type”: “button”, “sub_type”: “url”, “index”: “0”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “bulk_id”: “12345”, “type”: “template”, “template”: { “name”: “authentication_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] }, { “type”: “button”, “sub_type”: “url”, “index”: “0”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”bulk_id\”:\”12345\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”authentication_template\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”958625\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”url\”,\r\n \”index\”: \”0\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”958625\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”bulk_id\”:\”12345\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”authentication_template\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”958625\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”url\”,\r\n \”index\”: \”0\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”958625\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); Marketing Template Message API Overview Marketing templates on WhatsApp are designed to send promotional messages, share information about products or services, or communicate business-related updates. These templates are pre-approved by WhatsApp and must comply with the platform’s policies to ensure they provide value to users without being spammy or intrusive. Below is the detailed documentation on marketing templates, their structure, and best practices. Key Characteristics of Marketing Templates Purpose: To promote products, services, or offers. To share informational updates about the business. To engage users with campaigns, announcements, or events. Use Cases: Sending special offers or discounts. Announcing a new product or service. Inviting users to events or webinars. Sharing business updates, such as holiday hours or relocations. Compliance: Must adhere to WhatsApp’s Business Policy. Requires explicit user opt-in for promotional content. Components of a Marketing Template Marketing templates can consist of the following elements: 1. Header (Optional) Type: Text, Image, Video, or Document. Purpose: To grab attention with a visually appealing or textual header. Example: Including a product image or a “Special Offer” banner. 2. Body (Required) Type: Text. Purpose: Contains the primary message content, such as promotional text or product details. Example: “Get 20% off on your next purchase! Use code SAVE20. Offer valid till Jan 31, 2025.” “Introducing our latest collection! Check it out now and enjoy exclusive discounts.” 3. Footer (Optional) Type: Text. Purpose: Provides additional context, disclaimers, or contact information. Example: “Terms and conditions apply. Visit our website for more details.” 4. Buttons (Optional) Types: Quick Reply , URL ,Phone Number and Copy Code Purpose: To encourage user interaction and provide actionable options. Quick Reply: Predefined responses (e.g., “I’m interested”). URL: Redirects to a webpage (e.g., “Shop Now”). Phone: Contact number or Company Phone number (e.f., +919xxxxxxxxx). Copy Code : Use the code for any offers (e,g.,”12345axw”). Message without parameter Description: Send a basic template message without any parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace the placeholders: {{your_domain}}: Your API domain. {{phone_number_id}}: The ID linked to your WhatsApp Business API number. {{key}}: Your API key for authentication.How to create key Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example : { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_newyear", "language": { "code": "en" }, "components": [ ] } } Field Descriptions: messaging_product: Always "whatsapp" for WhatsApp messaging. recipient_type: "individual" for single-user messages. to: Recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx for an Indian number). type: "template" for template messages. template: Contains details about the template: name: Name of the pre-approved template (marketing_newyear in this case). language: Specifies the language code. code: Language code for the template (e.g., en for English). components: An array for dynamic content or interactive elements (leave empty for simple messages). Example Response When the API processes the request successfully, it returns a response similar to this: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MDM=" } ], "messages": [ { "id": "8AVoq6uUPP", "message_status": "accepted" } ] } Response Details: contacts: input: The phone number you provided in the to field. wa_id: WhatsApp ID of the recipient. status_id: A unique identifier for the status of this contact. messages: id: A unique ID for the message. message_status: Status of the message (e.g., "accepted"). Sample View: Hi welcome to 2025 Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear”, “language”: { “code”: “en_us” }, “components”: [ ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear”, “language”: { “code”: “en_us” }, “components”: [ ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear\”,\n \”language\”: {\n \”code\”: \”en_us\”\n },\n \”components\”: [\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear”, “language”: { “code”: “en_us” }, “components”: [] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear”, “language”: { “code”: “en_us” }, “components”: [] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear\”,\n \”language\”: {\n \”code\”: \”en_us\”\n },\n \”components\”: [\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear”, “language”: { “code”: “en_us” }, “components”: [] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }) Message with parameter Description: Send a template message that includes dynamic text parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace the placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your API domain. {{phone_number_id}}: The ID linked to your WhatsApp Business API number. Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_newyear_va", "language": { "code": "en" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "user_name" }, { "type": "text", "text": "Features" } ] } ] } } Field Breakdown: messaging_product: Specifies the messaging product, always "whatsapp". recipient_type: "individual" for single-user messages. to: The recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx). type: "template" for sending a template message. template: name: The name of the pre-approved template (marketing_newyear_va in this case). language: code: The language code of the template (e.g., en for English). components: type: Specifies the part of the template being populated. Use "body" for main content placeholders. parameters: Contains dynamic data to replace placeholders in the template: type: The type of data (e.g., "text"). text: The value that replaces the placeholder in the template. Dynamic Parameters and Placeholders Templates can include dynamic placeholders represented as variables like {{1}}, {{2}}, etc. Each placeholder is replaced by the corresponding value in the parameters array. Template Example: Template name: marketing_newyear_vaTemplate content: Hi {{1}}, welcome to our platform! Check out these amazing {{2}}. Example: "parameters": [ { "type": "text", "text": "user_name" // Replaces {{1}} }, { "type": "text", "text": "Features" // Replaces {{2}} } ] Resulting message: Hi user_name, welcome to our platform! Check out these amazing Features. Response Structure A successful API call returns a 200 OK response with details about the sent message. Example Response: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTI=" } ], "messages": [ { "id": "phoSwcGtbL", "message_status": "accepted" } ] } Response Details: contacts: input: The phone number from the to field. wa_id: WhatsApp ID of the recipient. status_id: Identifier for the delivery status. messages: id: A unique identifier for the message. message_status: Status of the message, e.g., "accepted". Notes and Best Practices Pre-approved Templates: Templates must be created and approved in the WhatsApp Business Manager. Ensure placeholders ({{1}}, {{2}}, etc.) align with the payload. Dynamic Content: Use the parameters array to customize messages. Include text, media, or buttons as required by your template. Language Codes: Match the language code with the template’s approved language. Full list of ISO 639-1 codes. Testing: Use a sandbox environment to test integrations. Validate payloads and monitor logs for issues. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “user_name” }, { “type”: “text”, “text”: “Features” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “user_name” }, { “type”: “text”, “text”: “Features” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear_va\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”user_name\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”Features\”\n }\n ]\n }\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “user_name” }, { “type”: “text”, “text”: “Features” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “user_name” }, { “type”: “text”, “text”: “Features” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear_va\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”user_name\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”Features\”\n }\n ]\n }\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “user_name” }, { “type”: “text”, “text”: “Features” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Message without parameter with attachment Description: Send a template message with dynamic text parameters and an image attachment in the header. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Example: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_template_doc", "language": { "code": "en" }, "components": [ { "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://chat.pingtochat.com/template_media/1736424548.png" } } ] } ] } } Field Descriptions General Fields messaging_product: (string) Always whatsapp. recipient_type: (string) Set to individual for one-to-one messages. to: (string) The recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx). type: (string) Always template. Template Object name: (string) The name of the pre-approved template (e.g., marketing_newyear_va_images). language: (object) Specifies the language for the template. code: (string) The language code (e.g., en for English). Components Array Header: type: (string) Always header for attachments. parameters: (array) Holds the media or placeholders for the header. type: (string) Always image for images. image: (object) Contains the image details. link: (string) URL of the image (e.g., https://chat.pingtochat.com/template_media/1736424548.png). Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the seMessages Without Buttonsnt message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_template_doc”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_template_doc”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_template_doc\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”image\”,\n \”image\”: {\n \”link\”: \n \”https://chat.pingtochat.com/template_media/1736424548.png\”\n }\n }\n ]\n }\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_template_doc”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_template_doc”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_template_doc\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”image\”,\n \”image\”: {\n \”link\”: \n \”https://chat.pingtochat.com/template_media/1736424548.png\”\n }\n }\n ]\n }\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_template_doc”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Message with parameter and attachment Description: Send a template message with dynamic text parameters and an image attachment in the header. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Example: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_newyear_va_images", "language": { "code": "en" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "User_Name" }, { "type": "text", "text": "Features" } ] }, { "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://chat.pingtochat.com/template_media/1736424548.png" } } ] } ] } } Field Descriptions General Fields messaging_product: (string) Always whatsapp. recipient_type: (string) Set to individual for one-to-one messages. to: (string) The recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx). type: (string) Always template. Template Object name: (string) The name of the pre-approved template (e.g., marketing_newyear_va_images). language: (object) Specifies the language for the template. code: (string) The language code (e.g., en for English). Components Array Header: type: (string) Always header for attachments. parameters: (array) Holds the media or placeholders for the header. type: (string) Always image for images. image: (object) Contains the image details. link: (string) URL of the image (e.g., https://chat.pingtochat.com/template_media/1736424548.png). Body: type: (string) Always body for the main text content. parameters: (array) Holds the placeholders to populate the template. type: (string) Always text. text: (string) The value to replace placeholders (e.g., "User_Name", "Features"). Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the seMessages Without Buttonsnt message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear_va_images\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”User_Name\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”Features\”\n }\n ]\n },\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”image\”,\n \”image\”: {\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\n }\n }\n ]\n }\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear_va_images\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”User_Name\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”Features\”\n }\n ]\n },\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”image\”,\n \”image\”: {\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\n }\n }\n ]\n }\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Message without parameters, attachments, and with buttons Description: Send a template message with dynamic text parameters and an image attachment in the header. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Example: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_buttons", "language": { "code": "en" }, "components": [ { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/" } ] } ] } } Field Descriptions messaging_product Description: Indicates the messaging product being used. Value: "whatsapp" (since this message is for WhatsApp). recipient_type Description: Specifies the type of recipient. Value: "individual" (indicates the message is intended for an individual user). to Description: The recipient’s WhatsApp phone number in international format. Value: "91xxxxxxxxxx" (replace xxxxxxxxxx with the actual phone number). type Description: Specifies the type of message being sent. Value: "template" (indicates this is a template message). template Description: The main object containing template message details. Fields: name: Description: The name of the message template. Value: "marketing_buttons" (name of the pre-approved template on WhatsApp). language: code: Description: The language code for the message. Value: "en" (English). components: Description: An array of objects specifying dynamic content for the template. components Description: Holds the dynamic elements of the template. Fields: type: Description: The type of dynamic element in the template. Value: "BUTTONS" (indicates buttons will be included in the message). buttons: Description: An array of button objects within the template. buttons Description: Defines individual buttons within the template. Fields: type: Description: The type of button. Value: "QUICK_REPLY": A button that sends a predefined reply when clicked. "url": A button that redirects the user to a specified URL. text: Description: The text displayed on the button. Value: "Unsubscribe from Promos": Text for the quick reply button. "Go to link": Text for the URL button. url (for url buttons only): Description: The URL the button redirects to. Value: "https://developers.pingtochat.com/". Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the seMessages Without Buttonsnt message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_buttons”, “language”: { “code”: “en” }, “components”: [ { “type”:”BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_buttons”, “language”: { “code”: “en” }, “components”: [ { “type”:”BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_buttons\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”:\”BUTTONS\”,\n \”buttons\”: [\n {\n \”type\”: \”QUICK_REPLY\”,\n \”text\”: \”Unsubscribe from Promos\”\n },\n \n {\n \”type\”: \”url\”,\n \”text\”: \”Go to link\”,\n \”url\”: \”https://developers.pingtochat.com/\”\n \n }\n \n \n ]\n }\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_buttons”, “language”: { “code”: “en” }, “components”: [ { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_buttons”, “language”: { “code”: “en” }, “components”: [ { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_buttons\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”:\”BUTTONS\”,\n \”buttons\”: [\n {\n \”type\”: \”QUICK_REPLY\”,\n \”text\”: \”Unsubscribe from Promos\”\n },\n \n {\n \”type\”: \”url\”,\n \”text\”: \”Go to link\”,\n \”url\”: \”https://developers.pingtochat.com/\”\n \n }\n \n \n ]\n }\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_buttons”, “language”: { “code”: “en” }, “components”: [ { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Message with parameters, attachments, and with buttons Description: Send a basic template message with any parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace the placeholders: {{your_domain}}: Your API domain. {{phone_number_id}}: The ID linked to your WhatsApp Business API number. {{key}}: Your API key for authentication.How to create key Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example : { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_newyear_va_images", "language": { "code": "en" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "User_Name" }, { "type": "text", "text": "Features" } ] }, { "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://chat.pingtochat.com/template_media/1736424548.png" } } ] }, { "type": "FOOTER", "text": "Use the buttons below to visit our website" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/" } ] } ] } } Key Points in the Payload Components: header: Includes an image URL. body: Contains text with placeholders replaced by dynamic values. footer: Simple static text. buttons: Supports two types of buttons: QUICK_REPLY: For quick interactions. URL: Redirects to a specific URL. Parameters: The parameters inside header and body match the placeholders defined in the template. URL Requirements: The URL in the buttons section must be publicly accessible. Template Approval: Templates (e.g., marketing_newyear_va_images) must be pre-approved. Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the seMessages Without Buttonsnt message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “FOOTER”, “text”: “Use the buttons below to visit our website” }, { “type”:”BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “FOOTER”, “text”: “Use the buttons below to visit our website” }, { “type”:”BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear_va_images\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”User_Name\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”Features\”\n }\n ]\n },\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”image\”,\n \”image\”: {\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\n }\n }\n ]\n },\n {\n \”type\”: \”FOOTER\”,\n \”text\”: \”Use the buttons below to visit our website\”\n },\n {\n \”type\”:\”BUTTONS\”,\n \”buttons\”: [\n {\n \”type\”: \”QUICK_REPLY\”,\n \”text\”: \”Unsubscribe from Promos\”\n },\n {\n \”type\”: \”url\”,\n \”text\”: \”Go to link\”,\n \”url\”: \”https://developers.pingtochat.com/\”\n }\n \n ]\n }\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “FOOTER”, “text”: “Use the buttons below to visit our website” }, { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “FOOTER”, “text”: “Use the buttons below to visit our website” }, { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear_va_images\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”User_Name\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”Features\”\n }\n ]\n },\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”image\”,\n \”image\”: {\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\n }\n }\n ]\n },\n {\n \”type\”: \”FOOTER\”,\n \”text\”: \”Use the buttons below to visit our website\”\n },\n {\n \”type\”:\”BUTTONS\”,\n \”buttons\”: [\n {\n \”type\”: \”QUICK_REPLY\”,\n \”text\”: \”Unsubscribe from Promos\”\n },\n {\n \”type\”: \”url\”,\n \”text\”: \”Go to link\”,\n \”url\”: \”https://developers.pingtochat.com/\”\n }\n \n ]\n }\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “FOOTER”, “text”: “Use the buttons below to visit our website” }, { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Message with parameters,header ,body ,footer and with buttons PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number, Copy Code) For URL and Phone Number buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_all_buttons", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Hi user" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Points in the Payload Components: Header: Includes an image URL. Body: Contains text with placeholders replaced by dynamic values. Footer: Simple static text. Buttons: Supports two types of buttons: QUICK_REPLY: For quick interactions. URL: Redirects to a specific URL. Parameters: The parameters inside the header and body match the placeholders defined in the template. URL Requirements: The URL in the buttons section must be publicly accessible. Template Approval: Templates (e.g., marketing_all_buutons) must be pre-approved. Response Structure A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "MTA0NDI3" } ], "messages": [ { "id": "kfGlB7LpVI", "message_status": "accepted" } ]} Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns "whatsapp" for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the sent message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., "M2s4da2y4P"). message_status: Type: String Description: The status of the message at the time of the response. Example values include: “accepted” – The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_all_buttons”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_all_buttons”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_all_buttons\”,\n \”language\”: {\n \”code\”: \”en_us\”\n },\n \”components\”: [\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”Hi user\”\n }\n ]\n },\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”Our\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”whatsapp message app\”\n }\n ]\n },\n {\n \”type\”: \”button\”,\n \”sub_type\”: \”quick_reply\”,\n \”index\”: 0,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”Unsubscribe from Promos\”\n }\n ]\n },\n {\n \”type\”: \”button\”,\n \”sub_type\”: \”copy_code\”, \n \”index\”: 1,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”WRETTT\” \n }\n ]\n }\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_all_buttons”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_all_buttons”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_all_buttons\”,\n \”language\”: {\n \”code\”: \”en_us\”\n },\n \”components\”: [\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”Hi user\”\n }\n ]\n },\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”Our\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”whatsapp message app\”\n }\n ]\n },\n {\n \”type\”: \”button\”,\n \”sub_type\”: \”quick_reply\”,\n \”index\”: 0,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”Unsubscribe from Promos\”\n }\n ]\n },\n {\n \”type\”: \”button\”,\n \”sub_type\”: \”copy_code\”, \n \”index\”: 1,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”WRETTT\” \n }\n ]\n }\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_all_buttons”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with header-text and body and button quick-replay PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply) For URL and Phone Number buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxx", "type": "template", "template": { "name": "marketing_h", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_h". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. 1. Button Component Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the type of button. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxx", "wa_id": "91xxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘authToken: eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_h\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“authToken”, “eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“authToken”, “eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_h\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘authToken’: ‘eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with body and button quick-replay PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply) Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "markting_p", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "markting_p". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_p\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_p\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with body , footer and button quick-replay , visit-website and phone-number and copy code PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number, Copy Code) For URL and Phone Number buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "markting_o", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "markting_o". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Copy Code Button Type: button Description: Adds an interactive Copy Code button. sub_type Value: "copy_code" Description: Defines the button as a Copy Code button. "copy_code": Allows users to copy a predefined code. index Type: Integer Description: Position of the button in the template. "1": The second button. parameters Type: `Array** Description: Defines the copy code text. text: "WRETTT" (example code that users can copy). Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_o”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_o”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_o\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_o”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_o”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_o\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_o”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with header-text and body and button quick-replay and visit-website PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL) For URL buttons, they do not need to be included in the example payload request. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxxx", "type": "template", "template": { "name": "marketing_i", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_i". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. 1. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxxx", "wa_id": "91xxxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_i\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_i\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with body and button with quick-replay and visit-website PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL) For URL buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "markting_q", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "markting_q". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: `Array** Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: `Array** Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_q”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_q”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_q\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_q”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_q”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_q\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_q”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with body and button with quick-replay , visit-website , phone-number PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number) For URL and Phone Number buttons, they do not need to be included in the Example code. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "markting_r", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "markting_r". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: `Array** Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: `Array** Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_r\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with header-text , body ,button quick-replay , visit-website and phone-number PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number) For URL and Phone Number buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "markting_j", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_j". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: `Array** Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: `Array** Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_j\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_j\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with body and button with quick-replay , visit-website , phone-number and copy-code PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number, Copy Code) For URL and Phone Number buttons, they do not need to be included in the Example payload. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "markting_s", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "markting_s". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: `Array** Description: Defines the button text. text: "Unsubscribe from Promos" Copy Code Button Type: button Description: Adds a Copy Code button. sub_type Value: "copy_code" Description: Defines the button as a Copy Code button. "copy_code": Allows users to copy a predefined code. index Type: Integer Description: Position of the button in the template. "1": The second button. parameters Type: `Array** Description: Defines the text associated with the Copy Code button. text: "WRETTT" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_s\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_s\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with header-text , body ,button quick-replay , visit-website , phone-number and copy-code PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number, Copy Code) For URL and Phone Number buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_k", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_k". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. 1. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" 2. Copy Code Button Type: button Description: Adds a Copy Code button, which allows users to copy a given promo code. sub_type Value: "copy_code" Description: Allows users to copy a promo code for future use. index Type: Integer Description: Position of the button in the template. "1": The second button. parameters Type: Array Description: Contains the promo code to be copied. text: "WRETTT" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_k”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_k”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_k\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_k”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_k”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_k\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_k”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with header and body Overview A header that dynamically personalizes the message with text. A body that provides additional message content with placeholders for dynamic text. This template is used for sending marketing-related messages to users. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_t", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Hi user" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_t". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "Hi user" – The actual content of the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "MTA0NDQ5" } ], "messages": [ { "id": "KrNLbzOCZb", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } } ‘ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } } ‘, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_t\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_t\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with body , footer and button quick-replay PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply) For URL and Phone Number buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_l", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_l". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_l\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_l\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with header body footer Overview A header that dynamically personalizes the message with text. A body that provides additional message content with placeholders for dynamic text. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is used for sending marketing-related messages. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_u", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Hi user" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_u". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "Hi user" – The actual content of the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_u”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } } ‘ ‘<'+'?'+'php'+ ` ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_u”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } } ‘, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_u\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_u”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_u”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_u\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_u”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter header body,footer,buttons - quick-replay Overview A header that dynamically personalizes the message with text. A body that provides additional message content with placeholders for dynamic text. A Quick Reply Button that allows users to opt out of promotional messages. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is used for sending marketing-related messages with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_v", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Hi user" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_v". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "Hi user" – The actual content of the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_v\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_v\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with body , footer and button quick-replay and visit-website PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL) For URL buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_m", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_m". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_m\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_m\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with body , footer and button quick-replay , visit-website and phone-number PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number, Copy Code) For URL and Phone Number buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxx", "type": "template", "template": { "name": "markting_n", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "markting_n". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_n\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_n\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with header-body-footer , buttons - quick-replay,visit-website,phone-number Overview A header with dynamic text personalization. A body containing the main message text with placeholders for dynamic content. A Quick Reply Button that enables users to opt out of promotional messages. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for sending marketing messages while providing an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_x", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Hi user" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_x". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "Hi user" – The actual content of the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Expected API Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_x\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_x\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with header , body , footer and buttons - quick-replay ,visit website ingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL) For URL buttons, they do not need to be included in the example payload request. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Headers Content-Type: Indicates that the request body is in JSON format. Authorization: A Bearer token for authentication. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_w", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Hi user" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_w". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. 1. Header Component Type: header Description: Displays dynamic text at the top of the message. parameters Type: Array Description: Holds the text parameter for the header. Example: "Hi user" 2. Body Component Type: body Description: Contains the main content of the message. parameters Type: Array Description: Holds dynamic values to personalize the message. Example: "Our" "whatsapp message app" 3. Button Component Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the type of button. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_w”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_w”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_w\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_w”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_w”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_w\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_w”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with header-body-footer , buttons - quick-replay,visit-website,phone-number,copy-code Overview A header with a personalized text greeting. A body containing the main message text. A Quick Reply Button that allows users to opt out of promotional messages. A Copy Code Button that enables users to copy a predefined code. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is ideal for marketing campaigns while giving users an easy way to opt out and use a promotional code. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_y", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Hi user" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_y". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "Hi user" – The actual content of the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Copy Code Button Type: button Description: Adds a Copy Code button. sub_type: "copy_code" index: 1 (Second button in the list) parameters: type: "text" text: "WRETTT" – The predefined code for the user to copy. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_y\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_y\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body footer button - quick replay Overview A body containing the main message text. A Quick Reply Button that allows users to opt out of promotional messages. For URL and Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is ideal for marketing campaigns while giving users an easy way to opt out. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_z", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_z". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_z\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_z\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body footer button - quick-replay ,visit-website and phone-number Overview The marketing_aa template is a WhatsApp Business API message template that includes: A body containing the main message text. A Quick Reply Button that allows users to opt out of promotional messages. Phone Number Used for contact information For URL and Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is useful for marketing messages while providing users with an easy way to opt out. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxxx", "type": "template", "template": { "name": "marketing_aa", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_aa". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxxx", "wa_id": "91xxxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_aa\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_aa\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body footer button - quick-replay ,visit-website, phone-number and copy-code Overview A body containing the main message text. A Quick Reply Button that allows users to opt out of promotional messages. A Phone Number Used for contact information A Copy Code Button that enables users to copy a predefined code (WRETTT). For URL and Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is useful for marketing messages while providing users with interactive options. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_ab", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_ab". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Copy Code Button Type: button Description: Adds a Copy Code button. sub_type: "copy_code" index: 1 (Second button in the list) parameters: type: "text" text: "WRETTT" – The predefined code to be copied. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ab\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ab\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body , button - quick-replay Overview Body with dynamic text placeholders. Quick Reply Button for unsubscribing from promotions. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_ac", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_ac". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ac\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ac\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body , button - quick-replay, visit-website Overview A body containing the main marketing message text. A Quick Reply Button that allows users to unsubscribe from promotional messages. For URL and Phone Number buttons, they do not need to be included in the Example payload. This template is ideal for marketing campaigns that also provide users with an easy way to opt out. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_ad", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_ad". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ad\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ad\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body , button - quick-replay, visit-website, phone-number Overview A body containing the main marketing message text. A Quick Reply Button that allows users to unsubscribe from promotional messages. A Phone Number Used for contact information For URL and Phone Number buttons, they do not need to be included in the Example payload. This template is ideal for marketing campaigns that also provide users with an easy way to opt out. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_ae", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_ae". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ae”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ae”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ae\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ae”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ae”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ae\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ae”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body , button - quick-replay, visit-website, phone-number, copy-code Overview The marketing_af template is a WhatsApp Business API message template used for marketing purposes. It includes: A body containing the main marketing message text. A Quick Reply Button that allows users to unsubscribe from promotional messages. A Phone Number Used for contact information A Copy Code Button that enables users to copy a predefined code (WRETTT). For URL and Phone Number buttons, they do not need to be included in the Example payload. This template is ideal for marketing campaigns that provide users with an interactive experience. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_af", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_af". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Copy Code Button Type: button Description: Adds a Copy Code button. sub_type: "copy_code" index: 1 (Second button in the list) parameters: type: "text" text: "WRETTT" – The predefined code to be copied. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_af\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_af\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body ,footer, button - quick-replay, visit-website Overview A body containing the main marketing message text. A Quick Reply Button that allows users to unsubscribe from promotional messages. A Copy Code Button that enables users to copy a predefined code (WRETTT). For URL and Phone Number buttons, they do not need to be included in the Example payload. This template is ideal for marketing and promotional messages that provide an interactive experience. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_ag", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_ag". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Copy Code Button Type: button Description: Adds a Copy Code button. sub_type: "copy_code" index: 1 (Second button in the list) parameters: type: "text" text: "WRETTT" – The predefined code to be copied. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ag”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ag”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ag\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ag”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ag”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ag\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ag”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body , button - quick replay - visit website Overview A body containing the main marketing message text. A Quick Reply Button that allows users to opt out of promotional messages. This template helps engage users while providing them with an easy way to unsubscribe if they choose. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_ai", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_ai". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ai\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ai\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body , button - phone number - copy code Overview A body containing the main marketing message text. A Copy Code Button, allowing users to copy a promotional code directly. For URL and Phone Number buttons, they do not need to be included in the Example payload. This template is ideal for marketing campaigns where users can quickly receive and use a promotional code. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_aj", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_aj". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Copy Code Button Type: button Description: Adds a Copy Code button for users to copy a promotional code. sub_type: "copy_code" index: 0 parameters: type: "text" text: "WRETTT" – The promotional code displayed. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_aj\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_aj\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter body ,footer, button - quick replay - visit website Overview A body containing the main marketing message text. A Quick Reply Button that allows users to opt out of promotional messages. This template helps engage users while providing them with an easy way to unsubscribe if they choose. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_ak", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_ak". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ak\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ak\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter body ,footer, button - phone number - copy code Overview A body containing the main marketing message text. A Copy Code Button that allows users to copy a promotional code. For URL and Phone Number buttons, they do not need to be included in the Example payload. This template helps engage users while providing them with an easy way to copy promotional codes for offers or discounts. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_al", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "copy_code", "index": 0, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_al". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Copy Code Button Type: button Description: Adds an interactive Copy Code button. sub_type: "copy_code" index: 0 parameters: type: "text" text: "WRETTT" – The code that users can copy. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_al\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_al\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Utility Template Message API Overview Utility templates on WhatsApp are specifically designed to provide functional and transactional support for existing orders or accounts. These templates are pre-approved by WhatsApp to ensure they meet compliance guidelines and are not used for promotional or marketing purposes. Below is the documentation detailing their usage, structure, and limitations. Key Characteristics of Utility Templates Purpose: To provide updates related to a customer’s existing order or account. Includes transactional messages such as: Order confirmations. Shipping updates. Account notifications (e.g., password reset). Restrictions: Cannot be used for marketing or promotional purposes. Only supports transactional and service-related use cases. Compliance: Must comply with WhatsApp’s Business Policy. Requires prior approval in WhatsApp Business Manager. Components of a Utility Template Utility templates can consist of the following dynamic and static elements: 1. Header (Optional) Type: Text, Image, Video, or Document. Purpose: To highlight the primary content of the message. Example: Including an order invoice or a delivery tracking image. 2. Body (Required) Type: Text. Purpose: Contains the main content of the message. Example: “Your order #12345 has been shipped. Track your delivery here: [tracking link].” “Your account password was successfully changed.” 3. Footer (Optional) Type: Text. Purpose: Adds additional context, disclaimers, or legal information. Example: “For assistance, reply HELP or contact our support.” 4. Buttons (Optional) Types: Quick Reply ,URL and Phone Number. Purpose: To enhance interactivity by providing actionable options. Quick Reply: For user responses (e.g., “Need Assistance”). URL: Redirect to a webpage (e.g., “Track Your Order”). Phone: Contact number or Company Phone number (e.f., +919xxxxxxxxx). Message without parameter Description: Send a basic template message without any parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace the placeholders: {{your_domain}}: Your API domain. {{phone_number_id}}: The ID linked to your WhatsApp Business API number. {{key}}: Your API key for authentication.How to create key Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example : { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_templates", "language": { "code": "en" }, "components": [ ] } } Field Descriptions: messaging_product: Always "whatsapp" for WhatsApp messaging. recipient_type: "individual" for single-user messages. to: Recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx for an Indian number). type: "template" for template messages. template: Contains details about the template: name: Name of the pre-approved template (utility_templates in this case). language: Specifies the language code. code: Language code for the template (e.g., en for English). components: An array for dynamic content or interactive elements (leave empty for simple messages). Example Response When the API processes the request successfully, it returns a response similar to this: CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxx…….’ \ –data ‘{ “messaging_product”: “whatsapp”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_a”, “language”: { “code”: “en_us” }, “components”: [ ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://${domain}/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS => ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “whatsapp:+${toNumber}”, “type”: “template”, “template”: { “name”: “${selectedTemplateName}”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: ${JSON.stringify(parameters)} } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: ${userToken}’, ‘Content-Type: application/json’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”to\”: \”919946371505\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”utility_a\”,\n \”language\”: {\n \”code\”: \”en_us\”\n },\n \”components\”: [\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://app.pingtochat.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://app.pingtochat.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_a”, “language”: { “code”: “en_us” }, “components”: [] } }) response = https.request(request) puts response.read_body import http.client import json conn = http.client.HTTPSConnection(“app.pingtochat.com”) payload = json.dumps({ “messaging_product”: “whatsapp”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_a”, “language”: { “code”: “en_us” }, “components”: [] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ } conn.request(“POST”, “/api/v1.0/phone_number_id/key/messages”, payload, headers) res = conn.getresponse() data = res.read() print(data.decode(“utf-8”)) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://app.pingtochat.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”to\”: \”919946371505\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”utility_a\”,\n \”language\”: {\n \”code\”: \”en_us\”\n },\n \”components\”: [\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://app.pingtochat.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_a”, “language”: { “code”: “en_us” }, “components”: [] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "ODIxMTg=" } ], "messages": [ { "id": "4gmNEgkX7r", "message_status": "accepted" } ] } Response Details: contacts: input: The phone number you provided in the to field. wa_id: WhatsApp ID of the recipient. status_id: A unique identifier for the status of this contact. messages: id: A unique ID for the message. message_status: Status of the message (e.g., "accepted"). Message with parameter Description: Send a template message that includes dynamic text parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace the placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your API domain. {{phone_number_id}}: The ID linked to your WhatsApp Business API number. Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_template_variable", "language": { "code": "en" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "User_Name" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "adv45667" } ] } ] } } Field Breakdown: messaging_product: Specifies the messaging product, always "whatsapp". recipient_type: "individual" for single-user messages. to: The recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx). type: "template" for sending a template message. template: name: The name of the pre-approved template (marketing_newyear_va in this case). language: code: The language code of the template (e.g., en for English). components: type: Specifies the part of the template being populated. Use "body" for main content placeholders. parameters: Contains dynamic data to replace placeholders in the template: type: The type of data (e.g., "text"). text: The value that replaces the placeholder in the template. Dynamic Parameters and Placeholders Templates can include dynamic placeholders represented as variables like {{1}}, {{2}}, etc. Each placeholder is replaced by the corresponding value in the parameters array. Template Example: Template name: utility_template_variableTemplate content: Hi {{1}}, Your Order number {{2}} is 24-oct-2024 delevered Example: "parameters": [ { "type": "text", "text": "user_name" // Replaces {{1}} }, { "type": "text", "text": "adv45667" // Replaces {{2}} } ] Resulting message: Hi user_name, Your Order number adv45667 is 24-oct-2024 delevered. Response Structure A successful API call returns a 200 OK response with details about the sent message. Example Response: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "ODIxMTc=" } ], "messages": [ { "id": "SD7mtgA4PH", "message_status": "accepted" } ] } Response Details: contacts: input: The phone number from the to field. wa_id: WhatsApp ID of the recipient. status_id: Identifier for the delivery status. messages: id: A unique identifier for the message. message_status: Status of the message, e.g., "accepted". Notes and Best Practices Pre-approved Templates: Templates must be created and approved in the WhatsApp Business Manager. Ensure placeholders ({{1}}, {{2}}, etc.) align with the payload. Dynamic Content: Use the parameters array to customize messages. Include text, media, or buttons as required by your template. Language Codes: Match the language code with the template’s approved language. Full list of ISO 639-1 codes. Testing: Use a sandbox environment to test integrations. Validate payloads and monitor logs for issues. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxx……’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_b”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } } ‘ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_b”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } } ‘, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxx…..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_b\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxx……….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxx………” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_b”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_b”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxx…………’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/keymessages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxx………”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_b\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxx………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_b”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Message without parameter with attachment Description: Send a template message without dynamic text parameters and with an image attachment in the header. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Example: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_attachment", "language": { "code": "en" }, "components": [ { "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://developers.pingtochat.com/template_media/1736424548.png" } } ] } ] } } Field Descriptions General Fields messaging_product: (string) Always whatsapp. recipient_type: (string) Set to individual for one-to-one messages. to: (string) The recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx). type: (string) Always template. Template Object name: (string) The name of the pre-approved template (e.g., utility_attachment). language: (object) Specifies the language for the template. code: (string) The language code (e.g., en for English). Components Array Header: type: (string) Always header for attachments. parameters: (array) Holds the media or placeholders for the header. type: (string) Always image for images. image: (object) Contains the image details. link: (string) URL of the image (e.g., https://chat.pingtochat.com/template_media/1736424548.png). Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc="marketing_newyear_va_images } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the sent message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘authToken: xxxxxxxxxxx…….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxx……’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } } ‘ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } } ‘, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxxxx………’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxx………’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_variables_attachment\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n \r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”image\”,\r\n \”image\”: {\r\n \”link\”: \”https://example.com/template_media/1736424548.png\”\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxxx……….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxxxx…………” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxx…………” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………..’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx…………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxxxxx………..”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxxxxx……………”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_variables_attachment\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n \r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”image\”,\r\n \”image\”: {\r\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxx………………’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx………………’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Message with parameter and attachment Description: Send a template message with dynamic text parameters and an image attachment in the header. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Example: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_variables_attachment", "language": { "code": "en" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12345" } ] }, { "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://chat.pingtochat.com/template_media/1736424548.png" } } ] } ] } } Field Descriptions General Fields messaging_product: (string) Always whatsapp. recipient_type: (string) Set to individual for one-to-one messages. to: (string) The recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx). type: (string) Always template. Template Object name: (string) The name of the pre-approved template (e.g., utility_variables_attachment). language: (object) Specifies the language for the template. code: (string) The language code (e.g., en for English). Components Array Header: type: (string) Always header for attachments. parameters: (array) Holds the media or placeholders for the header. type: (string) Always image for images. image: (object) Contains the image details. link: (string) URL of the image (e.g., https://chat.pingtochat.com/template_media/1736424548.png). Body: type: (string) Always body for the main text content. parameters: (array) Holds the placeholders to populate the template. type: (string) Always text. text: (string) The value to replace placeholders (e.g.,"12345"). Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the sent message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘authToken: xxxxxxxxxxxx…………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxx…………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } } ‘ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } } ‘, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxx…………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxx…………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_b\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxx……….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxx…………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxx…………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxx…………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx…………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxx…………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxx…………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_variables_attachment\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12345\”\r\n }\r\n \r\n ]\r\n },\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”image\”,\r\n \”image\”: {\r\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxx…………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx…………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Message without parameters and with buttons Description: Send a template message without dynamic text parameters attachment with buttons message . Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Example: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_button", "language": { "code": "en" }, "components": [ { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://chat.pingtochat.com/" } ] } ] } } Field Descriptions messaging_product Description: Indicates the messaging platform being used. Value: "whatsapp" (signifies this is a WhatsApp message). recipient_type Description: Defines the type of recipient. Value: "individual" (the message is sent to an individual user). to Description: The recipient’s phone number in international format. Value: "91xxxxxxxxxx" (replace with the intended recipient’s phone number). type Description: Specifies the type of message being sent. Value: "template" (indicates this is a pre-approved template message). template Description: The container for the template message configuration. Fields within template name Description: The unique name of the pre-approved template on WhatsApp. Value: "utility_button". language Description: Specifies the language in which the template message is sent. Fields: code: Description: The language code for the message. Value: "en" (English). components Description: Contains the dynamic parts of the template, such as text variables or buttons. Fields within components type Description: The type of dynamic component being used. Value: "BUTTONS" (indicates that this template contains buttons). buttons Description: An array of button configurations for the message. Fields within buttons Each button object in the buttons array has the following fields: For Button 1: Quick Reply type: Description: The type of button. Value: "QUICK_REPLY" (a button that sends a predefined reply when clicked). text: Description: The text displayed on the button. Value: "Unsubscribe from Promos". For Button 2: URL type: Description: The type of button. Value: "url" (a button that redirects to an external link when clicked). text: Description: The text displayed on the button. Value: "Go to link". url: Description: The URL the button opens when clicked. Value: "https://chat.pingtochat.com/". Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the sent message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxx………..’ \ –header ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx………..’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_d”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_d”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxx………..’, ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx………..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”919946371505\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_d\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n },\r\n {\r\n \”type\”: \”url\”,\r\n \”text\”: \”Go to link\”,\r\n \”url\”: \”https://chat.pingtochat.com/\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxx………..”) .addHeader(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxx………..” request[“Cookie”] = “XSRF-TOKEN=xxxxxxxxxxx………..” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_d”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_d”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxx………..”); request.Headers.Add(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx………..”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”919946371505\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_d\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n },\r\n {\r\n \”type\”: \”url\”,\r\n \”text\”: \”Go to link\”,\r\n \”url\”: \”https://chat.pingtochat.com/\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_d”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Message with parameters, attachments, and with buttons Description: Send a template message with dynamic text parameters attachment with buttons message . Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Example: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_full_template", "language": { "code": "en" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12345" } ] }, { "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://chat.pingtochat.com/template_media/1736424548.png" } } ] }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://chat.pingtochat.com/" } ] } ] } } Field Descriptions messaging_product Description: Indicates the messaging platform being used. Value: "whatsapp" (specific to WhatsApp). recipient_type Description: Defines the type of recipient. Value: "individual" (indicates the message is for an individual). to Description: The recipient’s WhatsApp phone number in international format. Value: "919946371505" (replace with the intended recipient’s phone number). type Description: Specifies the type of message being sent. Value: "template" (indicates this is a template message). template Description: Contains the details of the template message. Fields within template name Description: The unique name of the pre-approved template. Value: "utility_full_template". language Description: Specifies the language in which the template is sent. Fields: code: Description: The language code. Value: "en" (English). components Description: Defines the dynamic parts of the template, such as text, images, and buttons. Fields within components type: body Description: Defines the message body. Fields: parameters: Description: Contains dynamic values to populate the body text. Subfields: type: Description: Type of the parameter. Value: "text" (indicates this is text content). text: Description: The dynamic text content to include in the message. Value: "12345" (can be replaced with relevant dynamic content). type: header Description: Defines the message header, which can contain media (images, videos, or documents) or text. Fields: parameters: Description: Contains the dynamic media or text for the header. Subfields: type: Description: Type of the parameter. Value: "image" (indicates the header contains an image). image: Description: Contains details about the image. Subfield: link: Description: The URL of the image to include in the header. Value: "https://chat.pingtochat.com/template_media/1736424548.png". type: BUTTONS Description: Defines interactive buttons in the message. Fields: buttons: Description: An array of buttons to include in the message. Subfields: For Button 1: Quick Reply type: Description: The type of button. Value: "QUICK_REPLY" (sends a predefined response when clicked). text: Description: The text displayed on the button. Value: "Unsubscribe from Promos". For Button 2: URL type: Description: The type of button. Value: "url" (redirects to a URL when clicked). text: Description: The text displayed on the button. Value: "Go to link". url: Description: The URL the button redirects to. Value: "https://chat.pingtochat.com/". Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the sent message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxx…………..’ \ –header ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx…………..’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_full_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”:”BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_full_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”:”BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxx…………..’, ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx…………..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_full_template\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12345\”\r\n }\r\n \r\n ]\r\n },\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”image\”,\r\n \”image\”: {\r\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”:\”BUTTONS\”,\r\n \”buttons\”: [\r\n {\r\n \”type\”: \”QUICK_REPLY\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n },\r\n \r\n {\r\n \”type\”: \”url\”,\r\n \”text\”: \”Go to link\”,\r\n \”url\”: \”https://chat.pingtochat.com/\”\r\n \r\n }\r\n ]\r\n } \r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxx…………..”) .addHeader(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx…………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxx…………..” request[“Cookie”] = “XSRF-TOKEN=xxxxxxxxxxx…………..” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_full_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_full_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx…………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx…………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxx…………..”); request.Headers.Add(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx…………..”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_full_template\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12345\”\r\n }\r\n \r\n ]\r\n },\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”image\”,\r\n \”image\”: {\r\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”:\”BUTTONS\”,\r\n \”buttons\”: [\r\n {\r\n \”type\”: \”QUICK_REPLY\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n },\r\n \r\n {\r\n \”type\”: \”url\”,\r\n \”text\”: \”Go to link\”,\r\n \”url\”: \”https://chat.pingtochat.com/\”\r\n \r\n }\r\n ]\r\n } \r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx…………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx…………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_full_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with header , body , footer and buttons - quick replay Request URL POST http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace the placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your API domain. {{phone_number_id}}: The ID linked to your WhatsApp Business API number. Headers Content-Type: Specifies that the request body is in JSON format. Authorization: A Bearer token is required for authentication. Example Payload { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_h", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } 6. Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_h". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Button Component Type: button Description: This component allows interactive Quick Replies. sub_type Value: "quick_reply" Description: Defines the type of button. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxx…………..’ \ –header ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx…………..’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxx…………..’, ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx…………..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_h\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxx…………..”) .addHeader(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx…………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxx…………..” request[“Cookie”] = “XSRF-TOKEN=xxxxxxxxxxx…………..” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx…………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx…………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxx…………..”); request.Headers.Add(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx…………..”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_h\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx…………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx…………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with header-text and body and footer Endpoint: POST http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace the placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your API domain. {{phone_number_id}}: The ID linked to your WhatsApp Business API number. Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_g", "language": { "code": "en_us" }, "components": [ ] } } 6. Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_g". template.language.code Type: String Description: Language code for the template. The value should match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: This field is empty ([]) since the utility_g template does not include any dynamic content. 7. Expected API Response When the request is successful, the API will return an HTTP 200 OK status along with the following JSON response: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp" to indicate the platform. contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier representing the status of the message. messages Type: Array Description: Contains information about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the status of the message processing. "accepted" – The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxx……….’ \ –header ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx……….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_g”, “language”: { “code”: “en_us” }, “components”: [ ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_g”, “language”: { “code”: “en_us” }, “components”: [ ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxx……….’, ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx……….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_g\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxx……….”) .addHeader(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx……….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxx……….” request[“Cookie”] = “XSRF-TOKEN=xxxxxxxxxxx……….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_g”, “language”: { “code”: “en_us” }, “components”: [] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_g”, “language”: { “code”: “en_us” }, “components”: [] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx……….’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx……….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxx……….”); request.Headers.Add(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx……….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_g\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx……….’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx……….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_g”, “language”: { “code”: “en_us” }, “components”: [] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Message with parameters header body footer and with buttons PingtoChat’s Utility Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number) For URL and Phone Number buttons, they do not need to be included in the response. Endpoint: POST http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_ab", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "p2c" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components 1. Header Type: Text Content: "p2c" Purpose: Displays a short heading or key identifier. 2. Body Type: Text Content: "12CR007" Purpose: Contains the main message content. 3. Buttons Type: Quick Reply Text: "Unsubscribe from Promos" Purpose: Allows users to quickly opt out of promotional messages. Response Structure A successful request will return an HTTP status code of 200 OK along with the following response: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "MTA0NDI4" } ], "messages": [ { "id": "8Eb8pQg0Xl", "message_status": "accepted" } ] } Field Descriptions messaging_product Type: String Description: Indicates the messaging platform. Always returns "whatsapp". contacts Type: Array Description: Contains information about the message recipient. Fields: input: Type: String Description: The phone number used in the API request. wa_id: Type: String Description: The WhatsApp ID associated with the phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages Type: Array Description: Contains details about the sent message. Fields: id: Type: String Description: A unique identifier for the message sent. message_status: Type: String Description: The status of the message at the time of the response. Example values include: "accepted" – The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxx…………..’ \ –header ‘Cookie: XSRF-TOKEN=xxxxxxxxxxxx…………..’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxx…………..’, ‘Cookie: XSRF-TOKEN=xxxxxxxxxxxx…………..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ab\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxx…………..”) .addHeader(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxxx…………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxx…………..” request[“Cookie”] = “XSRF-TOKEN=xxxxxxxxxxxx…………..” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx…………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxxx…………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxx…………..”); request.Headers.Add(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxxx…………..”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ab\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx…………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxxx…………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter header , body , footer and buttons - quick-replay ,visit website Overview A Quick Reply Button This ensures a seamless user experience by giving them control over their messaging preferences. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_i", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_i". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 parameters: type: "text" text: "Unsubscribe" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "MTA0NDUw" } ], "messages": [ { "id": "ILHxFrzvI0", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe ” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe ” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_b\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxx……….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe ” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe ” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_i\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe \”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe ” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter header , body , footer and buttons - quick-replay ,visit-website,phone-number Overview A Quick Reply Button A URL A Phone Number For URL and Phone Number buttons, they do not need to be included in the Example payload. This template provides a user-friendly way to manage marketing preferences. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_j", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_j". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxx……….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxx……….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_j\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxx……….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxx……….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxx……….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxx……….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_j\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxx……….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter body,footer and buttons - quick-replay Overview A Quick Reply Button that allows users to unsubscribe from promotional messages. This template enhances user interaction by providing a simple opt-out option for promotional content. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_l", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_l". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "MTA0NDUw" } ], "messages": [ { "id": "ILHxFrzvI0", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxx…………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxx…………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_l\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxx…………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxx…………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx…………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxx…………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_l\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx…………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter body,footer and buttons - quick-replay,visit-website Overview A Quick Reply Button that allows users to unsubscribe from promotional messages. A URL for visiting their website For URL buttons, they do not need to be included in the Example payload. This template enhances user engagement by giving users a quick and easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_m", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_m". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "MTA0NDUw" } ], "messages": [ { "id": "ILHxFrzvI0", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxxxx…………..’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxxxx…………..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_m\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxxxx…………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxxxx…………..” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxxx…………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxxxx…………..”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_m\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxxx…………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter body,footer and buttons - quick-replay,visit-website,phone-number Overview The utility_n template is a WhatsApp Business API message template designed for utility-based messaging. It includes: A Quick Reply Button that allows users to unsubscribe from promotional messages. A URL Button A Phone Number Button For URL and Phone Number buttons, they do not need to be included in the Example payload. This template enhances user engagement by providing an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_n", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_n". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "MTA0NDUw" } ], "messages": [ { "id": "ILHxFrzvI0", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_n\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_n\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Template without parameter body,footer and buttons - quick-replay,visit-website Overview A Quick Reply Button that enables users to opt out of promotional messages easily. A URL for visiting their website For URL buttons, they do not need to be included in the Example payload. This template is ideal for sending service-related updates while providing a simple opt-out mechanism. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_p", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_p". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_id_key/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_id_key/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_p\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_id_key/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_id_key/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_id_key/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_id_key/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_p\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_id_key/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter body,footer and buttons - phone number Overview A Phone Number For calling For Phone Number buttons, they do not need to be included in the Example payload. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_qqq", "language": { "code": "en_us" }, "components": [ ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_qqq". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. In this case, the array is empty ([]), meaning there are no additional components such as headers, body text, or buttons. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx…………’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_qqq”, “language”: { “code”: “en_us” }, “components”: [ ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_qqq”, “language”: { “code”: “en_us” }, “components”: [ ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx…………’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_qqq\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx…………”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx…………” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_qqq”, “language”: { “code”: “en_us” }, “components”: [] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_qqq”, “language”: { “code”: “en_us” }, “components”: [] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx…………’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx…………”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_qqq\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx…………’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_qqq”, “language”: { “code”: “en_us” }, “components”: [] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter body,buttons - quick-replay Overview A Quick Reply Button that enables users to opt out of promotional messages. This template is suitable for sending service notifications while providing an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_r", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_r". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx…………’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx…………’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_r\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx…………”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx…………” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx…………’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx…………”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_r\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx…………’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter body,buttons - quick-replay,visit-website Overview A Quick Reply Button that enables users to opt out of promotional messages. A URL for visiting their website For URL buttons, they do not need to be included in the Example payload. This template is suitable for sending service notifications while providing an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_s", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_s". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxxxxxxx………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxxxxxxx………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_s\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxxxxxxx………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxxxxxxx………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxxxxxx………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxxxxxxx………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_s\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxxxxxx………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter body,buttons - quick-replay,visit-website,phone-number The utility_t template is a WhatsApp Business API message template designed for utility and service-related notifications. It includes: A Quick Reply Button that allows users to opt out of promotional messages. A URL for visiting their website A Phone Number For calling For URL and Phone Number buttons, they do not need to be included in the Example payload. This template is suitable for sending important service messages while providing an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_t", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_t". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxxx…………..’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxxx…………..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_t\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxxx…………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxxx…………..” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxx…………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxxx…………..”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_t\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxx…………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter body,buttons - quick-replay,visit-website Overview A Quick Reply Button that allows users to opt out of promotional messages. A URL for visiting their website For URL buttons, they do not need to be included in the Example payload. This template is suitable for sending important service messages while providing an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_v", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_v". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxxx…………..’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxxx…………..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_v\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxxx…………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxxx…………..” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxx…………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxxx…………..”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_v\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxx…………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with header and body Overview A header with dynamic text personalization. A body containing key details with placeholders for dynamic content. This template is ideal for transactional messages, customer updates, and service notifications. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_x", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "p2c" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_x". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "p2c" – Dynamic text used in the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }’ ‘<'+'?'+'php'+ ` ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_x\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_x\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with header,body,footer Overview A header with dynamic text. A body containing the main message text with placeholders for dynamic content. A Footer The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for transactional messages, order confirmations, or customer updates. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_y", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "p2c" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_y". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "p2c" – Dynamic text used in the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_y\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_y\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with header,body,footer buttons - quick-replay Overview A header with dynamic text. A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_z", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "p2c" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_z". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "p2c" – Dynamic text used in the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_z\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_z\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with header,body,footer buttons - quick-replay,visit-website Overview A header with dynamic text. A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. A URL for visiting their website For URL and Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_aa", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "p2c" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_aa". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "p2c" – Dynamic text used in the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_aa\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_aa\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with header,body,footer buttons - quick-replay,visit-website,phone-number Overview A header with dynamic text. A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. A URL for visiting their website A Phone Number For URL and Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_ab", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "p2c" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_ab". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "p2c" – Dynamic text used in the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”919946371505\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ab\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”); request.Headers.Add(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”919946371505\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ab\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body,footer buttons - quick-replay Overview A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_ac", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_ac". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. 7. Expected API Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ac\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ac\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body,footer buttons - quick-replay,visit-website Overview A header with dynamic text. A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. A URL for visiting their website For URL and Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxxx", "type": "template", "template": { "name": "utility_ad", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_ad". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ad\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ad\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body,footer buttons - quick-replay,visit-website,phone-number Overview A header with dynamic text. A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. A URL for visiting their website A Phone Number for calling For URL and Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_af", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_af". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_af\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_af\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body,footer buttons - phone-number Overview A body containing the main message text with placeholders for dynamic content. A URL for visiting their website For Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_ai", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] } ] } } Key Components in the Payload ✅ messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". ✅ recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. ✅ to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). ✅ type Type: String Description: Defines the type of message. Always set to "template". ✅ template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_ai". ✅ template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). ✅ components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ai\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ai\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body buttons - quick-replay Overview A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_aj", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_aj". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_aj\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_aj\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body buttons - quick-replay,visit-website Overview A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. A URL for visiting their website For URL buttons, they do not need to be included in the Example payload. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_ak", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_ak". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ak\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ak\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body buttons - quick-replay,visit-website,phone-number Overview A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. A URL for visiting their website A Phone Number for calling For URL and Phone Number buttons, they do not need to be included in the Example payload. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_al", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_al". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_al\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_al\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body buttons - phone-number Overview A body containing the main message text with placeholders for dynamic content. A Phone Number for calling For Phone Number buttons, they do not need to be included in the Example payload. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method:s POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_ah", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] } ] } } Explanation of Fields messaging_product Type: string Value: "whatsapp" Description: Defines the messaging platform. recipient_type Type: string Value: "individual" Description: Indicates a one-on-one message. to Type: string Example: "91xxxxxxxxxx" Description: The recipient’s WhatsApp number in international format. type Type: string Value: "template" Description: Defines this as a template message. template.name Type: string Value: "utility_ah" Description: Name of the pre-approved WhatsApp template. template.language.code Type: string Value: "en_us" Description: Language of the template. components Type: array Description: Contains message elements. Body Component Type: "body" Description: Contains the main message text. Parameters: Type: "text" Value: "12CR007" – Dynamic text inserted into the message. Expected API Response On success, WhatsApp returns a 200 OK response: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ah”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ah”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ah\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ah”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ah”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ah\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ah”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Authentication Template Creation API Zero-Tap Template This document provides detailed information about the Authentication Template used for secure verification purposes. These templates allow businesses to send structured messages to users for authentication via one-time passcodes (OTPs). Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: zero_tap_auth_template_one Language: en_US (English – United States) Category: AUTHENTICATION Message Send TTL: 60 seconds Allow Category Change: No Components The zero_tap_auth_template_one consists of a Body, Footer, and Buttons component. Body Type: BODY Security Recommendation: true Purpose: Includes an OTP and a security recommendation advising users to keep their verification code confidential. Footer Type: FOOTER Code Expiration: 5 minutes Purpose: Informs the user of the OTP validity period. Buttons Type: BUTTONS Buttons: Type: otp OTP Type: zero_tap Text: Copy Code Autofill Text: Autofill Zero-Tap Terms Accepted: true Supported Apps: Package Name: app.pingtochat.com Signature Hash: K8a/AINcGX7 Sample Request { "name": "zero_tap_auth_template_one", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "zero_tap", "text": "Copy Code", "autofill_text": "Autofill", "zero_tap_terms_accepted": true, "supported_apps": [ { "package_name": "app.pingtochat.com", "signature_hash": "K8a/AINcGX7" } ] } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "AUTHENTICATION" } Notes This template is designed specifically for authentication purposes, including account verification and secure access. The Zero-Tap Autofill feature enhances user experience by reducing manual entry. The Copy Code button provides an alternative for users who need to manually enter their OTP. The message format supports variable placeholders, making it adaptable for multiple authentication scenarios. Auto-Fill Template This document provides detailed information about the Authentication Template used for secure verification purposes. These templates allow businesses to send structured messages to users for authentication via one-time passcodes (OTPs). Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: authentication_code_autofill_button_one Language: en_US (English – United States) Category: AUTHENTICATION Message Send TTL: 60 seconds Allow Category Change: No Components The authentication_code_autofill_button_one consists of a Body, Footer, and Buttons component. Body Type: BODY Security Recommendation: true Purpose: Includes an OTP and a security recommendation advising users to keep their verification code confidential. Footer Type: FOOTER Code Expiration: 10 minutes Purpose: Informs the user of the OTP validity period. Buttons Type: BUTTONS Buttons: Type: otp OTP Type: one_tap Text: Copy Code Autofill Text: Autofill Package Name: app.pingtochat.com Signature Hash: K8a/AINcGX7 Sample Request { "name": "authentication_code_autofill_button_one", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 10 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "one_tap", "text": "Copy Code", "autofill_text": "Autofill", "package_name": "app.pingtochat.com", "signature_hash": "K8a/AINcGX7" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "AUTHENTICATION" } Notes This template is designed specifically for authentication purposes, including account verification and secure access. The One-Tap Autofill feature enhances user experience by allowing quick OTP entry. The Copy Code button provides an alternative for users who need to manually enter their OTP. The message format supports variable placeholders, making it adaptable for multiple authentication scenarios. Copy-Code Template This document provides detailed information about the Authentication Template used for secure verification purposes. These templates allow businesses to send structured messages to users for authentication via one-time passcodes (OTPs). Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: authentication_copy_code_button_one Language: en_US (English – United States) Category: AUTHENTICATION Message Send TTL: 60 seconds Allow Category Change: No Components The authentication_copy_code_button_one consists of a Body, Footer, and Buttons component. Body Type: BODY Security Recommendation: true Purpose: Includes an OTP and a security recommendation advising users to keep their verification code confidential. Footer Type: FOOTER Code Expiration: 5 minutes Purpose: Informs the user of the OTP validity period. Buttons Type: BUTTONS Buttons: Type: otp OTP Type: copy_code Text: Copy Code Sample Request { "name": "authentication_copy_code_button_one", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "copy_code", "text": "Copy Code" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "AUTHENTICATION" } Notes This template is designed specifically for authentication purposes, including account verification and secure access. The Copy Code button provides an easy way for users to manually copy and paste the OTP. The message format supports variable placeholders, making it adaptable for multiple authentication scenarios. Marketing Template Creation API No parameter The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., BODY). text (string, required): The actual content of the template component. Request Body { "name": "marketing_a", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are introducing our new product!" } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. No parameter with header-text and body The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the header and body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Content-Type: Should be set to application/json. Authorization: Bearer token for authentication. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required): The actual content of the template component. Request Body { "name": "markting_f", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component requires a format field (e.g., TEXT). No parameter with header-text and body and footer The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required): The actual content of the template component. Request Body { "name": "markting_g", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component requires a format field (e.g., TEXT). The FOOTER component is an optional text field that typically contains closing remarks. No parameter with header-text and body and button quick-replay The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY). text (string, required): The label displayed on the button. Request Body { "name": "markting_h", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component requires a format field (e.g., TEXT). The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY options. No parameter with header-text and body and button quick-replay,visit-website The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY). text (string, required): The label displayed on the button. Sample Request { "name": "markting_i", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component requires a format field (e.g., TEXT). The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY options. No parameter with header-text and body and button quick-replay,visit-website, phone number The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER). text (string, required): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The contact number for the call button. Sample Request { "name": "markting_j", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component requires a format field (e.g., TEXT). The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY options, URL buttons for external links, and PHONE_NUMBER buttons for direct calling. No parameter with header-text and body and button quick-replay,visit-website, phone number and copy-code The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The contact number for the call button. example (string, required for COPY_CODE type): The example code to be copied when the button is clicked. Sample Request { "name": "markting_k", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component requires a format field (e.g., TEXT). The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY options, URL buttons for external links, PHONE_NUMBER buttons for direct calling, and COPY_CODE buttons for copying promo codes. No parameter body , footer and button quick-replay The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The contact number for the call button. example (string, required for COPY_CODE type): The example code to be copied when the button is clicked. Sample Request { "name": "markting_l", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY options for user interaction. No parameter body , footer and button quick-replay and visit-website The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL). text (string, required for QUICK_REPLY, URL types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. Sample Request { "name": "markting_m", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY options for user interaction. No parameter body , footer and button quick-replay , visit-website and phone-number The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The phone number associated with the button. Sample Request { "name": "markting_n", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY, URL, and PHONE_NUMBER buttons for user interaction. No parameter body , footer and button quick-replay , visit-website , phone-number and copy-code The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The phone number associated with the button. example (string, required for COPY_CODE type): The example code to be copied when the button is pressed. Sample Request { "name": "markting_o", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY, URL, PHONE_NUMBER, and COPY_CODE buttons for user interaction. No parameter with body , button quick-replay The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The phone number associated with the button. example (string, required for COPY_CODE type): The example code to be copied when the button is pressed. Sample Request { "name": "markting_p", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY. No parameter body , button quick-replay and visit-website The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. Sample Request { "name": "markting_q", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY and URL. No parameter body , button quick-replay , visit-website , phone-number The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The phone number associated with the button. Sample Request { "name": "markting_r", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY, URL, and PHONE_NUMBER. No parameter body , button quick-replay , visit-website , phone-number and copy-code The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The phone number associated with the button. example (string, required for COPY_CODE type): The example code to be copied when the button is pressed. Sample Request { "name": "markting_s", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY, URL, PHONE_NUMBER, and COPY_CODE buttons for user interaction. Parameter with header and body This document provides detailed information about the Marketing Template (marketing_t). It is designed for marketing purposes, allowing businesses to send customizable messages to users. The template supports placeholders for dynamic content, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_t Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components This template consists of two primary components: Header and Body. 1. Header Component Type: HEADER Format: TEXT Text: Our {{1}} is on! Example Usage: Example Header Text: Our Summer Sale is on! Here, {{1}} is dynamically replaced with Summer Sale or any other promotional event. 2. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}} in Header: Represents the name of the promotional event (e.g., Summer Sale, Winter Discount). {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Header) = Holiday Sale {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Header: Our Holiday Sale is on! Body: We are introducing our new product about new chat feature. Example request { "name": "marketing_t", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. Parameter with header , body and footer This document provides detailed information about the Marketing Template (marketing_u). It is designed for marketing purposes, allowing businesses to send customizable messages to users. The template supports placeholders for dynamic content, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_u Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components This template consists of three primary components: Header, Body, and Footer. 1. Header Component Type: HEADER Format: TEXT Text: Our {{1}} is on! Example Usage: Example Header Text: Our Summer Sale is on! Here, {{1}} is dynamically replaced with Summer Sale or any other promotional event. 2. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 3. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}} in Header: Represents the name of the promotional event (e.g., Summer Sale, Winter Discount). {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Header) = Holiday Sale {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Header: Our Holiday Sale is on! Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Sample Request { "name": "marketing_u", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. Parameter with header-body-footer , buttons - quick-replay This document provides detailed information about the Marketing Template (marketing_v). It is designed for marketing purposes, allowing businesses to send customizable messages to users. The template supports placeholders for dynamic content, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_v Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components This template consists of four primary components: Header, Body, Footer, and Buttons. 1. Header Component Type: HEADER Format: TEXT Text: Our {{1}} is on! Example Usage: Example Header Text: Our Summer Sale is on! Here, {{1}} is dynamically replaced with Summer Sale or any other promotional event. 2. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 3. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. 4. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button allowing users to quickly opt out of promotional messages. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}} in Header: Represents the name of the promotional event (e.g., Summer Sale, Winter Discount). {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Header) = Holiday Sale {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Header: Our Holiday Sale is on! Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Button: Unsubscribe from Promos Sample Request { "name": "marketing_v", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations. Parameter with header-body-footer , buttons - quick-replay,visit website This document provides detailed information about the Marketing Template (marketing_w). It is designed for marketing purposes, allowing businesses to send customizable messages to users. The template supports placeholders for dynamic content, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_w Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components This template consists of four primary components: Header, Body, Footer, and Buttons. 1. Header Component Type: HEADER Format: TEXT Text: Our {{1}} is on! Example Usage: Example Header Text: Our Summer Sale is on! Here, {{1}} is dynamically replaced with Summer Sale or any other promotional event. 2. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 3. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. 4. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button allowing users to quickly opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs users to an external link for additional information or actions. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}} in Header: Represents the name of the promotional event (e.g., Summer Sale, Winter Discount). {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Header) = Holiday Sale {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Header: Our Holiday Sale is on! Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (Redirects to https://app.pingtochat.com/) Sample Request { "name": "marketing_w", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations. The Go to link button enables users to navigate to external pages for more details or additional actions. Parameter with header-body-footer , buttons - quick-replay,visit-website,phone-number This document provides detailed information about the Marketing Template (marketing_x). It is designed for marketing purposes, allowing businesses to send customizable messages to users. The template supports placeholders for dynamic content, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_x Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components This template consists of four primary components: Header, Body, Footer, and Buttons. 1. Header Component Type: HEADER Format: TEXT Text: Our {{1}} is on! Example Usage: Example Header Text: Our Summer Sale is on! Here, {{1}} is dynamically replaced with Summer Sale or any other promotional event. 2. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 3. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. 4. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button allowing users to quickly opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs users to an external link for additional information or actions. Type: PHONE_NUMBER Text: Call Phone Number: +91xxxxxxxxxx Purpose: Allows users to directly call a specified phone number for further assistance. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}} in Header: Represents the name of the promotional event (e.g., Summer Sale, Winter Discount). {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Header) = Holiday Sale {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Header: Our Holiday Sale is on! Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (Redirects to https://app.pingtochat.com/) Call (Dials +91xxxxxxxxxx) Sample Request { "name": "marketing_x", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations. The Go to link button enables users to navigate to external pages for more details or additional actions. The Call button provides direct contact with customer support or sales teams, improving customer engagement. Parameter with header-body-footer , buttons - quick-replay,visit-website,phone-number,copy-code This document provides detailed information about the Marketing Template (marketing_y). It is designed for marketing purposes, allowing businesses to send customizable messages to users. The template supports placeholders for dynamic content, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_y Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components This template consists of four primary components: Header, Body, Footer, and Buttons. 1. Header Component Type: HEADER Format: TEXT Text: Our {{1}} is on! Example Usage: Example Header Text: Our Summer Sale is on! Here, {{1}} is dynamically replaced with Summer Sale or any other promotional event. 2. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 3. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. 4. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button allowing users to quickly opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs users to an external link for additional information or actions. Type: PHONE_NUMBER Text: Call Phone Number: +91xxxxxxxxxx Purpose: Allows users to directly call a specified phone number for further assistance. Type: COPY_CODE Example: WRETTT Purpose: Provides users with a code that can be copied for promotional use, discounts, or verification. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}} in Header: Represents the name of the promotional event (e.g., Summer Sale, Winter Discount). {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Header) = Holiday Sale {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Header: Our Holiday Sale is on! Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (Redirects to https://app.pingtochat.com/) Call (Dials +91xxxxxxxxxx) Copy Code (WRETTT – Users can copy this code for later use) Sample Request { "name": "marketing_y", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations. The Go to link button enables users to navigate to external pages for more details or additional actions. The Call button provides direct contact with customer support or sales teams, improving customer engagement. The Copy Code button allows users to easily copy a promotional or discount code for later use. Parameter with body footer button - quick replay This document provides detailed information about the Marketing Template (marketing_z). It is designed for marketing purposes, allowing businesses to send customizable messages to users. The template supports placeholders for dynamic content, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_z Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components This template consists of three primary components: Body, Footer, and Buttons. 1. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 2. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. 3. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button allowing users to quickly opt out of promotional messages. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Sample Request { "name": "marketing_z", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations. Parameter with body footer button - quick-replay ,visit-website and phone-number This document provides detailed information about the Marketing Templates used for marketing purposes. These templates allow businesses to send customizable messages to users with dynamic placeholders, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Marketing Template AA Name: marketing_aa Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components The marketing_aa template consists of multiple components: Body, Footer, and Buttons. 1. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 2. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. 3. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button for opting out of promotions. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs users to an external link for further engagement. Type: PHONE_NUMBER Text: Call Phone Number: 91xxxxxxxxxx Purpose: Provides a direct call option for customer support or inquiries. Dynamic Placeholders The templates include placeholders for dynamic content: {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (redirects to https://app.pingtochat.com/) Call (dials 91xxxxxxxxxx) Sample Request { "name": "marketing_aa", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations. The Go to link button helps direct users to external resources, while the Call button facilitates direct communication. Parameter with body footer button - quick-replay ,visit-website, phone-number and copy-code This document provides detailed information about the Marketing Templates used for marketing purposes. These templates allow businesses to send customizable messages to users with dynamic placeholders, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Marketing Template AB Name: marketing_ab Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components The marketing_ab template consists of multiple components: Body, Footer, and Buttons. 1. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 2. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. 3. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button for opting out of promotions. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs users to an external link for further engagement. Type: PHONE_NUMBER Text: Call Phone Number: 91xxxxxxxxxx Purpose: Provides a direct call option for customer support or inquiries. Type: COPY_CODE Example: WRETTT Purpose: Allows users to copy a promotional or discount code for use. Dynamic Placeholders The templates include placeholders for dynamic content: {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (redirects to https://app.pingtochat.com/) Call (dials 91xxxxxxxxxx) Copy Code: WRETTT Sample Request { "name": "marketing_ab", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations. The Go to link button helps direct users to external resources, while the Call button facilitates direct communication. The Copy Code button allows users to quickly copy promotional or discount codes for convenience. Parameter with body , button - quick-replay This document provides detailed information about the Marketing Templates used for marketing purposes. These templates allow businesses to send customizable messages to users with dynamic placeholders, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Marketing Template AC Name: marketing_ac Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components The marketing_ac template consists of Body and Buttons components. 1. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 2. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button for opting out of promotions. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}}** in Body:** Represents an introductory phrase (e.g., our, the latest). {{2}}** in Body:** Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Body: We are introducing our new product about new chat feature. Buttons: Unsubscribe from Promos Sample Request { "name": "marketing_ac", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations. Parameter with body , button - quick-replay, visit-website This document provides detailed information about the Marketing Templates used for marketing purposes. These templates allow businesses to send customizable messages to users with dynamic placeholders, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_ad Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components The marketing_ad template consists of a Body and a Buttons component. Body: Type: BODY Text: "We are introducing {{1}} new product about {{2}}" Example: "We are introducing our new product about WhatsApp message app" Purpose: Used for marketing campaigns to introduce new products or services dynamically. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows users to opt out of future marketing messages. Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Redirects the recipient to an external site for more details or purchase options. Example Message Generation: "We are introducing our new product about WhatsApp message app" Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) Sample Request { "name": "marketing_ad", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes: This is a Marketing Template, meaning it is designed to promote and advertise new products. Dynamic placeholders ({{1}} and {{2}}) allow customization for different products and topics. Quick Reply Button enables users to opt out of promotional messages. URL Button provides direct access to the product or promotional landing page. There is no header or footer, keeping the message concise and action-oriented. Parameter with body , button - quick-replay, visit-website, phone-number This document provides detailed information about the Marketing Templates used for marketing purposes. These templates allow businesses to send customizable messages to users with dynamic placeholders, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_ae Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components The marketing_ae template consists of a Body and Buttons component. Body: Type: BODY Text: "We are introducing {{1}} new product about {{2}}" Example: "We are introducing our new product about WhatsApp message app" Purpose: Used for marketing campaigns to introduce new products or services dynamically. Buttons: Type: BUTTONS Buttons: Quick Reply Button Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows users to opt out of promotional messages. URL Button Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Redirects the recipient to an external site for more details or purchase options. Phone Number Button Type: PHONE_NUMBER Text: "Call" Phone Number: +91xxxxxxxxxx Purpose: Allows users to directly call a support or sales representative. Example Message Generation: 📢 "We are introducing our new product about WhatsApp message app" Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) "Call" (Phone Number: +91xxxxxxxxxx) Sample Request { "name": "marketing_ae", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes: This is a Marketing Template, meaning it is designed to promote and advertise new products. Dynamic placeholders ({{1}} and {{2}}) allow customization for different products and topics. Quick Reply Button enables users to opt out of promotional messages. URL Button provides direct access to the product or promotional landing page. Phone Number Button allows users to contact support/sales directly. There is no header or footer, keeping the message concise and action-oriented. Parameter with body , button - quick-replay, visit-website, phone-number, copy-code This document provides detailed information about the Marketing Templates used for marketing purposes. These templates allow businesses to send customizable messages to users with dynamic placeholders, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_af Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components The marketing_af template consists of a Body and Buttons component. Body: Type: BODY Text: “We are introducing {{1}} new product about {{2}}” Example: “We are introducing our new product about WhatsApp message app” Purpose: Used for marketing campaigns to introduce new products or services dynamically. Buttons: Type: BUTTONS Buttons: Quick Reply Button Type: QUICK_REPLY Text: “Unsubscribe from Promos” Purpose: Allows users to opt out of promotional messages. URL Button Type: URL Text: “Go to link” URL: “https://app.pingtochat.com/“ Purpose: Redirects the recipient to an external site for more details or purchase options. Phone Number Button Type: PHONE_NUMBER Text: “Call” Phone Number: “+91xxxxxxxxxx” Purpose: Allows users to directly call a support or sales representative. Copy Code Button Type: COPY_CODE Example: “WRETTT” Purpose: Provides a code that users can copy for discounts or promotions. Example Message Generation: “We are introducing our new product about WhatsApp message app” Buttons: “Unsubscribe from Promos” “Go to link” (URL: “https://app.pingtochat.com/“) “Call” (Phone Number: “+91xxxxxxxxxx”) “Copy Code” (Example: “WRETTT”) Sample Request { "name": "marketing_af", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes: This is a Marketing Template, meaning it is designed to promote and advertise new products. Dynamic placeholders ({{1}} and {{2}}) allow customization for different products and topics. Quick Reply Button enables users to opt out of promotional messages. URL Button provides direct access to the product or promotional landing page. Phone Number Button allows users to contact support/sales directly. Copy Code Button is useful for sharing discount codes, promo codes, or reference codes. There is no header or footer, keeping the message concise and action-oriented. Template with header-image body and button quick replay The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., Header). type (string, required): Type of component (e.g., BODY). text (string, required): The actual content of the template component. file (string, required): Request Body { "name": "marketing_attachment_one", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://app.pingtochat.com/template_media/1736424548.png" } } ] }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. No parameter with header-image body and button quick replay phone number and copy code The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as body text, headers, footers, and interactive buttons. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). text (string, required for BODY and FOOTER): The actual content of the template component. format (string, required for HEADER when media is used): The format type (e.g., MEDIA). example (object, required for HEADER with media and copy_code button): Example data such as media URL or promo code. buttons (array, required for BUTTONS component): List of interactive buttons. type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER): The button label text. url (string, required for URL button): The destination link. phone_number (string, required for PHONE_NUMBER button): Contact number. example (string, required for COPY_CODE button): Example promo code. Request Body Example { "name": "markting_attachment_no_parameter", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the template name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component supports media attachments via a valid media URL. The BUTTONS component provides interactive elements such as quick replies, URLs, phone numbers, and copy codes for user engagement. No Parameter with header-video body footer and buttons - quick-replay,visit-website,phone-number,copy-code Template Creation API Documentation The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as body text, headers, footers, and interactive buttons. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER when media is used): The format type (e.g., MEDIA). text (string, required for BODY and FOOTER): The actual content of the template component. example (object, required for HEADER with media and COPY_CODE button): Example data such as media URL or promo code. buttons (array, required for BUTTONS component): List of interactive buttons. type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER): The button label text. url (string, required for URL button): The destination link. phone_number (string, required for PHONE_NUMBER button): Contact number. example (string, required for COPY_CODE button): Example promo code. Request Body Example { "name": "markting_attachment_no_parameter_1", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://file-examples.com/storage/fe21422a6d67aa28993b797/2017/04/file_example_MP4_480_1_5MG.mp4" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "URL", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" }, { "type": "COPY_CODE", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the template name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component supports media attachments via a valid media URL. The BUTTONS component provides interactive elements such as quick replies, URLs, phone numbers, and copy codes for user engagement. No parameter with header-pdf body footer and buttons - quick-replay,visit-website,phone-number,copy-code Template Creation API Documentation The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as body text, headers, footers, and interactive buttons. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER when media is used): The format type (e.g., MEDIA). text (string, required for BODY and FOOTER): The actual content of the template component. example (object, required for HEADER with media and COPY_CODE button): Example data such as media URL or promo code. buttons (array, required for BUTTONS component): List of interactive buttons. type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER): The button label text. url (string, required for URL button): The destination link. phone_number (string, required for PHONE_NUMBER button): Contact number. example (string, required for COPY_CODE button): Example promo code. Request Body Example { "name": "markting_attachment_no_parameter_2", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "URL", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "COPY_CODE", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the template name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component supports media attachments via a valid media URL. The BUTTONS component provides interactive elements such as quick replies, URLs, phone numbers, and copy codes for user engagement. Parameter with header-image body footer and buttons - quick-replay,visit-website,phone-number,copy-code The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as body text, headers, footers, and interactive buttons. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). text (string, required for BODY and FOOTER): The actual content of the template component. format (string, required for HEADER when media is used): The format type (e.g., MEDIA). example (object, required for HEADER with media, BODY with placeholders, and copy_code button): Example data such as media URL, placeholder values, or promo code. buttons (array, required for BUTTONS component): List of interactive buttons. type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER): The button label text. url (string, required for URL button): The destination link. phone_number (string, required for PHONE_NUMBER button): Contact number. example (string, required for COPY_CODE button): Example promo code. Request Body Examples { "name": "marketing_parameter_attachment", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our", "whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the template name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component supports media attachments via a valid media URL. The BODY component supports placeholders for dynamic content. The BUTTONS component provides interactive elements such as quick replies, URLs, phone numbers, and copy codes for user engagement. Parameter with header-video body footer and buttons - quick-replay,visit-website,phone-number,copy-code The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as body text, headers, footers, and interactive buttons. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER when media is used): The format type (e.g., MEDIA). text (string, required for BODY and FOOTER): The actual content of the template component. example (object, required for HEADER with media and COPY_CODE button): Example data such as media URL or promo code. buttons (array, required for BUTTONS component): List of interactive buttons. type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER): The button label text. url (string, required for URL button): The destination link. phone_number (string, required for PHONE_NUMBER button): Contact number. example (string, required for COPY_CODE button): Example promo code. Request Body Example { "name": "marketing_parameter_attachment_1", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": https://file-examples.com/storage/fe21422a6d67aa28993b797/2017/04/file_example_MP4_480_1_5MG.mp4" } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our", "whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "URL", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "COPY_CODE", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the template name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component supports media attachments via a valid media URL. The BODY component supports parameters for dynamic content insertion. The BUTTONS component provides interactive elements such as quick replies, URLs, phone numbers, and copy codes for user engagement. Parameter with header-pdf body footer and buttons - quick-replay,visit-website,phone-number,copy-code The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as body text, headers, footers, and interactive buttons. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER when media is used): The format type (e.g., MEDIA). text (string, required for BODY and FOOTER): The actual content of the template component. example (object, required for HEADER with media and COPY_CODE button): Example data such as media URL or promo code. buttons (array, required for BUTTONS component): List of interactive buttons. type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER): The button label text. url (string, required for URL button): The destination link. phone_number (string, required for PHONE_NUMBER button): Contact number. example (string, required for COPY_CODE button): Example promo code. Request Body Example { "name": "marketing_parameter_attachment_1", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our", "whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "URL", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "COPY_CODE", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the template name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component supports media attachments via a valid media URL. The BODY component supports parameters for dynamic content insertion. The BUTTONS component provides interactive elements such as quick replies, URLs, phone numbers, and copy codes for user engagement. Utility Template Creation API No parameter This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template A Name: utility_a Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_a template consists of a Body component. 1. Body Component Type: BODY Text: Item no 12CR007 is confirmed! Purpose: This message serves as a confirmation notification for an item, order, or transaction. Example Message Generation The generated message will be: Body: Item no 12CR007 is confirmed! Sample Request { "name": "utility_a", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no 12CR007 is confirmed!" } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The message format is fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter head and body This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template F Name: utility_f Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components 1. Utility Template F Components The utility_f template consists of a Header and a Body component. Header: Type: HEADER Format: TEXT Text: Order Infermation Purpose: Provides a title for the message, indicating that it contains order-related details. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Example Message Generation Utility Template F Header: Order Infermation Body: Item no CR7000 is confirmed! Sample Request { "name": "utility_f", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Order Infermation" }, { "type": "BODY", "text": "Item no CR7000 is confirmed!" } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter head , body and footer This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template G Name: utility_g Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template G Components The utility_g template consists of a Header, a Body, and a Footer component. Header: Type: HEADER Format: TEXT Text: Order Infermation Purpose: Provides a title for the message, indicating that it contains order-related details. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Example Message Generation Utility Template G Header: Order Infermation Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Sample Request { "name": "utility_g", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Order Infermation" }, { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter header , body , footer and buttons - quick replay This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template H Name: utility_h Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template H Components The utility_h template consists of a Header, a Body, a Footer, and a Buttons component. Header: Type: HEADER Format: TEXT Text: Order Infermation Purpose: Provides a title for the message, indicating that it contains order-related details. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button for the recipient to opt out of promotional messages. Example Message Generation Utility Template H Header: Order Infermation Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Button: Unsubscribe from Promos Sample Request { "name": "utility_h", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Order Infermation" }, { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The inclusion of a Quick Reply Button allows recipients to opt out of promotional content easily. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter header , body , footer and buttons - quick-replay visit website This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template I Name: utility_i Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template I Components The utility_i template consists of a Header, a Body, a Footer, and a Buttons component. Header: Type: HEADER Format: TEXT Text: Order Infermation Purpose: Provides a title for the message, indicating that it contains order-related details. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Provides a link for the recipient to access additional resources or actions. Example Message Generation Utility Template I Header: Order Infermation Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_i", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Order Infermation" }, { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The inclusion of Quick Reply and URL Buttons allows recipients to opt out of promotions or take further actions easily. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter body,footer and buttons - quick-replay This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template L Name: utility_l Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template L Components The utility_l template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages. Example Message Generation Utility Template L Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Sample Request { "name": "utility_l", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The inclusion of a Quick Reply Button allows recipients to opt out of promotions easily. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter body,footer and buttons - quick-replay,visit-website This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template M Name: utility_m Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template M Components The utility_m template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Provides a link for the recipient to access additional resources or actions. Example Message Generation Utility Template M Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_m", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The inclusion of Quick Reply and URL Button allows recipients to opt out of promotions or access additional resources easily. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter body,footer and buttons - quick-replay,visit-website,phone-number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template N Name: utility_n Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template N Components The utility_n template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Provides a link for the recipient to access additional resources or actions. Type: PHONE_NUMBER Text: Call Phone Number: 91xxxxxxxxxx Purpose: Allows the recipient to directly call a designated phone number for support or inquiries. Example Message Generation Utility Template N Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (URL: https://app.pingtochat.com/) Call (Phone: 91xxxxxxxxxx) Sample Request { "name": "utility_n", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The inclusion of Quick Reply, URL Button, and Phone Number Button allows recipients to opt out of promotions, access resources, or make direct calls conveniently. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter body,footer and buttons - quick-replay,visit-website This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template P Name: utility_p Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template P Components The utility_p template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Provides a link for the recipient to access additional resources or actions. Example Message Generation Utility Template P Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_p", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The inclusion of Quick Reply and URL Button allows recipients to opt out of promotions or access additional resources conveniently. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter body,footer and buttons - phone number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template QQQ Name: utility_qqq Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template QQQ Components The utility_qqq template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: PHONE_NUMBER Text: Call Phone Number: 91xxxxxxxxxx Purpose: Allows the recipient to initiate a call directly for further assistance. Example Message Generation Utility Template QQQ Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Buttons: Call (Phone Number: 91xxxxxxxxxx) Sample Request { "name": "utility_qqq", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The Phone Number Button allows recipients to directly contact the sender for support or inquiries. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter body,buttons - quick-replay This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template R Name: utility_r Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template R Components The utility_r template consists of a Body and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages quickly. Example Message Generation Utility Template R Body: Item no CR7000 is confirmed!Buttons: Unsubscribe from Promos Sample Request { "name": "utility_r", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The Quick Reply Button allows recipients to quickly opt out of promotions. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter body,buttons - quick-replay,visit-website This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template S Name: utility_s Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template S Components The utility_s template consists of a Body and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages quickly. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Example Message Generation Utility Template S Body: Item no CR7000 is confirmed!Buttons: Unsubscribe from Promos Go to link (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_s", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The Quick Reply Button allows recipients to quickly opt out of promotions. The URL Button provides direct access to an external link for additional actions. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter body,buttons - quick-replay,visit-website,phone-number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_t Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_t template consists of a Body and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages quickly. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Type: PHONE_NUMBER Text: Call Phone Number: 91xxxxxxxxxx Purpose: Allows the recipient to initiate a call directly for further assistance. Example Message Generation Body: Item no CR7000 is confirmed!Buttons: Call (Phone Number: 91xxxxxxxxxx) Unsubscribe from Promos Go to link (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_t", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Quick Reply Button enables recipients to opt out of promotions. The URL Button directs users to an external link for further actions. The Phone Number Button allows recipients to initiate a call for assistance. The message format is fixed and does not include dynamic placeholders, making it suitable for standard notifications. Parameter with header and body This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_x Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_x template consists of a Header and a Body component. Header: Type: HEADER Format: TEXT Text: Hi confirmation from {{1}}! Example: "Hi confirmation from P2C!" Purpose: Provides a personalized greeting that includes a dynamic value (e.g., company name or sender). Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Example Message Generation Header: "Hi confirmation from P2C!"Body: "Item no 12CR007 is confirmed!" Sample Request { "name": "utility_x", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Hi confirmation from {{1}}!", "example": { "header_text": [ "P2C" ] } }, { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Header is dynamic, allowing customization of the sender name or company. The Body is also dynamic, enabling personalization of item numbers for better clarity. The message format supports variable placeholders, making it adaptable for multiple use cases. Parameter with header,body,footer This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_y Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_y template consists of a Header, a Body, and a Footer component. Header: Type: HEADER Format: TEXT Text: Hi confirmation from {{1}}! Example: "Hi confirmation from P2C!" Purpose: Provides a personalized greeting that includes a dynamic value (e.g., company name or sender). Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Footer: Type: FOOTER Text: "Thank you for choosing us!" Purpose: Adds a closing remark to appreciate the recipient. Example Message Generation Header: "Hi confirmation from P2C!"Body: "Item no 12CR007 is confirmed!"Footer: "Thank you for choosing us!" Sample Request { "name": "utility_y", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Hi confirmation from {{1}}!", "example": { "header_text": [ "P2C" ] } }, { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Header is dynamic, allowing customization of the sender name or company. The Body is also dynamic, enabling personalization of item numbers for better clarity. The Footer provides a standard thank-you message, enhancing user engagement. The message format supports variable placeholders, making it adaptable for multiple use cases. Parameter with header,body,footer buttons - quick-replay This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_z Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_z template consists of a Header, a Body, a Footer, and a Buttons component. Header: Type: HEADER Format: TEXT Text: Hi confirmation from {{1}}! Example: "Hi confirmation from P2C!" Purpose: Provides a personalized greeting that includes a dynamic value (e.g., company name or sender). Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Footer: Type: FOOTER Text: "Thank you for choosing us!" Purpose: Adds a closing remark to appreciate the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Example Message Generation Header: "Hi confirmation from P2C!"Body: "Item no 12CR007 is confirmed!"Footer: "Thank you for choosing us!"Buttons: "Unsubscribe from Promos" Sample Request { "name": "utility_z", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Hi confirmation from {{1}}!", "example": { "header_text": [ "P2C" ] } }, { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Header and Body are dynamic, allowing personalization for a more user-specific experience. The Footer provides a thank-you message to improve customer engagement. The Quick Reply Button enables users to opt out of promotional messages easily. Parameter with header,body,footer buttons - quick-replay,visit-website This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_aa Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_aa template consists of a Header, a Body, a Footer, and a Buttons component. Header: Type: HEADER Format: TEXT Text: Hi confirmation from {{1}}! Example: "Hi confirmation from P2C!" Purpose: Provides a personalized greeting that includes a dynamic value (e.g., company name or sender). Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Footer: Type: FOOTER Text: "Thank you for choosing us!" Purpose: Adds a closing remark to appreciate the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Example Message Generation Header: "Hi confirmation from P2C!"Body: "Item no 12CR007 is confirmed!"Footer: "Thank you for choosing us!"Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_aa", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Hi confirmation from {{1}}!", "example": { "header_text": [ "P2C" ] } }, { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Header and Body are dynamic, allowing personalization for a more user-specific experience. The Footer provides a thank-you message to improve customer engagement. The Quick Reply Button enables users to opt out of promotional messages easily. The URL Button provides direct access to an external link for additional actions. No parameter header , body , footer and buttons - quick-replay ,visit-website,phone-number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template J Name: utility_j Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template J Components The utility_j template consists of a Header, a Body, a Footer, and a Buttons component. Header: Type: HEADER Format: TEXT Text: Order Infermation Purpose: Provides a title for the message, indicating that it contains order-related details. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Provides a link for the recipient to access additional resources or actions. Type: PHONE_NUMBER Text: Call Phone Number: 91xxxxxxxxxx Purpose: Provides a direct call option for customer support or further assistance. Example Message Generation Utility Template J Header: Order Infermation Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (URL: https://app.pingtochat.com/) Call (Phone: 91xxxxxxxxxx) Sample Request { "name": "utility_j", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Order Infermation" }, { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The inclusion of Quick Reply, URL, and Phone Number Buttons allows recipients to opt out of promotions, access additional resources, or directly call for support. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. arameter with header,body,footer buttons - quick-replay,visit-website,phone-number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_ab Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_ab template consists of a Header, a Body, a Footer, and a Buttons component. Header: Type: HEADER Format: TEXT Text: Hi confirmation from {{1}}! Example: "Hi confirmation from P2C!" Purpose: Provides a personalized greeting that includes a dynamic value (e.g., company name or sender). Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Footer: Type: FOOTER Text: "Thank you for choosing us!" Purpose: Adds a closing remark to appreciate the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Type: PHONE_NUMBER Text: "Call" Phone Number: 91xxxxxxxxxx Purpose: Allows the recipient to initiate a call directly for further assistance. Example Message Generation Header: "Hi confirmation from P2C!"Body: "Item no 12CR007 is confirmed!"Footer: "Thank you for choosing us!"Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) "Call" (Phone Number: 91xxxxxxxxxx) Sample Request { "name": "utility_ab", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Hi confirmation from {{1}}!", "example": { "header_text": [ "P2C" ] } }, { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Header and Body are dynamic, allowing personalization for a more user-specific experience. The Footer provides a thank-you message to improve customer engagement. The Quick Reply Button enables users to opt out of promotional messages easily. The URL Button provides direct access to an external link for additional actions. The Phone Number Button allows recipients to initiate a call for further assistance. Parameter with body,footer buttons - quick-replay This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_ac Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_ac template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Footer: Type: FOOTER Text: "Thank you for choosing us!" Purpose: Adds a closing remark to appreciate the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Example Message Generation Body: "Item no 12CR007 is confirmed!"Footer: "Thank you for choosing us!"Buttons: "Unsubscribe from Promos" Sample Request { "name": "utility_ac", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Footer provides a thank-you message to improve customer engagement. The Quick Reply Button enables users to opt out of promotional messages easily. Parameter with body,footer buttons - quick-replay,visit-website This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_ad Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_ad template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Footer: Type: FOOTER Text: "Thank you for choosing us!" Purpose: Adds a closing remark to appreciate the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Example Message Generation Body: "Item no 12CR007 is confirmed!"Footer: "Thank you for choosing us!"Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_ad", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Footer provides a thank-you message to improve customer engagement. The Quick Reply Button enables users to opt out of promotional messages easily. The URL Button allows users to access an external link for additional actions. Parameter with body,footer buttons - quick-replay,visit-website,phone-number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_af Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_af template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Footer: Type: FOOTER Text: "Thank you for choosing us!" Purpose: Adds a closing remark to appreciate the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Type: PHONE_NUMBER Text: "Call" Phone Number: 91xxxxxxxxxx Purpose: Allows the recipient to initiate a call for further assistance. Example Message Generation Body: "Item no 12CR007 is confirmed!"Footer: "Thank you for choosing us!"Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) "Call" (Phone Number: 91xxxxxxxxxx) Sample Request { "name": "utility_af", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Footer provides a thank-you message to enhance customer experience. The Quick Reply Button enables users to opt out of promotional messages easily. The URL Button allows users to access an external link for additional actions. The Phone Number Button lets users directly call customer support for assistance. Parameter with body buttons - quick-replay This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_aj Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_aj template consists of a Body and a Buttons component. Body: Type: BODY Text: "Item no {{1}} is confirmed!" Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Example Message Generation Body: "Item no 12CR007 is confirmed!"Buttons: "Unsubscribe from Promos" Sample Request { "name": "utility_aj", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for transactional confirmation messages with a simple opt-out feature. The Quick Reply Button enables users to opt out of promotional messages easily. There is no Footer or Header in this template, keeping it minimal and focused. Parameter with body buttons - quick-replay,visit-website This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_ak Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_ak template consists of a Body and a Buttons component. Body: Type: BODY Text: "Item no {{1}} is confirmed!" Example: "Item no 12CR007 is confirmed!" Purpose: Provides a confirmation message for an item, order, or transaction with a dynamic item number. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Example Message Generation Body: "Item no 12CR007 is confirmed!"Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_ak", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for transactional confirmation messages with options for opting out of promotions and redirecting users to an external link. The Quick Reply Button enables users to opt out of promotional messages easily. The URL Button provides direct access to an external link for additional actions. There is no Footer or Header, keeping the template minimal and functional. Parameter with body buttons - quick-replay,visit-website,phone-number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_al Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_al template consists of a Body and a Buttons component. Body: Type: BODY Text: "Item no {{1}} is confirmed!" Example: "Item no 12CR007 is confirmed!" Purpose: Provides a confirmation message for an item, order, or transaction with a dynamic item number. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Type: PHONE_NUMBER Text: "Call" Phone Number: 91xxxxxxxxxx Purpose: Allows the recipient to initiate a call directly for further assistance. Example Message Generation Body: "Item no 12CR007 is confirmed!"Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) "Call" (Phone Number: 91xxxxxxxxxx) Sample Request { "name": "utility_al", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for transactional confirmation messages with options for opting out of promotions, redirecting users to an external link, and calling a support number. The Quick Reply Button enables users to opt out of promotional messages easily. The URL Button provides direct access to an external link for additional actions. The Phone Number Button allows recipients to call customer support instantly. There is no Footer or Header, keeping the template minimal and functional. No parameter with header-image and body and button quick-replay,visit-website, phone number The utility_attachment_no_parameter template is a Utility Template designed for transactional or informational messaging. This template includes an image attachment, a confirmation message, and interactive buttons to engage users. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Details Name: utility_attachment_no_parameter Language: en_US (English – United States) Category: UTILITY Allow Category Change: true Components Header Type: HEADER Format: MEDIA Example Media URL: https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png Body Type: BODY Text: Item no 12CR007 is confirmed! Footer Type: FOOTER Text: Thank you for choosing us! Buttons Type: BUTTONS Buttons: Quick Reply: Unsubscribe from Promos URL Button: Text: Go to link URL: https://app.pingtochat.com/ Phone Number Button: Text: Call Phone Number: +91xxxxxxxxxx Example Request { "name": "utility_attachment_no_parameter", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" } }, { "type": "BODY", "text": "Item no 12CR007 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response { "id": "xxxxxx", "status": "APPROVED", "category": "UTILITY" } Notes This template is intended for transactional confirmations. The Quick Reply button allows users to opt out of promotional messages. The URL button directs users to an external website for further actions. The Phone Number button lets users call support directly. The image attachment enhances engagement by providing a visual confirmation. No parameter with header-pdf and body and button quick-replay,visit-website, phone number The Utility Attachment (No Parameter) Template allows businesses to send structured messages containing a PDF attachment for transactional or informational purposes. This template ensures clear communication with users regarding confirmed items or transactions. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_attachment_no_parameter Language: en_US (English – United States) Category: UTILITY Allow Category Change: true Components Header Type: HEADER Format: MEDIA Example: { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } Purpose: Attaches a PDF file to provide relevant documents or receipts. Body Type: BODY Text: Item no 12CR007 is confirmed! Purpose: Notifies the user about a confirmed transaction or order. Footer Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a courteous closing statement. Buttons Type: BUTTONS Buttons: Quick Reply Text: Unsubscribe from Promos Purpose: Allows users to opt-out of promotional messages. URL Button Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs users to an external link for more details. Phone Number Button Text: Call Phone Number: +91xxxxxxxxxx Purpose: Enables users to directly call customer support. Sample API Request { "name": "utility_attachment_no_parameter", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "Item no 12CR007 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response { "id": "xxxxxx", "status": "APPROVED", "category": "UTILITY" } Notes The template is designed for sending confirmation messages with an attached PDF document. The allow_category_change flag is set to true, enabling flexibility in category selection. The Quick Reply button helps users opt out of promotional messages. The URL button allows users to access additional details via an external link. The Phone Number button provides quick access to customer support. No parameter with header-video and body and button quick-replay,visit-website, phone number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_attachment_no_parameter Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_attachment_no_parameter template consists of a Header, Body, and Buttons component. Header: Type: HEADER Format: MEDIA Example Media URL: https://urwallet.pingtochat.com/template_media/1740161305.mp4 Purpose: Provides a media attachment such as a video to enhance the message. Body: Type: BODY Text: "Item no 12CR007 is confirmed!" Purpose: Provides a confirmation message for an item, order, or transaction. Buttons: Type: BUTTONS Buttons List: Quick Reply:"Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. URL Button:"Go to link" → Pingtochat Purpose: Directs the recipient to an external link for further actions. Phone Number Button:"Call" → +91xxxxxxxxxx Purpose: Allows the recipient to initiate a call directly for further assistance. Buttons: “Unsubscribe from Promos” “Go to link” (URL: https://app.pingtochat.com/) “Call” (Phone Number: +91xxxxxxxxxx) Sample Request { "name": "utility_attachment_no_parameter", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://pingtochat.com/template_media/1740161305.mp4" } }, { "type": "BODY", "text": "Item no 12CR007 is confirmed!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 CREATED { "id": "xxxxxx", "status": "APPROVED", "category": "UTILITY" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for transactional confirmation messages with options for: Opting out of promotions Redirecting users to an external link Calling a support number The Quick Reply Button enables users to opt out of promotional messages easily. The URL Button provides direct access to an external link for additional actions. The Phone Number Button allows recipients to call customer support instantly. The Header includes a video attachment, making it a rich media template. Parameter with header-video and body and button quick-replay,visit-website, phone number This document provides detailed information about the Utility Parameter Attachment template, which is used for marketing communications that include media attachments and dynamic parameters. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_parameter_attachment Language: en_US (English – United States) Category: MARKETING Allow Category Change: true Components Header Type: HEADER Format: MEDIA Example Media URL: Google Logo Purpose: Displays an image attachment in the message. Body Type: BODY Text: We are introducing {{1}} new product about {{2}} Example: our whatsapp message app Purpose: Provides dynamic placeholders to introduce a new product. Footer Type: FOOTER Text: Thank you for choosing us! Purpose: Adds a closing remark to the message. Buttons Type: BUTTONS Buttons: Quick Reply Text: Unsubscribe from Promos Purpose: Allows users to opt out of marketing messages. URL Button Text: Go to link URL: PingToChat Purpose: Redirects users to an external link. Phone Number Button Text: Call Phone Number: +91xxxxxxxxxx Purpose: Allows users to initiate a call for inquiries. Example Request { "name": "utility_parameter_attachment", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" } }, { "type": "BODY", "text": "We are introducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our", "whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED Example Response: { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes This template is designed for marketing communications involving product introductions. The Body section allows dynamic placeholders for product customization. The Quick Reply button lets users opt out of future promotional messages. The URL Button provides a direct link to additional information or a product page. The Phone Number Button facilitates instant customer support. Parameter with header-pdf and body and button quick-replay,visit-website, phone number This document provides detailed information about the Utility Template with Parameter used for communication purposes. This template allows businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_parameter_attachment Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components The utility_parameter_attachment template consists of the following components: 1. Header Type: HEADER Format: MEDIA Example: jsonCopyEdit{ "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } Purpose: Displays a media file (in this case, a PDF file). 2. Body Type: BODY Text: “We are introducing {{1}} new product about {{2}}” Purpose: This component allows dynamic insertion of values through parameters ({{1}} and {{2}}), which will be replaced with actual data at runtime. Example: jsonCopyEdit{ "body_text": [ [ "our", "whatsapp message app" ] ] } 3. Footer Type: FOOTER Text: “Thank you for choosing us!” Purpose: Displays a closing message at the bottom of the template. 4. Buttons Type: BUTTONS Buttons: Type: QUICK_REPLY Text: “Unsubscribe from Promos” Purpose: A quick reply button to allow the recipient to opt out of promotions. Type: URL Text: “Go to link” URL: “https://app.pingtochat.com/“ Purpose: Provides a clickable link to direct the user to a URL. Type: PHONE_NUMBER Text: “Call” Phone Number: “91xxxxxxxxxx” Purpose: Initiates a call to the given phone number. Sample Request { "name": "utility_parameter_attachment", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "We are introducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our", "whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category, as allow_category_change is set to true. The template is designed for marketing messages, introducing new products and providing a call-to-action with multiple buttons for user interaction (Unsubscribe, Go to Link, and Call). The Quick Reply Button allows recipients to easily opt out of promotional messages. The URL Button redirects users to an external link. The Phone Number Button enables direct calling to customer support. Parameter with header-image and body and button quick-replay,visit-website, phone number The Utility Attachment (Parameter) Template is designed for sending structured messages with media attachments. This template allows businesses to send confirmation messages with dynamic item numbers, along with interactive buttons for user actions. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_attachment_no_parameter Language: en_US Category: UTILITY Allow Category Change: true Components: Header: Type: HEADER Format: MEDIA Example Media URL: https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png Body: Type: BODY Text: Item no {{1}} is confirmed! Example: { "body_text": [["12CR007"]] } Footer: Type: FOOTER Text: Thank you for choosing us! Buttons: Type: BUTTONS Buttons: Quick Reply: { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } URL Button: { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } Phone Number Button: { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" } Example API Request { "name": "utility_attachment_parameter", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" } }, { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [["12CR007"]] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response { "id": "xxxxxx", "status": "APPROVED", "category": "UTILITY" } Notes This template is designed for transactional confirmation messages. The Quick Reply Button allows users to opt out of promotional messages easily. The URL Button provides direct access to an external link for additional actions. The Phone Number Button allows recipients to call customer support instantly. Since allow_category_change is true, the template can be used for multiple categories as needed. Edit Templates API Parameter with header body without static button url and quick-replay Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_z", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Parameters name (string, required) – Unique identifier for the template (e.g., “edit_s”). language (string, required) – Language code for the template (e.g., “en_US”). category (string, required) – Category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Whether the category can be changed (true/false). components (array, required) – List of structural components of the template. Components Breakdown HEADER type (string, required) – “HEADER” format (string, required) – “TEXT” text (string, required) – “Our summer sale is on!” BODY type (string, required) – “BODY” text (string, required) – “Shop now and use code CR7000 to get more offers” FOOTER type (string, required) – “FOOTER” text (string, required) – “Thank you for choosing us!” BUTTONS type (string, required) – “BUTTONS” buttons (array, required) – Contains interactive buttons. QUICK_REPLY type (string, required) – “QUICK_REPLY” text (string, required) – “Unsubscribe from Promos” URL Button type (string, required) – “url” text (string, required) – “Go to link” url (string, required) – “https://app.pingtochat.com“ Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Winter Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "45OFF", "35%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your Urwallet subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Components Breakdown HEADER text: “Our pingtochat {{1}} is on!” example: “Winter Sale” BODY text: “Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.” example: “the end of August”, “45OFF”, “35%” FOOTER text: “Use the buttons below to manage your Urwallet subscriptions” BUTTONS Quick Reply Button text: “Unsubscribe Urwallet” URL Button text: “Go to link” url: “https://app.pingtochat.com“ Response { "success": true, "id": "xxxxxx", "name": "edit_z", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Parameter with header body without static button url and quick-replay, phone-number Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_aa", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Parameters name (string, required) – Unique identifier for the template (e.g., “edit_aa”). language (string, required) – Language code for the template (e.g., “en_US”). category (string, required) – Category of the template (e.g., “UTILITY”). allow_category_change (boolean, optional) – Whether the category can be changed (true/false). components (array, required) – List of structural components of the template. Components Breakdown HEADER type (string, required) – “HEADER” format (string, required) – “TEXT” text (string, required) – “Our pingtochat {{1}} is on!” BODY type (string, required) – “BODY” text (string, required) – “Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.” FOOTER type (string, required) – “FOOTER” text (string, required) – “Use the buttons below to manage your marketing subscriptions” BUTTONS type (string, required) – “BUTTONS” buttons (array, required) – Contains interactive buttons. QUICK_REPLY type (string, required) – “QUICK_REPLY” text (string, required) – “Unsubscribe from Promos” PHONE_NUMBER Button type (string, required) – “PHONE_NUMBER” text (string, required) – “Call” phone_number (string, required) – “91xxxxxxxxxx” Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Winter Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "45OFF", "35%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your Urwallet subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Components Breakdown HEADER – Text: “Our summer sale is on in Urwallet!” BODY – Text: “We are introducing our new product in Urwallet!” FOOTER – Text: “Thank you for choosing Urwallet!” BUTTONS Quick Reply Button – “Unsubscribe Urwallet!” URL Button – “Go to link” (Dynamic URL support with example values) Phone Number Button – “Call” (Calls a specified phone number) Response { "success": true, "id": "xxxxxx", "name": "edit_s", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Parameter with header body without static button url and quick-replay, phone-number and copy-code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_ab", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Components Header Text: "Our pingtochat {{1}} is on!" Example: "Summer Sale" Body Text: "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise." Example: {{1}}: "the end of August" {{2}}: "25OFF" {{3}}: "25%" Footer Text: "Use the buttons below to manage your marketing subscriptions" Buttons Quick Reply Button Text: "Unsubscribe from Promos" Phone Number Button Text: "Call" Phone Number: "919526986676" Copy Code Button Example Code: "WRETTT" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Winter Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "45OFF", "35%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your Urwallet subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Components Breakdown HEADER – Text: “Our summer sale is on in Urwallet!” BODY – Text: “We are introducing our new product in Urwallet!” FOOTER – Text: “Thank you for choosing Urwallet!” BUTTONS Quick Reply Button – “Unsubscribe Urwallet!” URL Button – “Go to link” (Dynamic URL support with example values) Phone Number Button – “Call” (Calls a specified phone number) Copy Code Button – Provides a predefined code for easy copying Response { "success": true, "id": "xxxxxx", "name": "edit_ab", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Parameter with header body dynamic button url to static url Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_ac", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" } ] } Parameters Name: edit_ac Language: en_US Category: UTILITY Allow Category Change: true Components Header Text: "Our pingtochat {{1}} is on!" Example: "Summer Sale" Body Text: "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise." Example: {{1}}: "the end of August" {{2}}: "25OFF" {{3}}: "25%" Footer Text: "Use the buttons below to manage your marketing subscriptions" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Winter Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "45OFF", "35%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your Urwallet subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] } ] } ] } Component Header Example: "Winter Sale" Body Example: {{1}}: "the end of August" {{2}}: "45OFF" {{3}}: "35%" Footer Text: "Use the buttons below to manage your Urwallet subscriptions" Buttons URL Button Text: "Go to link" URL: "https://developers.pingtochat.com/{{1}}" Example: "?docs=pingtochat/wp" Response { "success": true, "id": "xxxxxx", "name": "edit_s", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Parameter with header body without dynamic button url to static url and quick-replay Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_ad", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Components Header Text: "Our pingtochat {{1}} is on!" Example: "Summer Sale" Body Text: "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise." Example: {{1}}: "the end of August" {{2}}: "25OFF" {{3}}: "25%" Footer Text: "Use the buttons below to manage your marketing subscriptions" Buttons Quick Reply: "Unsubscribe from Promos" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Winter Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "45OFF", "35%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your Urwallet subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] } ] } ] } Components Breakdown Header Example: "Winter Sale" Body Example: {{1}}: "the end of August" {{2}}: "45OFF" {{3}}: "35%" Footer Text: "Use the buttons below to manage your Urwallet subscriptions" Buttons Quick Reply: "Unsubscribe from Promos" URL Button Text: "Go to link" URL: "https://developers.pingtochat.com/{{1}}" Example: "?docs=pingtochat/wp" Response { "success": true, "id": "xxxxxx", "name": "edit_ad", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Parameter with header body without dynamic button url to static url and quick-replay,phone-number Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_ae", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Components Header Text: "Our pingtochat {{1}} is on!" Example: "Summer Sale" Body Text: "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise." Example: {{1}}: "the end of August" {{2}}: "25OFF" {{3}}: "25%" Footer Text: "Use the buttons below to manage your marketing subscriptions" Buttons Quick Reply: "Unsubscribe from Promos" Phone Number: "Call" (Number: 91xxxxxxxxxx) Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Winter Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "45OFF", "35%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your Urwallet subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Components Breakdown Header Example: "Winter Sale" Body Example: {{1}}: "the end of August" {{2}}: "45OFF" {{3}}: "35%" Footer Text: "Use the buttons below to manage your Urwallet subscriptions" Buttons Quick Reply: "Unsubscribe from Promos" URL Button Text: "Go to link" URL: "https://developers.pingtochat.com/{{1}}" Example: "?docs=pingtochat/wp" Phone Number: "Call" (Number: 91xxxxxxxxxx) Response { "success": true, "id": "xxxxxx", "name": "edit_ae", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Parameter wit header body without dynamic button url to static url and quick-replay,phone-number and copy-code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_af", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Components Header Text: "Our pingtochat {{1}} is on!" Example: "Summer Sale" Body Text: "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise." Example: {{1}}: "the end of August" {{2}}: "25OFF" {{3}}: "25%" Footer Text: "Use the buttons below to manage your marketing subscriptions" Buttons Quick Reply: "Unsubscribe from Promos" Phone Number: "Call" (Number: 919526986676) Copy Code: "WRETTT" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Winter Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "45OFF", "35%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your Urwallet subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Components Header Text: "Our pingtochat {{1}} is on!" Example: "Summer Sale" Body Text: "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise." Example: {{1}}: "the end of August" {{2}}: "25OFF" {{3}}: "25%" Footer Text: "Use the buttons below to manage your marketing subscriptions" Buttons URL Button: Text: "Go to link" URL: "https://app.pingtochat.com" Response { "success": true, "id": "xxxxxx", "name": "edit_af", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. header-text to pdf Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_text_to_pdf", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: TEXT Text: "Our summer sale is on!" Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: MEDIA Format: PDF Example URL: https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "edit_s", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. header-text to image Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_text_to_img", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: TEXT Text: "Our summer sale is on!" Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png" } }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: MEDIA Format: Image Example URL: https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_text_to_img", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. header-text to video Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_text_to_video", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: TEXT Text: "Our summer sale is on!" Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://urwallet.pingtochat.com/template_media/1740161305.mp4" } }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: MEDIA Format: VIDEO Example URL: https://urwallet.pingtochat.com/template_media/1740161305.mp4 Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_text_to_video", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. header-pdf to text Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_pdf_to_text", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: MEDIA Format: PDF Example URL: https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: TEXT Text: "Our summer sale is on!" Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_pdf_to_text", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. header-image to text Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_image_to_text", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: MEDIA Format: IMAGE Example URL: https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: TEXT Text: "Our summer sale is on!" Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_image_to_text", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. header-video to text Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_video_to_text", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://urwallet.pingtochat.com/template_media/1740161305.mp4" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: MEDIA Format: VIDEO Example URL: https://urwallet.pingtochat.com/template_media/1740161305.mp4 Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: TEXT Text: "Our summer sale is on!" Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_video_to_text", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. header-pdf to image Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_pdf_to_image", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: MEDIA Format: PDF Example URL: https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png" } }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: MEDIA Format: IMAGE Example URL: https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_pdf_to_image", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. header-image to pdf Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_image_to_pdf", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: MEDIA Format: IMAGE Example URL: https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: MEDIA Format: PDF Example URL: https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_image_to_pdf", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. header-image to video Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_image_to_video_mar3", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: MEDIA Format: IMAGE Example URL: https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://urwallet.pingtochat.com/template_media/1740161305.mp4" } }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: MEDIA Format: VIDEO Example URL: https://urwallet.pingtochat.com/template_media/1740161305.mp4 Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_image_to_video", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with body Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_b", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are introducing our new product!" } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components(array, required) – List of components in the template. type (string, required) – Type of component (e.g., “BODY”). text (string, required) – The actual text content of the template. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "BODY", "text": "We are introducing our new product in Urwallet!" } ] } Parameters template_id (string, required) – The ID of the template to be updated. components(array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “BODY”). text (string, required) – The updated text content of the template. Response { "success": true, "id": "xxxxxx", "name": "edit_b", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_c", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components(array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required) – The actual text content of the template. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" } ] } Parameters template_id (string, required) – The ID of the template to be updated. components(array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required) – The updated text content of the template. Response { "success": true, "id": "xxxxxx", "name": "edit_c", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_d", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components(array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required) – The actual text content of the template. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Parameters template_id (string, required) – The ID of the template to be updated. components(array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required) – The updated text content of the template. Response { "success": true, "id": "xxxxxx", "name": "edit_b", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer button quick-replay Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_ee", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components(array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required for HEADER, BODY, FOOTER) – The actual text content of the component. buttons(array, optional) – List of buttons in the BUTTONS component. type (string, required) – Type of button (e.g., “QUICK_REPLY”). text (string, required) – The button label. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe" } ] } ] } Parameters template_id (string, required) – The ID of the template to be updated. components(array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required for HEADER, BODY, FOOTER) – The updated text content of the component. buttons(array, optional) – Updated list of buttons in the BUTTONS component. type (string, required) – Type of button (e.g., “QUICK_REPLY”). text (string, required) – The button label. Response { "success": true, "id": "xxxxxx", "name": "edit_b", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer button quick-replay and visit-website Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_f", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://urwallet.pingtochat.com" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components(array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required for HEADER, BODY, FOOTER) – The actual text content of the component. buttons(array, optional) – List of buttons in the BUTTONS component. type (string, required) – Type of button (e.g., “QUICK_REPLY”, “url”). text (string, required) – The button label. url (string, required for url button) – The link to redirect users. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe promo" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Parameters template_id (string, required) – The ID of the template to be updated. components(array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required for HEADER, BODY, FOOTER) – The updated text content of the component. buttons(array, optional) – Updated list of buttons in the BUTTONS component. type (string, required) – Type of button (e.g., “QUICK_REPLY”, “url”). text (string, required) – The button label. url (string, required for url button) – The link to redirect users. Response { "success": true, "id": "xxxxxx", "name": "edit_b", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer button quick-replay and visit-website and phone-number Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_g", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://urwallet.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components(array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required for HEADER, BODY, FOOTER) – The actual text content of the component. buttons(array, optional) – List of buttons in the BUTTONS component. type (string, required) – Type of button (e.g., “QUICK_REPLY”, “url”, “PHONE_NUMBER”). text (string, required) – The button label. url (string, required for url button) – The link to redirect users. phone_number (string, required for PHONE_NUMBER button) – The phone number for calling action. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe promo" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "911234567890" } ] } ] } Parameters template_id (string, required) – The ID of the template to be updated. components(array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required for HEADER, BODY, FOOTER) – The updated text content of the component. buttons(array, optional) – Updated list of buttons in the BUTTONS component. type (string, required) – Type of button (e.g., “QUICK_REPLY”, “url”, “PHONE_NUMBER”, “copy_code”). text (string, required) – The button label. url (string, required for url button) – The link to redirect users. phone_number (string, required for PHONE_NUMBER button) – The phone number for calling action. example (string, required for copy_code button) – Example code for the copy action. Response { "success": true, "id": "xxxxxx", "name": "edit_b", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer button quick-replay,visit-website, phone-number and copy-code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_h", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). text (string, required) – The actual text content of the template. buttons (array, optional) – List of buttons in the template. url (string, optional) – URL for “url” type buttons. phone_number (string, optional) – Phone number for “PHONE_NUMBER” type buttons. example (string, optional) – Example code for “copy_code” type buttons. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe promo" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "911234567890" }, { "type": "copy_code", "example": "ABCD" } ] } ] } Parameters template_id (string, required) – The ID of the template to be updated. components (array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). text (string, required) – The updated text content of the template. buttons (array, optional) – Updated list of buttons in the template. url (string, optional) – Updated URL for “url” type buttons. phone_number (string, optional) – Updated phone number for “PHONE_NUMBER” type buttons. example (string, optional) – Updated example code for “copy_code” type buttons. Response { "success": true, "id": "xxxxxx", "name": "edit_b", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer static without url button Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_i", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”). format (string, optional) – Format of the component, required for “HEADER” type. text (string, required) – The actual text content of the template. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type":"BUTTONS", "buttons": [ { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Parameters template_id (string, required) – The ID of the template to be updated. components (array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format of the component, required for “HEADER” type. text (string, required) – The updated text content of the template. buttons (array, optional) – List of buttons for “BUTTONS” type. type (string, required) – Type of button (e.g., “url”). text (string, required) – Button label. url (string, optional) – URL for “url” type buttons. Response { "success": true, "id": "xxxxxx", "name": "edit_b", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer static without url button and with quick-replay Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_j", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “BODY”). text (string, required) – The actual text content of the template. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Parameters template_id (string, required) – The ID of the template to be updated. components (array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “BODY”). text (string, required) – The updated text content of the template. Response { "success": true, "id": "xxxxxx", "name": "edit_j", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer static without url button and with quick-replay,phone-number Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_k", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Parameters name (string, required): The name of the template. language (string, required): Language code of the template (e.g., “en_US”). category (string, required): The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional): Determines whether the category can be changed. components (array, required): List of components in the template. type (string, required): Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional): Format of the header (e.g., “TEXT”). text (string, required): The actual text content of the template. buttons (array, optional): List of buttons if applicable. type (string, required): Type of button (e.g., “QUICK_REPLY”, “PHONE_NUMBER”). text (string, required): Button text. phone_number (string, optional): Phone number for “PHONE_NUMBER” button type. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxxx" } ] } ] } Parameters template_id (string, required): The ID of the template to be updated. components (array, required): Updated list of components in the template. type (string, required): Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional): Format of the header (e.g., “TEXT”). text (string, required): The updated text content of the template. buttons (array, optional): Updated list of buttons if applicable. type (string, required): Type of button (e.g., “QUICK_REPLY”, “PHONE_NUMBER”, “url”). text (string, required): Button text. url (string, optional): URL for “url” button type. phone_number (string, optional): Phone number for “PHONE_NUMBER” button type. Response { "success": true, "id": "xxxxxx", "name": "edit_k", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer static without url button and with quick-replay,phone-number,copy-code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_l", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format of the component if applicable (e.g., “TEXT”). text (string, required) – The actual text content of the template. buttons (array, optional) – List of buttons included in the template. type (string, required) – Type of button (e.g., “QUICK_REPLY”, “PHONE_NUMBER”, “copy_code”). text (string, required) – The display text of the button. phone_number (string, optional) – The phone number associated with a “PHONE_NUMBER” button. example (string, optional) – Example code for “copy_code” button Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "abcd" } ] } ] } Parameters template_id (string, required) – The ID of the template to be updated. components (array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format of the component if applicable (e.g., “TEXT”). text (string, required) – The updated text content of the template. buttons (array, optional) – List of updated buttons. type (string, required) – Type of button (e.g., “QUICK_REPLY”, “url”, “PHONE_NUMBER”, “copy_code”). text (string, required) – The display text of the button. url (string, optional) – The URL associated with a “url” button. phone_number (string, optional) – The phone number for a “PHONE_NUMBER” button. example (string, optional) – Example code for “copy_code” button. Response { "success": true, "id": "xxxxxx", "name": "edit_l", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer dynamic without url button Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_n", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Parameters HEADER: “Our summer sale is on!” BODY: “Shop now and use code CR7000 to get more offers” FOOTER: “Thank you for choosing us!” BUTTONS: Quick Reply: “Unsubscribe from Promos” Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] } ] } ] } Parameters HEADER: “Our summer sale is on in Urwallet!” BODY: “We are introducing our new product in Urwallet!” FOOTER: “Thank you for choosing Urwallet!” BUTTONS: Quick Reply: “Unsubscribe Urwallet” URL Button: “Go to link” (redirects to https://developers.pingtochat.com/{{1}} with example parameter ?docs=pingtochat/wp) Response { "success": true, "id": "xxxxxx", "name": "edit_n", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer edit without url button and with quick-replay,phone-number Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_o", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Parameters HEADER: “Our summer sale is on!” BODY: “Shop now and use code CR7000 to get more offers” FOOTER: “Thank you for choosing us!” BUTTONS: Quick Reply: “Unsubscribe from Promos” Phone Call Button: “Call” (Dialing 91xxxxxxxxxx) Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “BODY”). text (string, required) – The actual text content of the template. buttons (array, optional) – List of interactive buttons. type (string, required) – Type of button (e.g., “QUICK_REPLY”, “PHONE_NUMBER”). text (string, required) – Button label text. phone_number (string, optional) – Required if button type is “PHONE_NUMBER” (e.g., “91xxxxxxxxxx”). Response { "success": true, "id": "xxxxxx", "name": "edit_o", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer dynamic without url button and with quick-replay,phone-number,copy-code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_p", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “BODY”). text (string, required) – The actual text content of the template. buttons (array, optional) – List of interactive buttons. QUICK_REPLY (string, optional) – Quick reply button text. PHONE_NUMBER (string, optional) – Phone number button, including text (label) and phone_number (number to call). copy_code (string, optional) – Provides an example code that users can copy. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "abcd" } ] } ] } Parameters HEADER (object, required) – The header component, including: format (string, required) – Format of the header (e.g., “TEXT”). text (string, required) – Header content. BODY (object, required) – The body content. text (string, required) – The actual text content of the body. FOOTER (object, required) – The footer component. text (string, required) – Footer content. BUTTONS (array, required) – List of buttons in the template. QUICK_REPLY (string, optional) – Quick reply button text. url (object, optional) – A button that redirects users to a link. text (string, required) – The button label. url (string, required) – The URL for the button. example (array, optional) – Example URL parameters. PHONE_NUMBER (object, optional) – Phone button details. text (string, required) – The button label. phone_number (string, required) – The phone number. copy_code (object, optional) – Provides a code that users can copy. example (string, required) – Example code value. Response { "success": true, "id": "xxxxxx", "name": "edit_p", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer static with url button Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_q", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format of the header text (e.g., “TEXT”). text (string, required) – The actual text content of the component. buttons (array, required) – List of buttons used in the template. type (string, required) – Type of button (e.g., “url”). text (string, required) – Text displayed on the button. url (string, required for “url” buttons) – URL linked to the button. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type":"BUTTONS", "buttons": [ { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] } ] } ] } Parameters components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format of the header text (e.g., “TEXT”). text (string, required) – The actual text content of the component. buttons (array, required) – List of buttons used in the template. type (string, required) – Type of button (e.g., “url”). text (string, required) – Text displayed on the button. url (string, required for “url” buttons) – URL linked to the button. example (array, optional) – Example query parameters that can be appended to the URL. Response { "success": true, "id": "xxxxxx", "name": "edit_q", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer static with url button and with quick-replay Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_r", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Parameters name (string, required) – The unique name identifier for the template (“edit_r”). language (string, required) – The language code for the template (“en_US”). category (string, required) – The category of the template (“MARKETING”). allow_category_change (boolean, optional) – Whether the category can be changed (true). components (array, required) – The structural components of the template. Components Details HEADER type (string, required) – “HEADER” format (string, required) – “TEXT” text (string, required) – “Our summer sale is on!” BODY type (string, required) – “BODY” text (string, required) – “Shop now and use code CR7000 to get more offers” FOOTER type (string, required) – “FOOTER” text (string, required) – “Thank you for choosing us!” BUTTONS type (string, required) – “BUTTONS” buttons (array, required) – Contains interactive buttons. QUICK_REPLY type (string, required) – “QUICK_REPLY” text (string, required) – “Unsubscribe from Promos” URL Button type (string, required) – “url” text (string, required) – “Go to link” url (string, required) – “https://app.pingtochat.com“ Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet!" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] } ] } ] } Parameters name (string, required) – The unique name identifier for the template (“edit_r”). language (string, required) – The language code for the template (“en_US”). category (string, required) – The category of the template (“MARKETING”). allow_category_change (boolean, optional) – Whether the category can be changed (true). components (array, required) – The structural components of the template. Components Details HEADER type (string, required) – “HEADER” format (string, required) – “TEXT” text (string, required) – “Our summer sale is on!” BODY type (string, required) – “BODY” text (string, required) – “Shop now and use code CR7000 to get more offers” FOOTER type (string, required) – “FOOTER” text (string, required) – “Thank you for choosing us!” BUTTONS type (string, required) – “BUTTONS” buttons (array, required) – Contains interactive buttons. QUICK_REPLY type (string, required) – “QUICK_REPLY” text (string, required) – “Unsubscribe from Promos” URL Button type (string, required) – “url” text (string, required) – “Go to link” url (string, required) – “https://app.pingtochat.com“ Response { "success": true, "id": "xxxxxx", "name": "edit_r", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer static with url button and with quick-replay,phone-number Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_s", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Parameters name (string, required) – The unique name identifier for the template (“edit_s”). language (string, required) – The language code for the template (“en_US”). category (string, required) – The category of the template (“MARKETING”). allow_category_change (boolean, optional) – Whether the category can be changed (true). components (array, required) – The structural components of the template. Components Breakdown HEADER type (string, required) – “HEADER” format (string, required) – “TEXT” text (string, required) – “Our summer sale is on!” BODY type (string, required) – “BODY” text (string, required) – “Shop now and use code CR7000 to get more offers” FOOTER type (string, required) – “FOOTER” text (string, required) – “Thank you for choosing us!” BUTTONS type (string, required) – “BUTTONS” buttons (array, required) – Contains interactive buttons. QUICK_REPLY type (string, required) – “QUICK_REPLY” text (string, required) – “Unsubscribe from Promos” URL Button type (string, required) – “url” text (string, required) – “Go to link” url (string, required) – “https://app.pingtochat.com“ Phone Number Button type (string, required) – “PHONE_NUMBER” text (string, required) – “Call” phone_number (string, required) – “91xxxxxxxxxx” Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet!" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "911234567890" }, { "type": "copy_code", "example": "12345" } ] } ] } Components Breakdown HEADER – Text: “Our summer sale is on in Urwallet!” BODY – Text: “We are introducing our new product in Urwallet!” FOOTER – Text: “Thank you for choosing Urwallet!” BUTTONS Quick Reply Button – “Unsubscribe Urwallet!” URL Button – “Go to link” (Dynamic URL support with example values) Phone Number Button – “Call” (Calls a specified phone number) Copy Code Button – Provides a predefined code for easy copying Response { "success": true, "id": "xxxxxx", "name": "edit_s", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer static with url to dynamic url button and with quick-replay,phone-number,copy-code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_t", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Parameters name (string, required) – The unique name identifier for the template (“edit_s”). language (string, required) – The language code for the template (“en_US”). category (string, required) – The category of the template (“MARKETING”). allow_category_change (boolean, optional) – Whether the category can be changed (true). components (array, required) – The structural components of the template. Components Breakdown HEADER type (string, required) – “HEADER” format (string, required) – “TEXT” text (string, required) – “Our summer sale is on!” BODY type (string, required) – “BODY” text (string, required) – “Shop now and use code CR7000 to get more offers” FOOTER type (string, required) – “FOOTER” text (string, required) – “Thank you for choosing us!” BUTTONS type (string, required) – “BUTTONS” buttons (array, required) – Contains interactive buttons. QUICK_REPLY type (string, required) – “QUICK_REPLY” text (string, required) – “Unsubscribe from Promos” URL Button type (string, required) – “url” text (string, required) – “Go to link” url (string, required) – “https://app.pingtochat.com“ Phone Number Button type (string, required) – “PHONE_NUMBER” text (string, required) – “Call” phone_number (string, required) – “91xxxxxxxxxx” Copy code Button type (string, required) – “COPY CODE” text (string, required) – “copy code” copy_code (string, required) – “wrett” Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet!" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "911234567890" } ] } ] } Components Breakdown HEADER – Text: “Our summer sale is on in Urwallet!” BODY – Text: “We are introducing our new product in Urwallet!” FOOTER – Text: “Thank you for choosing Urwallet!” BUTTONS Quick Reply Button – “Unsubscribe Urwallet!” URL Button – “Go to link” (Dynamic URL support with example values) Phone Number Button – “Call” (Calls a specified phone number) Copy Code Button – Provides a predefined code for easy copying Response { "success": true, "id": "xxxxxx", "name": "edit_s", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer dynamic url to static url Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_u", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] } ] } ] } Components Breakdown HEADER Type: “HEADER” Format: “TEXT” Text: “Our summer sale is on!” BODY Type: “BODY” Text: “Shop now and use code CR7000 to get more offers” FOOTER Type: “FOOTER” Text: “Thank you for choosing us!” BUTTONS Type: “BUTTONS” Buttons: URL Button: “Go to link” (URL: “https://developers.pingtochat.com/{{1}}“, Example: “?docs=pingtochat/wp”) Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Components Breakdown HEADER – Text: “Our summer sale is on in Urwallet!” BODY – Text: “We are introducing our new product in Urwallet!” FOOTER – Text: “Thank you for choosing Urwallet!” BUTTONS URL Button – “Go to link” (URL: “https://app.pingtochat.com“) Response { "success": true, "id": "xxxxxx", "name": "edit_s", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer dynamic url to static button quick-replay,phone-number,copy-code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_x", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Components Breakdown HEADER Type: “HEADER” Format: “TEXT” Text: “Our summer sale is on!” BODY Type: “BODY” Text: “Shop now and use code CR7000 to get more offers” FOOTER Type: “FOOTER” Text: “Thank you for choosing us!” BUTTONS Quick Reply Button: “Unsubscribe from Promos” URL Button: “Go to link” (URL: “https://developers.pingtochat.com/{{1}}“, Example: “?docs=pingtochat/wp”) Phone Number Button: “Call” (Phone Number: “91xxxxxxxxxx”) Copy Code Button: “WRETTT” Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "911234567890" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Components Breakdown HEADER – Text: “Our summer sale is on in Urwallet!” BODY – Text: “We are introducing our new product in Urwallet!” FOOTER – Text: “Thank you for choosing Urwallet!” BUTTONS Quick Reply Button – “Unsubscribe Urwallet” URL Button – “Go to link” (URL: “https://app.pingtochat.com“) Phone Number Button – “Call” (Phone Number: “911234567890”) Copy Code Button – “WRETTT” Response { "success": true, "id": "xxxxxx", "name": "edit_x", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Parameter with header body without static button url Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_y", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" } ] } Parameters name (string, required) – Unique identifier for the template (e.g., “edit_y”). language (string, required) – Language code for the template (e.g., “en_US”). category (string, required) – Category of the template (e.g., “UTILITY”). allow_category_change (boolean, optional) – Whether the category can be changed (true/false). components (array, required) – List of structural components of the template. Components Breakdown HEADER type (string, required) – “HEADER” format (string, required) – “TEXT” text (string, required) – “Our pingtochat {{1}} is on!” example (object, optional) – Example values for the header text. BODY type (string, required) – “BODY” text (string, required) – “Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.” example (object, optional) – Example values for the body text. FOOTER type (string, required) – “FOOTER” text (string, required) – “Use the buttons below to manage your marketing subscriptions.” Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Components Breakdown HEADER text: “Our pingtochat {{1}} is on!” example: Example header text values. BODY text: “Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.” example: Example body text values. FOOTER text: “Use the buttons below to manage your marketing subscriptions.” BUTTONS URL Button text: “Go to link” url: “https://app.pingtochat.com“ Response { "success": true, "id": "xxxxxx", "name": "edit_y", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Edit Authentication Template API Zero-Tap to Auto-Fill Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "zero_tap_chat", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "zero_tap", "text": "Copy Code", "autofill_text": "Autofill", "zero_tap_terms_accepted": true, "supported_apps": [ { "package_name": "app.pingtochat.com", "signature_hash": "K8a/AINcGX7" } ] } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: zero_tap Text: Copy Code Autofill Text: Autofill Zero Tap Terms Accepted: true Supported Apps: Package Name: app.pingtochat.com Signature Hash: K8a/AINcGX7 Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "AUTHENTICATION" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 10 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "one_tap", "text": "Copy Code", "autofill_text": "Autofill", "package_name": "com.example.luckyshrub", "signature_hash": "K8a/AINcGX7" } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 10 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: one_tap Text: Copy Code Autofill Text: Autofill Package Name: com.example.luckyshrub Signature Hash: K8a/AINcGX7 Success Response { "success": true, "id": "xxxxxx", "name": "edit_s", "category": "AUTHENTICATION" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Zero-Tap to Copy-Code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "zero_tap_chat", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "zero_tap", "text": "Copy Code", "autofill_text": "Autofill", "zero_tap_terms_accepted": true, "supported_apps": [ { "package_name": "app.pingtochat.com", "signature_hash": "K8a/AINcGX7" } ] } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: zero_tap Text: Copy Code Autofill Text: Autofill Zero Tap Terms Accepted: true Supported Apps: Package Name: app.pingtochat.com Signature Hash: K8a/AINcGX7 Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "copy_code", "text": "Copy Code" } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: copy_code Text: Copy Code Success Response Status Code: 201 APPROVED { "success": true, "id": "xxxxxx", "name": "zero_tap_chat", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Auto-Fill to Zero-Tap Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "autofill_to_zero_tab", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 10 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "one_tap", "text": "Copy Code", "autofill_text": "Autofill", "package_name": "app.pingtochat.com", "signature_hash": "K8a/AINcGX7" } ] } ] } Components Body: Includes security recommendations for authentication messages. Footer: Specifies the OTP code expiration time (5 minutes). Buttons: OTP Type: zero_tap Button Text: “Copy Code” Autofill Text: “Autofill” Zero Tap Terms Accepted: true Supported Apps: Defines package names and signature hashes for authentication. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "zero_tap", "text": "Copy Code", "autofill_text": "Autofill", "zero_tap_terms_accepted": true, "supported_apps": [ { "package_name": "com.example.luckyshrub", "signature_hash": "K8a/AINcGX7" } ] } ] } ] } Components Body: Includes security recommendations. Footer: OTP code expiration time (10 minutes for one-tap, 5 minutes for zero-tap). Buttons: One Tap Option: Provides a copy code button with autofill capability. Zero Tap Option: Supports direct authentication without manual entry. Success Response { "success": true, "id": "xxxxxx", "name": "autofill_to_zero_tab", "category": "marketing" } Notes Ensure that {{your_domain}}, {{phone_number_id}}, and {{key}} are correctly replaced with actual values. The zero_tap_terms_accepted field must be set to true for Zero Tap authentication. The supported applications must match the package name and signature hash used for authentication. This setup enables secure and seamless authentication experiences for users. Auto-Fill to Copy-Code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "autofill_to_copy_code", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 10 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "one_tap", "text": "Copy Code", "autofill_text": "Autofill", "package_name": "app.pingtochat.com", "signature_hash": "K8a/AINcGX7" } ] } ] } Components Body: Includes security recommendations for authentication messages. Footer: Specifies the OTP code expiration time (5 minutes). Buttons: OTP Type: zero_tap Button Text: “Copy Code” Autofill Text: “Autofill” Zero Tap Terms Accepted: true Supported Apps: Defines package names and signature hashes for authentication. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "copy_code", "text": "Copy Code" } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: copy_code Text: Copy Code Success Response Status Code: 201 APPROVED { "success": true, "id": "xxxxxx", "name": "autofill_to_copy_code", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Copy-Code to Zero-Tap Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "copy_code_to_zero_tap", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "copy_code", "text": "Copy Code" } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: copy_code Text: Copy Code Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "zero_tap", "text": "Copy Code", "autofill_text": "Autofill", "zero_tap_terms_accepted": true, "supported_apps": [ { "package_name": "com.example.luckyshrub", "signature_hash": "K8a/AINcGX7" } ] } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: zero_tap Text: Copy Code Autofill Text: Autofill Zero Tap Terms Accepted: true Supported Apps: Package Name: app.pingtochat.com Signature Hash: K8a/AINcGX7 Response { "success": true, "id": "xxxxxx", "name": "copy_code_to_zero_tap", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Copy-Code to Auto-Fill Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "copy_code_to_auto_fill", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "copy_code", "text": "Copy Code" } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: copy_code Text: Copy Code Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 10 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "one_tap", "text": "Copy Code", "autofill_text": "Autofill", "package_name": "com.example.luckyshrub", "signature_hash": "K8a/AINcGX7" } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: zero_tap Text: Copy Code Autofill Text: Autofill Zero Tap Terms Accepted: true Supported Apps: Package Name: app.pingtochat.com Signature Hash: K8a/AINcGX7 Response { "success": true, "id": "xxxxxx", "name": "copy_code_to_auto_fill", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Template Library Utility Finalize account set-up Hi John, Your new account has been created successfully. Please verify your email address to complete your profile. 🔗 Verify account Upcoming automatic payment Hi John, Your automatic payment for CS Mutual Checking is scheduled on Jan 1, 2024 for $12.34. Kindly ensure your balance is sufficient to avoid late fees. 🔗 View account Upcoming automatic payment Hi John, this is to remind you of your upcoming auto-pay: Date: Jan 1, 2024 Account: Market Credit Plus Amount: $12.34 Thank you and have a nice day. 🔗 View details Payment Reminder Reminder: Your scheduled payment for your CS Mutual Credit Plus card ending in 1234 is scheduled for Mar 22, 2024. Thank you. Order Delivered John, your order was successfully delivered! You can track your package and manage your order below. 🔗 Manage order Order Delivered John, great news! Your order #12345 was delivered. Need to return or replace an item? Click to manage your order. 🔗 Manage Order Order Delivered John, your order was successfully delivered! You can track your package and manage your order below. 🔗 Manage order Order Delivered John, great news! Your order #12345 was delivered. Need to return or replace an item? Click to manage your order. 🔗 Manage Order Order Delivered John, your order #12345 was delivered on Jan 1, 2024. If you need to return or replace item(s), please click below. 📌 Start Return Could Not Deliver Your Order Hi John, We attempted to deliver your order on Jan 1, 2024 but were not successful. Please contact us at 1800-555-1234 to arrange re-delivery. Thank you. 🚚 Manage Delivery 📞 Call Us We Were Unable to Deliver Your Order We were unable to deliver order #12345 today. Please try a redelivery to schedule another delivery attempt. 📦 Schedule Delivery We Were Unable to Deliver Your Order We were unable to deliver order #12345 today. Please try a redelivery to schedule another delivery attempt. 📦 Reschedule Your Order is On Its Way John, your order #12345 is on its way and should arrive soon. Estimated delivery is between 1pm and 4pm. We will provide an update when your order is delivered. An adult must be home to accept this package. 📦 Track Order Your Order is Out for Delivery! John, your order #12345 is out for delivery! It should be delivered at your doorstep between 1pm and 4pm. We hope you enjoy your item(s)! 📦 Track Order Out for Delivery Your order #12345 is out for delivery! It should arrive by Jan 1, 2024. Thank you for your business. 📦 Track Order You have an upcoming event Reminder: You RSVP’ed to John’s 30th birthday party by John and Jane. The event starts on January 1 at 7 pm at 123 Baker Street, Palo Alto, CA 91041. Reminder: John’s 30th birthday party is coming up and you have RSVP’ed yes. See you at 7 pm at Party Place. Thank you for RSVP’ing to John’s 30th birthday party by John and Jane. See you on January 1st at 7 pm! Your RSVP for John’s 30th birthday party by John and Jane is confirmed! Thanks! Reminder: John and Jane invited you to John’s 30th birthday party taking place on January 1st at 7 pm. Click below to RSVP. 🔗 RSVP Reminder: You’ve been invited to John’s 30th birthday party by John and Jane. Click below to RSVP. 🔗 RSVP Hi John, Thank you for your recent visit with us. We value your feedback and would appreciate you sharing more about your experience with us at the link below. This should only take 5 minutes. We appreciate your time. 🔗 Leave a Feedback How did we do? Thank you for visiting us at Jasper’s Market, 123 Baker street. Palo Alto CA, 91041 on Jan 1, 2024. We value your feedback. Please fill out this short survey to let us know how we can continue to improve. 🔗 Fill out survey How did we do? At Jasper’s Market, we value customer feedback and use it to continually improve our products. Please fill out a short survey, linked below, to let us know more about your recent purchase with us. Thank you in advance. 🔗 Provide feedback Rate your experience Your feedback is important to us. Please take a quick survey about your recent flight booking experience. 🔗 Take survey At Jasper’s Market, we value customer feedback and use it to continually improve our products. Please fill out a short survey, linked below, to let us know more about your recent purchase with us. Thank you in advance. 🔗 Take survey Hi John, We noticed a suspicious transaction on your CS Mutual debit card from Jasper’s Market for $12.34. If you didn’t make this transaction, please call us immediately at 1800-555-1234. You can also click below to freeze your card. Thank you! 📞 Call Us 🔗 Freeze card Hi John, This is CS Mutual. We identified a suspicious transaction on your CS Mutual debit card ending in 1234: Date: Jan 1, 2024 Merchant: Jasper’s Amount: $12.34 Did you make this purchase? ↩ Yes ↩ No Hi John, We noticed a suspicious charge on your credit card account. Please verify the details of this transaction. 🔗 Verify Transaction Suspicious transaction Hi John, We detected a suspicious transaction on your CS Mutual debit account card ending in 1234. Please verify if this was you. 🔗 Verify Transaction Low account balance Hi John, This is to notify you that your available funds in your CS Mutual checking plus account ending in 1234 is below your pre-set limit of $50.00. Click below to add funds or call us. 🔗 Make a deposit 📞 Call Us Hi John, Available funds in your CS Mutual checking plus account ending in 1234 are below your pre-set $50.00 limit. 🔗 Make a deposit 📞 Call Us John, before we can process your order #12345, we need to verify some information. Please contact us at your earliest convenience. Thank you. 📞 Call Us We were unable to process your order #12345. Please call us at 1800-555-1234 for next steps. 📞 Call Us Order canceled John, your order #12345 has been successfully canceled. Your refund will be processed in 7 business days. Thank you. 🔗 View order details John, per your request, we have canceled your order #12345. Your refund will be processed in 7 business days. You can track this below. 🔗 View order details Hi, this is to confirm we have successfully canceled your recent order #559032. Thank you. 🔗 View order details John, there is a delay in delivering your order #12345. We’re working to resolve it as soon as possible. We will follow up with an update. We apologize for any inconvenience. We’ll send you an updated delivery status when we can. 🔗 Track my order 🔗 View order details Item(s) out-of-stock Hi John, Item(s) from your recent order #12345 are out-of-stock. We will notify you as soon as your item(s) ship. If you prefer not to wait, please click below to cancel your order. We apologize for any inconvenience. 🔗 Manage Order Order confirmed Hi John, Thank you for your purchase! Your order number is #12345. We’ll start getting 2 12-pack of Jasper’s paper towels ready to ship. Estimated delivery: Jan 1, 2024 We will let you know when your order ships. 🔗 View order details Order confirmed John, your order is confirmed and your order number is #12345. Estimated delivery: Jan 1, 2024. We will follow up with more details as we prepare your order for shipment. 🔗 View order details Order confirmed John, we’ve received your order. Your order number is #12345. Click below to manage your order. 🔗 Manage Order Order confirmed Hi Pavan, Your order has been successfully placed and is being processed. Your order number is #12345. 🔗 View Order Ready for pick up! John, your order #12345 is ready for pick up at Jasper’s Market, 1234 Baker street. Palo Alto, CA 94301. Message us when you arrive and we will bring your order out to you. See you soon! 🔗 I’ve arrived Great news! Your order #12345 is now ready for pick up at Jasper’s Market, 1234 Baker street. Palo Alto, CA 94301. Click “I’m here” when you arrive and we will meet you with your products. See you soon! 🔗 I’m here Verify your payment info Hi John, Payment for your CS Mutual card card ending in 1234 is coming due. Verify your information to avoid overdue fees. Please ignore this message if you’ve already paid. 🔗 Verify Review a recent transaction Hi John, We encountered an issue with your recent transaction for $12.34 at Jasper’s Market. Please contact us at 1-800-555-1234 for assistance. 📞 Call us Could not process payment Your scheduled payment of $12.34 for CS Mutual debit plus could not be processed. Please contact us at 1-800-555-1234 for assistance. 📞 Call us Hi John, We have received your payment of $12.34 for CS Mutual debit card. Thank you for your payment. 🔗 View payment details Successful payment Your payment of $12.34 for CS Mutual credit card has been processed successfully. We appreciate your business. 🔗 View details Payment confirmation: Account: CS Mutual credit card Amount: $12.34 Date: Jan 1, 2024 Thank you and have a nice day. 🔗 View details Hi John, your recent payment of $12.34 for your CS Mutual Credit plus card account has failed. Please check your account and try again. 🔗 View Account Hi John, We were unable to process your payment of $12.34 for CS Mutual Credit plus card. Please update your payment method or contact us for assistance. 🔗 View Account 📞 Call Us Your payment was rejected. Account: CS Mutual debit plus Amount: $12.34 Date: Jan 1, 2024 Please check your account and try again. 🔗 View Account Your payment for $12.34 will be processed on Jan 1, 2024. Thank you! 🔗 View Account Thank you for scheduling your payment of $12.34. We will charge your card on Jan 1, 2024. 🔗 View Account This is to confirm your payment of $12.34 for your card will be processed on Jan 1, 2024. 🔗 View Account Payment overdue Your credit card payment of $12.34 is overdue by 3 days. Please pay now to avoid avoid late fees. Contact us if you need assistance. 🔗 Pay Now 📞 Contact Us Hi John, you have a payment overdue: Account: CS Mutual card Amount due: $12.34 Due date: Jan 1, 2024 Pay now to complete payment via our website. Please ignore this message if you’ve already paid. 🔗 Pay Now Payment is overdue for your CS Mutual card card ending in 1234 for $12.34. Please click to pay now and avoid late fees. 🔗 Pay Now Payment is overdue for your CS Mutual card card ending in 1234. Please click to pay now and avoid late fees. 🔗 Review and Pay {{Product name}} Quantity {{#}} Total ₹{{#}} Hi John, you have a payment overdue: Account: CS Mutual card Due date: Jan 1, 2024 Pay now to complete payment via our website. Please ignore this message if you’ve already paid. 🔗 Review and Pay {{Product name}} Quantity {{#}} Total ₹{{#}} Payment overdue Your credit card payment is overdue by 3 days. Please pay now to avoid late fees. Contact us if you need assistance. 🔗 Review and Pay Payment due soon Hello John, Your payment of $12.34 is due on Jan 1, 2024. Please ignore this message if you’ve already paid. 🔗 Pay Now Your payment of $12.34 is due on Jan 1, 2024. Pay now to avoid late fees. If you already paid, please ignore this message. 🔗 Pay Now Payment due Payment reminder: Account: CS Mutual card XXX-1234 Amount due: $12.34 Due date: Jan 1, 2024 Pay now to avoid late fees. Please ignore this if you have already paid. 🔗 Pay Now Payment of $12.34 due Hi John, Payment of $12.34 for your CS Mutual debit plus card ending in 1234 is due on Jan 1, 2024. Pay now to avoid late fees. Please ignore this if you have already paid. 🔗 Pay Now ORDER #{{Order number}} {{Product name}} Quantity {{#}} Total ₹{{#}} Payment due Hi John, Payment for your CS Mutual debit plus card ending in 1234 is due on Jan 1, 2024. Pay now to avoid late fees. Please ignore this message if you’ve already paid. 🔗 Review and Pay ORDER #{{Order number}} {{Product name}} Quantity {{#}} Total ₹{{#}} Payment due Payment reminder: Account: CS Mutual card XXX-1234 Due date: Jan 1, 2024 Pay now to avoid late fees. Please ignore this message if you’ve already paid. 🔗 Review and Pay ORDER #{{Order number}} {{Product name}} Quantity {{#}} Total ₹{{#}} Your payment is due on Jan 1, 2024. Pay now to avoid late fees. If you’ve already paid, please ignore this message. 🔗 Review and Pay ORDER #{{Order number}} {{Product name}} Quantity {{#}} Total ₹{{#}} Payment due soon Your payment is due on Jan 1, 2024. Please ignore this message if you’ve already paid. 🔗 Review and Pay Your payment of $12.34 for your CS Mutual Credit Plus account is scheduled for Jan 1, 2024. Please ensure you have sufficient funds to avoid generating any late fees. 🔗 Manage payment Upcoming scheduled payment Hi John, Thank you for scheduling your payment of $12.34 for your CS Mutual debit plus account on Jan 1, 2024. Please visit your account if you would like to make any changes ahead of this date. 🔗 Manage payment Hi John, this is to remind you of your upcoming scheduled payment: Date: Jan 1, 2024 Account: CS Mutual debit plus Amount: $12.34 Thank you and have a nice day. 🔗 Manage payment 📄 Thank you for your purchase of $12.34 from Jasper’s Market, 123 Baker street. Palo Alto CA, 91041. Your receipt PDF is attached. 📄 Thank you for using your credit card at CS Mutual. Your receipt is attached as a PDF. This message is to confirm your purchase for $12.34 from CS Mutual on Jan 1, 2024. You were refunded for $25 Hi John, Your refund for $25 has been processed for order #12345. You’ll be credited back to your original payment method in 3-5 business days. John, thank you for returning product(s) from your order #12345. We are currently processing your return and will notify you of your refund status. 🔗 Manage Order Return received We have received item(s) from your order #12345. Your return is complete, and we have processed your refund for $12.34. Thank you for your business. 🔗 Manage order Order shipped John, your order has shipped! Your tracking number is ZK12345KI999. Estimated delivery is Jan 1, 2024. We will continue to provide updates on this shipment until it is delivered. 🔗 Track shipment John, great news! Your order #12345 has shipped. Tracking #: ZK4539O2311J Estimated delivery: Jan 1, 2024 We will provide updates until delivery. 🔗 Track shipment John, your order #12345 has left our facility and is on its way to you! Your tracking ID is ZK12345KI999. Click below to track your package. 🔗 Track my order Statement available Hi John, Your January statement for your account ending in 1234 is now available. Click below to see your statement. 🔗 View statement Statement available This is to notify you that your latest statement for your Mankt checking plus account is now available. Please log into your account to view your statement. 🔗 View statement Authentication Your order is arriving soon. {{code}} is your verification code. Please show this to the delivery associate. 6:52 AM Your order is on its way and scheduled to arrive at {{date}}. Please show verification code {{code}} to receive your order. 6:52 AM Please share code {{code}} with the delivery agent after verifying the package. 6:52 AM Your order of {{number}} items (Order ID: {{text}}) is out for delivery today. Please provide the code {{code}} to the delivery agent to receive your order. 6:52 AM {{code}} is your verification code. 6:52 AM {{code}} is your password recovery code. 6:52 AM Use code {{code}} to authorize your transaction. 6:52 AM Use code {{code}} to verify your transaction of {{amount}}. 6:52 AM Use code {{code}} to verify your transaction of {{amount}} on your card ending in {{card number}}. 6:52 AM Use code {{code}} to verify your transaction of {{amount}} on your account ending in {{number}}. 6:52 AM {{code}} is your verification code for transfer of {{amount}}. 6:52 AM Template status check Overview The Template Status Check API allows users to retrieve the approval status of a specific WhatsApp Business API message template. This API is useful for monitoring template approvals and ensuring that a template is available for use in messaging. API End point http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_status Replace the placeholders with: {phone_number_id} → Your WhatsApp Business Account phone number ID. {key} → Your authentication key (API key or access token). {template_id} → The unique ID of the template whose status is being checked. Example Response Success Response (Template Found) { "success": true, "id": "353335", "name": "edit_al", "category": "marketing", "status": "APPROVED" } Explanation of Fields success Type: boolean Value: true or false Description: Indicates whether the API request was successful. id Type: string Example: "353335" Description: A unique identifier assigned to the template. name Type: string Example: "edit_al" Description: The name of the WhatsApp template. category Type: string Example: "marketing" Description: Specifies the category of the template (e.g., "marketing", "utility", "authentication"). status Type: string Values: "APPROVED", "PENDING", "REJECTED" Description: The current approval status of the template. Postman Supported File Formats This document outlines the supported file types that can be sent as attachments in a session message. Attachments are categorized by media type: Image, Video, Audio, and Documents. 1. 📷 Image Attachments Image files can be shared to visually communicate content such as photos, screenshots, infographics, or promotional materials. FormatDescription.jpgJPEG image format. Widely used for photos and web graphics..pngPortable Network Graphics. Supports transparency, ideal for UI elements and screenshots. 2. 🎥 Video Attachments Video files allow for sending motion content, tutorials, clips, and marketing videos. FormatDescription.3gp3GPP multimedia format, optimized for mobile use..mp4MPEG-4 format. Commonly used for high-quality video and audio compression. 3. 📄 Document Attachments Documents can be shared to convey textual, tabular, or presentation-based information. FormatDescription.txtPlain text file. Lightweight format for notes or code..xlsMicrosoft Excel (Legacy). Spreadsheet format for tabular data..xlsxMicrosoft Excel (Modern). Supports advanced Excel features..docMicrosoft Word (Legacy). Used for formatted text documents..docxMicrosoft Word (Modern). Common word processing format..pptMicrosoft PowerPoint (Legacy). Used for slide presentations..pptxMicrosoft PowerPoint (Modern). Supports multimedia presentations..pdfPortable Document Format. Preserves layout and formatting across devices. Error Types Pingtochat uses conventional HTTP response codes to indicate the success or failure of an API request.Below, we provide some common error codes: API Verification Code Error code Description300Your token not valid.301Your key is Invalid.303Your current key phrase is expired. Please regenerate token.304User is not valid.305phone_number_id is incorrect.306waba sender id data not found.307WabaConfiguration not found.308SupplierConfiguration Token is Required.309Api Service Not Activated.310Domain not valid.311User Supplier Configuration Not Activated. Contact to Support.312WhatsApp API Setting URL and Token Required.313Supplier Operator not providing service.314missing whatsapp service packages table data Template Creation Code Error CodeDescription400Required whatsapp number or contact group or contact upload.401Creadits Not Sufficient to send message.403There is already content for this template. You can create a new template and try again.404Template Not Found for You. Default Rate Limits CategoryLimitTime WindowGeneral Requests1000 requestsPer HourHigh-Volume APIs200 requestsPer MinuteBulk Operations5000 requests (e.g., message sends)Per Day Flow Template Creation Introduction A flow template provides a structured, reusable framework for building automated processes—such as marketing journeys, or workflow systems. Instead of starting from scratch, teams can use a template to save time, ensure consistency, and reduce errors. By using a flow template, you benefit from: Faster setup and deployment Standardized logic and messaging Improved collaboration and scalability Easier testing and optimization Whether you’re designing customer interactions, automating tasks, or guiding users through a process, a flow template serves as a reliable starting point—helping you work smarter and deliver a consistent experience every time. Create template Overview The Flow Template Creation feature allows users to design and save custom flow templates consisting of interactive screens. These templates can be used in various workflows to guide users through a predefined sequence of content and actions. 🔘 Create Template – Main Sections When creating a flow template, the interface is divided into three main sections: 1. Screen Section This section allows users to add and manage up to 8 screens. Each screen represents a step or page in the flow. Users can add, remove, or navigate between screens using this section. The selected screen’s content will be editable in the Edit Content section. 2. Edit Content Section Displays the content of the currently selected screen. Users can edit text, images, inputs, or other interactive elements. All changes made here are reflected in the corresponding screen. 3. Preview Section Provides a real-time preview of the selected screen as it will appear in the final template. Allows users to visualize the layout and flow before saving. ✅ Save Template After editing all desired screens, the user can click the “Save” button. Upon clicking Save: All screen data and configurations are stored as a complete flow template. The template becomes available for use in other modules or workflows. 📌 Additional Notes A minimum of 1 screen and a maximum of 8 screens are allowed per flow template. Templates can be edited later if changes are needed. Ensure that all required fields in the Edit Content section are filled before saving. 🧩 Use Cases Onboarding flows Survey or feedback forms Guided tutorials or walkthroughs Lead generation sequences Sandbox Introduction WhatsApp SandboxA WhatsApp Sandbox is a test environment that allows developers to simulate WhatsApp Business messaging without needing full approval or a live WhatsApp Business number. It enables sending and receiving messages, testing templates, configuring webhooks, and building conversational workflows in a controlled setting—ideal for development and early-stage prototyping. WhatsApp Sandbox A WhatsApp Sandbox is a testing environment that simulates real WhatsApp Business interactions without requiring a live or verified WhatsApp Business account. It is primarily used by developers and businesses to prototype, test, and validate WhatsApp messaging workflows, templates, webhooks, and integrations before going live. Core Features Safe Testing EnvironmentInteract with WhatsApp messaging APIs in a risk-free environment, without affecting real customers or production data. Message SimulationSend and receive messages (text, templates, media) between a test number and sandbox-enabled service. Webhook TestingSimulate callbacks for message delivery, read receipts, or inbound messages using public URLs (e.g., via ngrok or PostBin). Pre-Approved TemplatesMost sandboxes support a limited number of pre-approved message templates for testing transactional or marketing content. Limited AudienceOnly authorized test numbers can interact in the sandbox environment—often limited to the developer’s own phone number(s). Common Limitations Restricted RecipientsMessages can typically only be sent to registered test numbers (often just one or a few) to prevent abuse. Session TimeoutsTest sessions often expire after a few hours or days; users may need to re-authorize or re-join the sandbox. Rate LimitsMessage sending frequency is capped (e.g., 1 message every 3 seconds in some platforms). Limited Templates & FeaturesCustom templates may not be allowed; you may be limited to built-in examples for testing. No Production MessagingSandboxes do not support actual user communications—only for development or QA purposes. How to Access a WhatsApp Sandbox Register with a WhatsApp API provider (e.g., Pingtochat, 360dialog, Zoho, etc.). Obtain a test API key and/or sandbox number. Add your phone number as an authorized tester. Use API endpoints or dashboards to send/receive messages. Configure webhooks to receive events like inbound messages or delivery updates. Go to Service → SandboxThis will open the Sandbox configuration page. To access the Sandbox: Option 1: Scan the QR code using your WhatsApp app. Option 2: Manually copy the phone number and send the provided message code via WhatsApp to join the sandbox. After joining the sandbox: ➡️ You will be automatically redirected to the next page where you can test message sending. On this page, you can: Enter a phone number to send a test message. Select a template to use for the message. View the output of the message delivery in real time. Access sample code in multiple languages such as: PHP cURL Python Node.js, and more. This allows you to test message delivery and understand how to integrate the API into your application. The WhatsApp Sandbox environment provides a safe and efficient way to test message delivery, template functionality, and API integration—all without needing a live WhatsApp Business account. From joining via QR code or message code, to sending test messages and viewing sample code, the sandbox equips you with everything needed to build and validate your messaging flow before going live. Whether you’re testing authentication templates, marketing messages, or webhook responses, the sandbox is an essential step in your WhatsApp development journey. 🛠️ Need Help? If you encounter any issues or have questions: 📨 Contact Support at: support@texaavyinfotech.com 💬 Live Chat is available in the dashboard for real-time assistance.
API Overview The REST API allows developers to interact programmatically with our platform to access and manage resources such as users, messages, and configurations. It follows standard RESTful principles, ensuring a stateless, secure, and scalable design. With the REST API, you can: Send messages Fetch , list and delete messages Fetch , list and delete media messages We have three categories of messaging, which are Marketing Utility Authentication We provide simple messages and template messages. Template messages also support media messages. Authentication To add authentication, you need to register on our platform Pingtochat and log in to your account. Then, create the API key and access token. Click here on Add Token to learn more about creating the token.
Parameter with button This API enables you to send WhatsApp authentication template messages using the provided template configuration. The messages are sent to individual recipients using a specific template ID, phone number ID, and API key. Request Format HTTP Method POST API Version V1.0 Request URL http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Body { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "bulk_id":"12345", "type": "template", "template": { "name": "authentication_template", "language": { "code": "en" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "958625" } ] }, { "type": "button", "sub_type": "url", "index": "0", "parameters": [ { "type": "text", "text": "958625" } ] } ] } } Response Success Response HTTP Status Code: 200 OK Sample Response: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "ODIxMTE=" } ], "messages": [ { "id": "RFPQoMGZWt", "message_status": "accepted" } ] } Message Sample View 958625 is your verification code. For your security, do not share this code. Field Descriptions Root-Level Fields FieldTypeDescriptionmessaging_productstringMust be whatsapp. Identifies the messaging platform being used.recipient_typestringMust be individual. Specifies the type of recipient.tostringThe recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx).typestringMust be template. Specifies the type of message being sent. Template-Level Fields FieldTypeDescriptionnameStringName of the template. For example, "otp_message".languageObjectSpecifies the language of the template.componentsArrayContains the components of the message (body, buttons). Notes Ensure the template name matches an approved template in your WhatsApp Business Account. The phone number must be in E.164 format (e.g., 91xxxxxxxxxx for Indian numbers). Language codes must follow ISO 639-1 standards. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “bulk_id”:”12345″, “type”: “template”, “template”: { “name”: “authentication_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] }, { “type”: “button”, “sub_type”: “url”, “index”: “0”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “bulk_id”:”12345″, “type”: “template”, “template”: { “name”: “authentication_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] }, { “type”: “button”, “sub_type”: “url”, “index”: “0”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”bulk_id\”:\”12345\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”authentication_template\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”958625\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”url\”,\r\n \”index\”: \”0\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”958625\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “bulk_id”: “12345”, “type”: “template”, “template”: { “name”: “authentication_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] }, { “type”: “button”, “sub_type”: “url”, “index”: “0”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “bulk_id”: “12345”, “type”: “template”, “template”: { “name”: “authentication_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] }, { “type”: “button”, “sub_type”: “url”, “index”: “0”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”bulk_id\”:\”12345\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”authentication_template\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”958625\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”url\”,\r\n \”index\”: \”0\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”958625\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”bulk_id\”:\”12345\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”authentication_template\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”958625\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”url\”,\r\n \”index\”: \”0\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”958625\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync());
Panel Documentation Articles Introduction Register Login Dashboard Forgot Password Template Creation Raise a Support Ticket Sales Enquiry Create Group Create Contact Send WhatsApp Message Delivery Report WhatsApp Chat MIS WhatsApp SandBox Transaction Logs Profile Admin Introduction Ping To Chat is a powerful omnichannel CPaaS (Communications Platform as a Service) solution designed to simplify and enhance customer engagement. It brings together all major messaging channels — SMS, WhatsApp, RCS, and Email — into a single, unified platform, allowing businesses to manage and automate customer interactions seamlessly. With Ping To Chat, you can create personalized customer journeys, automate responses, and track engagement across channels in real-time. Whether you’re sending transactional alerts, marketing campaigns, or customer support messages, Ping To Chat ensures reliable delivery and meaningful engagement at scale. Register 📝 Registration Process Option 1: Direct Registration Page Go to https://app.pingtochat.com/register-user. Fill in the required details: Name Email Address Designation Select Currency Phone Number (include country code) Password Click the “Register” button to submit the form. You’ll be redirected to the Login Page after successful registration. SAMPLE REGISTRATION PAGE Option 2: From the Login Page Go to https://app.pingtochat.com. On the Login page, click on “Register”. Complete the registration form with your details. Click “Register” to create your account. You will then be redirected to the Login Page. Login 🔐 Login Process Go to https://www.app.pingtochat.com. If you’re not already logged in, the Login page will appear. Enter your Email Address and Password. Click the “Login” button. You will be redirected to your dashboard, where you can start using Pingtochat. SAMPLE LOGIN PAGE Dashboard After your successfull registration you will be redirect to the PINGTOCHAT Dashboard. Forgot Password If you’ve forgotten your Pingtochat account password, follow these steps to reset it: Go to https://www.app.pingtochat.com. On the Login Page, click on the “Forgot Password?” link below the login form. Image Enter your registered email address. Click “Send Link”. Check your email inbox for a password reset link. Click the link in the email and set your new password. Once your new password is set, return to the login page and log in with your updated credentials. Image Template Creation Step-by-Step Instructions Navigate to the “Templates” section from the dashboard. Click on “Templates”, then select “WhatsApp”. Click on “Add WhatsApp Template” to begin creating a new template. Template Categories in Pingtochat Pingtochat supports three main template categories, each designed for specific types of communication: 1. Authentication Used for identity verification, such as: OTPs (One-Time Passwords) Login confirmations 2. Marketing Supports both text and media formats. Ideal for promotional campaigns and user engagement using: Rich content Offers Announcements 3. Utility Also supports text and media formats. Best suited for sending: Notifications Reminders Transactional alerts ✉️ Message Types Templates can be created in two main message types: 1. Text Simple, clear, text-only messages for quick communication. 2. Media Rich content messages that can include: Image – Share photos or visuals. Video – Send short video clips. Document – Attach PDFs, Word files, Excel sheets, etc. Button Types Enhance user interaction by adding buttons to your messages. Available types include: Quick Reply Button▪ Offers predefined responses for fast replies. Visit Website Button▪ Directs users to a specific webpage. URL Button▪ Opens a designated URL in the browser. Phone Number Button▪ Enables users to make a direct phone call. WhatsApp Number Button (Call on WhatsApp)▪ Initiates a call directly on WhatsApp to a selected contact. Copy Offer Code Button▪ Lets users copy a promotional or offer code to their clipboard. Whatsapp Template list view image Only templates with Active status can be used to send messages. We also provide options to edit or delete templates. If a template is edited, it will be resubmitted for approval, and the status may take some time to update accordingly. Authentication Message Template In Authentication template 3 types are there Zero Tap One Tap Copy Code ZERO TAP Zero-tap authentication templates allow your users to receive one-time passwords or codes via WhatsApp without having to leave your app.’ SAMPLE ZERO TAP TEMPLATE CREATION PAGE image image ONE TAP One-tap autofill authentication templates allow you to send a one-time password or code along with an one-tap autofill button to your users. When a WhatsApp user taps the autofill button, the WhatsApp client triggers an activity which opens your app and delivers it the password or code. SAMPLE ONE TAP TEMPLATE CREATION PAGE image image COPY CODE Copy code authentication templates allow you to send a one-time password or code along with a copy code button to your users. When a WhatsApp user taps the copy code button, the WhatsApp client copies the password or code to the device’s clipboard. The user can then switch to your app and paste the password or code into your app. SAMPLE ONE TAP TEMPLATE CREATION PAGE image image Marketing Message Template In marketing template creation, you can create templates with either a text header or a media header. For text headers, you can include one dynamic parameter. image image with button image Utility MessageTemplate In utility template creation, you can create templates with either a text header or a media header. For text headers, you can include one dynamic parameter. image image with button image After completing your template creation, you will be redirected to the Template List page, where all the templates you have created will be displayed. If you encounter any issues, you can raise a support ticket to the admin for assistance. Raise a Support Ticket If you’re experiencing issues or need assistance, you can raise a support ticket by following these steps: Navigate to the “Support” section in the dashboard. Click on “Raise a Ticket”. Select the issue type from the dropdown list. Enter a detailed message describing your issue or request. Click the “Raise a Ticket” button to submit your support request. Once submitted, you can track and view all your tickets, along with responses, directly from the same section. Image Ticket List and Chat View All your submitted tickets will be listed on the Ticket List page. Click the “View” button next to any ticket to open it. You can see the full conversation and messages in a chat-style interface for easy tracking and replies. image We also provide a Sales Enquiry form for users interested in our services. Users can fill out the form with their details and submit it. Once submitted, our team will review the enquiry and provide further updates or assistance accordingly. Sales Enquiry If you’re interested in our services, you can easily submit a Sales Enquiry through the dashboard. 📝 Steps to Submit a Sales Enquiry: Navigate to the “Sales Enquiry” section in the dashboard. Click on “Sales”. Fill in the required details in the Sales Enquiry Form. Click “Save” to submit your enquiry. Our team will review your request and get back to you with the necessary updates and information. image Once submitted, our team will review your request and get back to you with the necessary information or next steps. Create Group To send bulk messages efficiently, you can create a Contact Group by following these steps: Steps to Create a Contact Group: Navigate to the “Contacts” section in the dashboard. Click on the “Groups” tab to open the group list page. Click the “Add New Group” button. A popup will appear — enter the Group Name and any other required details. Click “Save Group” to create and store the new contact group. Once saved, your group will be available for use in campaigns and message broadcasts. Image Create Contact To send bulk messages efficiently, you can create a Contact Group by following these steps: Steps to Create a Contact Group: Navigate to the “Contacts” section in the dashboard. Click on the “Groups” tab to open the group list page. Click the “Add New Group” button. A popup will appear — enter the Group Name and any other required details. Click “Save Group” to create and store the new contact group. Once saved, your group will be available for use in campaigns and message broadcasts. enter one by one page image import from doc page image After creating your group and completing all the necessary WhatsApp configurations, you can proceed to send WhatsApp messages. Send WhatsApp Message You can easily send WhatsApp messages through Pingtochat by following these steps: Steps to Send a WhatsApp Message: Navigate to the “Services” section in the dashboard. Click on “WhatsApp”. Select “Create Campaign”. You will be redirected to the Send Message form. Fill in the required details: Select Sender Number Choose a Template Add Recipients via: Manual Number Entry Selecting a Group Uploading a File Review the message preview, then click “Send” to initiate your WhatsApp campaign. image Once sent, you can monitor the campaign status and delivery reports are shown in delevery report page. Delivery Report You can track the status and performance of your sent WhatsApp messages through the Delivery Report. Steps to View the Delivery Report: Navigate to the “Services” section in the dashboard. Click on “WhatsApp”. Select “Delivery Report”. You will be redirected to the Report Page, which displays your message activity in a calendar-like format. 🕒 Report Features: View message status and delivery details based on date and time. Filter reports by phone number or credit usage. Monitor the effectiveness of your campaigns in one place. image This section allows you to track message delivery, failures, and overall campaign performance. image when clicking the count you will be redirect to detailed devivery report page there you can find all details image When you click on the count, you will be redirected to the Detailed Delivery Report page, where you can view all message-specific details. detailed view image view image report image WhatsApp Chat Pingtochat also provides a Chat feature. After a message is successfully sent, the conversation will appear on the Chat page, where you can view and continue the conversation directly with the recipient. Easily manage your WhatsApp conversations through the Pingtochat chat interface. How to Access WhatsApp Chat: Go to the “Services” section in the dashboard. Click on “WhatsApp”. Select “WhatsApp Chat” from the menu. You’ll be redirected to the Chat Page, where you can: View all active WhatsApp conversations Respond to messages in real time Continue ongoing chats or initiate new replies image MIS Pingtochat provides a built-in MIS feature to help you monitor and analyze your platform usage effectively. How to Access MIS: Navigate to the “Services” section in the dashboard. Click on “WhatsApp”. Select “MIS” from the options. MIS Dashboard Features: Transaction Graphs – Visualize WhatsApp message activity over time. Credit Usage Graphs – Track how credits are consumed in campaigns. Advanced Filters – Analyze data by time range, sender ID, or template. Use the MIS section to monitor your message delivery trends, optimize credit usage, and improve overall performance. image WhatsApp SandBox The Sandbox environment in Pingtochat allows you to test WhatsApp messaging features before going live. How to Access and Activate the Sandbox: Navigate to “Services” in the dashboard. Click on “WhatsApp”, then select “Sandbox”. Scan the QR Code displayed on the screen using your WhatsApp mobile app. A default message will be sent automatically to activate the sandbox. If you are not activated the sandbox you can raise a ticket for this option then our team will be activate your sandbox Once Activated: You can test sending and receiving messages in a safe environment. Sample code snippets in various programming languages are available, including: cURL PHP Python Java C# NodeJS Ruby This is ideal for developers to integrate and test the API before using the live environment. Transaction Logs Pingtochat provides a comprehensive Transaction Log History, which is divided into two main sections: Credit Log and Wallet Log. The Credit Log records all credit purchases made by the user, displaying complete details such as the amount, date of purchase, and payment status. This helps users easily track their credit top-ups. On the other hand, the Wallet Log contains all transaction details related to WhatsApp payments and other associated activities within the platform. Together, these logs offer clear visibility into your financial activity and ensure better control over your account usage. Credit Logs This section displays all records related to credit purchases.Whenever you buy credits, the complete transaction details — including the amount, date, and status — will be shown here. How to Access Credit Logs: Go to the Dashboard Navigate to “Transaction Logs” Click on “Credit Logs” This helps you keep track of your credit top-ups with full transparency. image Wallet Logs How to Access Wallet Logs: Go to the Dashboard Navigate to “Transaction Logs” Click on “Wallet Logs” This section contains all transaction details related to WhatsApp usage, including: Message sending costs Template charges Other payment-related activities The Wallet Log helps you monitor how your credits are being used across various WhatsApp-related services. image Profile You can easily update your personal information through the profile settings in the dashboard. 👤 How to Edit Your Profile: Go to the Dashboard Navigate to “Settings” Click on “Profile Settings” Update your details such as: Name Email Address Designation Phone Number Password (if needed) After making the changes, click “Save” to update your profile. This section helps you keep your account information accurate and up to date. ⚙️ Available Settings Profile 🔒 Change Password 💳 Wallet Details 🛠️ Configuration Settings 📶 Service Status 🔔 Notifications 📧 Email Settings Each section allows you to customize and manage specific aspects of your Pingtochat account for better control and functionality. Admin
Introduction Ping To Chat is a powerful omnichannel CPaaS (Communications Platform as a Service) solution designed to simplify and enhance customer engagement. It brings together all major messaging channels — SMS, WhatsApp, RCS, and Email — into a single, unified platform, allowing businesses to manage and automate customer interactions seamlessly. With Ping To Chat, you can create personalized customer journeys, automate responses, and track engagement across channels in real-time. Whether you’re sending transactional alerts, marketing campaigns, or customer support messages, Ping To Chat ensures reliable delivery and meaningful engagement at scale.
Panel Documentation Articles Introduction Register Login Dashboard Forgot Password Template Creation Raise a Support Ticket Sales Enquiry Create Group Create Contact Send WhatsApp Message Delivery Report WhatsApp Chat MIS WhatsApp SandBox Transaction Logs Profile Admin Introduction Ping To Chat is a powerful omnichannel CPaaS (Communications Platform as a Service) solution designed to simplify and enhance customer engagement. It brings together all major messaging channels — SMS, WhatsApp, RCS, and Email — into a single, unified platform, allowing businesses to manage and automate customer interactions seamlessly. With Ping To Chat, you can create personalized customer journeys, automate responses, and track engagement across channels in real-time. Whether you’re sending transactional alerts, marketing campaigns, or customer support messages, Ping To Chat ensures reliable delivery and meaningful engagement at scale. Register 📝 Registration Process Option 1: Direct Registration Page Go to https://app.pingtochat.com/register-user. Fill in the required details: Name Email Address Designation Select Currency Phone Number (include country code) Password Click the “Register” button to submit the form. You’ll be redirected to the Login Page after successful registration. SAMPLE REGISTRATION PAGE Option 2: From the Login Page Go to https://app.pingtochat.com. On the Login page, click on “Register”. Complete the registration form with your details. Click “Register” to create your account. You will then be redirected to the Login Page. Login 🔐 Login Process Go to https://www.app.pingtochat.com. If you’re not already logged in, the Login page will appear. Enter your Email Address and Password. Click the “Login” button. You will be redirected to your dashboard, where you can start using Pingtochat. SAMPLE LOGIN PAGE Dashboard After your successfull registration you will be redirect to the PINGTOCHAT Dashboard. image Forgot Password If you’ve forgotten your Pingtochat account password, follow these steps to reset it: Go to https://www.app.pingtochat.com. On the Login Page, click on the “Forgot Password?” link below the login form. Image Enter your registered email address. Click “Send Link”. Check your email inbox for a password reset link. Click the link in the email and set your new password. Once your new password is set, return to the login page and log in with your updated credentials. Image Template Creation Step-by-Step Instructions Navigate to the “Templates” section from the dashboard. Click on “Templates”, then select “WhatsApp”. Click on “Add WhatsApp Template” to begin creating a new template. Template Categories in Pingtochat Pingtochat supports three main template categories, each designed for specific types of communication: 1. Authentication Used for identity verification, such as: OTPs (One-Time Passwords) Login confirmations 2. Marketing Supports both text and media formats. Ideal for promotional campaigns and user engagement using: Rich content Offers Announcements 3. Utility Also supports text and media formats. Best suited for sending: Notifications Reminders Transactional alerts ✉️ Message Types Templates can be created in two main message types: 1. Text Simple, clear, text-only messages for quick communication. 2. Media Rich content messages that can include: Image – Share photos or visuals. Video – Send short video clips. Document – Attach PDFs, Word files, Excel sheets, etc. Button Types Enhance user interaction by adding buttons to your messages. Available types include: Quick Reply Button▪ Offers predefined responses for fast replies. Visit Website Button▪ Directs users to a specific webpage. URL Button▪ Opens a designated URL in the browser. Phone Number Button▪ Enables users to make a direct phone call. WhatsApp Number Button (Call on WhatsApp)▪ Initiates a call directly on WhatsApp to a selected contact. Copy Offer Code Button▪ Lets users copy a promotional or offer code to their clipboard. Whatsapp Template list view image Only templates with Active status can be used to send messages. We also provide options to edit or delete templates. If a template is edited, it will be resubmitted for approval, and the status may take some time to update accordingly. Authentication Message Template In Authentication template 3 types are there Zero Tap One Tap Copy Code ZERO TAP Zero-tap authentication templates allow your users to receive one-time passwords or codes via WhatsApp without having to leave your app.’ SAMPLE ZERO TAP TEMPLATE CREATION PAGE image image ONE TAP One-tap autofill authentication templates allow you to send a one-time password or code along with an one-tap autofill button to your users. When a WhatsApp user taps the autofill button, the WhatsApp client triggers an activity which opens your app and delivers it the password or code. SAMPLE ONE TAP TEMPLATE CREATION PAGE image image COPY CODE Copy code authentication templates allow you to send a one-time password or code along with a copy code button to your users. When a WhatsApp user taps the copy code button, the WhatsApp client copies the password or code to the device’s clipboard. The user can then switch to your app and paste the password or code into your app. SAMPLE ONE TAP TEMPLATE CREATION PAGE image image Marketing Message Template In marketing template creation, you can create templates with either a text header or a media header. For text headers, you can include one dynamic parameter. image image with button image Utility MessageTemplate In utility template creation, you can create templates with either a text header or a media header. For text headers, you can include one dynamic parameter. image image with button image After completing your template creation, you will be redirected to the Template List page, where all the templates you have created will be displayed. If you encounter any issues, you can raise a support ticket to the admin for assistance. Raise a Support Ticket If you’re experiencing issues or need assistance, you can raise a support ticket by following these steps: Navigate to the “Support” section in the dashboard. Click on “Raise a Ticket”. Select the issue type from the dropdown list. Enter a detailed message describing your issue or request. Click the “Raise a Ticket” button to submit your support request. Once submitted, you can track and view all your tickets, along with responses, directly from the same section. Image Ticket List and Chat View All your submitted tickets will be listed on the Ticket List page. Click the “View” button next to any ticket to open it. You can see the full conversation and messages in a chat-style interface for easy tracking and replies. image We also provide a Sales Enquiry form for users interested in our services. Users can fill out the form with their details and submit it. Once submitted, our team will review the enquiry and provide further updates or assistance accordingly. Sales Enquiry If you’re interested in our services, you can easily submit a Sales Enquiry through the dashboard. 📝 Steps to Submit a Sales Enquiry: Navigate to the “Sales Enquiry” section in the dashboard. Click on “Sales”. Fill in the required details in the Sales Enquiry Form. Click “Save” to submit your enquiry. Our team will review your request and get back to you with the necessary updates and information. image Once submitted, our team will review your request and get back to you with the necessary information or next steps. Create Group To send bulk messages efficiently, you can create a Contact Group by following these steps: Steps to Create a Contact Group: Navigate to the “Contacts” section in the dashboard. Click on the “Groups” tab to open the group list page. Click the “Add New Group” button. A popup will appear — enter the Group Name and any other required details. Click “Save Group” to create and store the new contact group. Once saved, your group will be available for use in campaigns and message broadcasts. Image Create Contact To send bulk messages efficiently, you can create a Contact Group by following these steps: Steps to Create a Contact Group: Navigate to the “Contacts” section in the dashboard. Click on the “Groups” tab to open the group list page. Click the “Add New Group” button. A popup will appear — enter the Group Name and any other required details. Click “Save Group” to create and store the new contact group. Once saved, your group will be available for use in campaigns and message broadcasts. enter one by one page image import from doc page image After creating your group and completing all the necessary WhatsApp configurations, you can proceed to send WhatsApp messages. Send WhatsApp Message You can easily send WhatsApp messages through Pingtochat by following these steps: Steps to Send a WhatsApp Message: Navigate to the “Services” section in the dashboard. Click on “WhatsApp”. Select “Create Campaign”. You will be redirected to the Send Message form. Fill in the required details: Select Sender Number Choose a Template Add Recipients via: Manual Number Entry Selecting a Group Uploading a File Review the message preview, then click “Send” to initiate your WhatsApp campaign. image Once sent, you can monitor the campaign status and delivery reports are shown in delevery report page. Delivery Report You can track the status and performance of your sent WhatsApp messages through the Delivery Report. Steps to View the Delivery Report: Navigate to the “Services” section in the dashboard. Click on “WhatsApp”. Select “Delivery Report”. You will be redirected to the Report Page, which displays your message activity in a calendar-like format. 🕒 Report Features: View message status and delivery details based on date and time. Filter reports by phone number or credit usage. Monitor the effectiveness of your campaigns in one place. image This section allows you to track message delivery, failures, and overall campaign performance. image when clicking the count you will be redirect to detailed devivery report page there you can find all details image When you click on the count, you will be redirected to the Detailed Delivery Report page, where you can view all message-specific details. detailed view image view image report image WhatsApp Chat Pingtochat also provides a Chat feature. After a message is successfully sent, the conversation will appear on the Chat page, where you can view and continue the conversation directly with the recipient. Easily manage your WhatsApp conversations through the Pingtochat chat interface. How to Access WhatsApp Chat: Go to the “Services” section in the dashboard. Click on “WhatsApp”. Select “WhatsApp Chat” from the menu. You’ll be redirected to the Chat Page, where you can: View all active WhatsApp conversations Respond to messages in real time Continue ongoing chats or initiate new replies image MIS Pingtochat provides a built-in MIS feature to help you monitor and analyze your platform usage effectively. How to Access MIS: Navigate to the “Services” section in the dashboard. Click on “WhatsApp”. Select “MIS” from the options. MIS Dashboard Features: Transaction Graphs – Visualize WhatsApp message activity over time. Credit Usage Graphs – Track how credits are consumed in campaigns. Advanced Filters – Analyze data by time range, sender ID, or template. Use the MIS section to monitor your message delivery trends, optimize credit usage, and improve overall performance. image WhatsApp SandBox The Sandbox environment in Pingtochat allows you to test WhatsApp messaging features before going live. How to Access and Activate the Sandbox: Navigate to “Services” in the dashboard. Click on “WhatsApp”, then select “Sandbox”. Scan the QR Code displayed on the screen using your WhatsApp mobile app. A default message will be sent automatically to activate the sandbox. If you are not activated the sandbox you can raise a ticket for this option then our team will be activate your sandbox Once Activated: You can test sending and receiving messages in a safe environment. Sample code snippets in various programming languages are available, including: cURL PHP Python Java C# NodeJS Ruby This is ideal for developers to integrate and test the API before using the live environment. Transaction Logs Pingtochat provides a comprehensive Transaction Log History, which is divided into two main sections: Credit Log and Wallet Log. The Credit Log records all credit purchases made by the user, displaying complete details such as the amount, date of purchase, and payment status. This helps users easily track their credit top-ups. On the other hand, the Wallet Log contains all transaction details related to WhatsApp payments and other associated activities within the platform. Together, these logs offer clear visibility into your financial activity and ensure better control over your account usage. Credit Logs This section displays all records related to credit purchases.Whenever you buy credits, the complete transaction details — including the amount, date, and status — will be shown here. How to Access Credit Logs: Go to the Dashboard Navigate to “Transaction Logs” Click on “Credit Logs” This helps you keep track of your credit top-ups with full transparency. image Wallet Logs How to Access Wallet Logs: Go to the Dashboard Navigate to “Transaction Logs” Click on “Wallet Logs” This section contains all transaction details related to WhatsApp usage, including: Message sending costs Template charges Other payment-related activities The Wallet Log helps you monitor how your credits are being used across various WhatsApp-related services. image Profile You can easily update your personal information through the profile settings in the dashboard. 👤 How to Edit Your Profile: Go to the Dashboard Navigate to “Settings” Click on “Profile Settings” Update your details such as: Name Email Address Designation Phone Number Password (if needed) After making the changes, click “Save” to update your profile. This section helps you keep your account information accurate and up to date. ⚙️ Available Settings Profile 🔒 Change Password 💳 Wallet Details 🛠️ Configuration Settings 📶 Service Status 🔔 Notifications 📧 Email Settings Each section allows you to customize and manage specific aspects of your Pingtochat account for better control and functionality. Admin In the Admin section, under Users, Pingtochat allows you to manage user accounts efficiently. As an admin, you can create new users, promote users to roles such as Support User or Sales User, and manage existing users. You can also view detailed user information and access user activity reports, giving you full control over user management within the platform. Email Configuratoin Admin SMTP Configuration? Admin SMTP Configuration refers to the setup process performed by system administrators to enable email sending from a server, web application, or platform. This configuration ensures the system can send essential emails reliably and securely. How to Set Up SMTP Go to Admin in dashboard Click on Email. Select SMTP. Click Create to add a new SMTP configuration. Fill in the required SMTP details (e.g., server, port, username, password, etc.). Save the configuration. Use the Send Test Email option to verify the setup. Confirm that the test email is received to ensure everything is working correctly. SMTP configuration is crucial for: 🔑 Sending password reset emails 📢 Delivering system notifications or alerts 💬 Facilitating communication with users or administrators We provide a user-friendly form to help you easily create an SMTP configuration. Additionally, you can use this form to test and verify that your email setup is working correctly by sending a test email. This ensures your email settings are properly configured before going live. image Email Templates You can manage and customize email templates in the Admin How to setup Navigate to Admin in dashboard Click to Email Select Email Template We provide built-in templates for the following email types: Welcome Email – Sent to users when they register or join. Forgot Password Email – Sent to users who request a password reset. Subscription Email – Sent to users for subscription confirmations or updates. You can edit these templates to match your brand and messaging style before they are used in live emails. SEO Configuration You can manage your site’s SEO settings from Admin How to setup Navigate to Admin in dashboard Go to SEO Click to Add SEO This section allows you to optimize your website for search engines by configuring the following: Meta Title – Set the title that appears in browser tabs and search engine results. Meta Description – Add a short summary that describes your page content for search engines. Keywords – Define relevant keywords to improve search visibility. Make sure to regularly update these settings to improve your website’s search engine ranking and visibility. WhatsApp Package An admin can create a package only if the main admin has already been assigned a package. Admins can create packages for sending WhatsApp messages. We also provide a default package for admins, where you can add a surcharge for each message category—such as Authentication, Utility, and Marketing—based on the country name and country code. How to create package Navigate to WhatsApp Package in dashboard Select Package Create image Set Package to User Admins need to assign a package to their users in order to enable message sending. To do this, select the user, choose a package, and assign it accordingly. How to assign package to user Navigate to WhatsApp Package in dashboard Select Set Package If the selected user already has a package assigned, it will be displayed in the list. Otherwise, no package will be shown. You can also assign or update a new package for the same user. Package Listing When selecting a package, the full details of that package will be displayed. Navigate to WhatsApp Package in dashboard Select Package List Create User In the admin section, the admin can directly create users, add services, and assign packages. How to create user Navigate to Admin in Dashboard Select Customer Click the Create User image While adding a user, the admin can promote the user to a support role, such as Sales Support or IT Support. Select one or more users from the user selection list, choose a user type (e.g., IT Support or Sales Support), and click ‘Update’ to apply the changes. Image Manage User How to Manage user Navigate to Admin in Dashboard Select Customer Click to Manage User 1. User Management View list of all users Add / Edit / users Activate / Deactivate user accounts Search and filter users Assign roles or permissions (if role-based access) 2. User Profile Management View and update user profile details Change user password View login history / security logs 3. Pre-Login User Actions Admin can login to their own users account 4. Service Management View list of all services Add new services Update service details Enable / Disable services 5. Wallet Management View all user wallets Add funds to a user’s wallet Deduct funds manually View wallet transaction history Image Admin Settings WhatsApp Configuration Navigate to the Admin in Dashboard. In the Admin panel, go to Admin Settings. Click on WhatsApp Configuration. You will see the default WhatsApp package displayed in the table. All available WhatsApp packages are listed below. You can select only one package from the list to set as the default. Once selected, click to set it as the default package. This will replace the existing default with the newly selected package. image Menu Settings Navigate to the Admin panel. In the Admin panel, go to Admin Settings. Click on Menu Settings. Here, the admin can add menus for their users. The admin can assign different menus or any combination of menus to each user. A reset menu option is also available to restore default menu settings. image Template Request In the Admin panel, go to the Template Request menu. This section lists all templates created by users. The admin can approve or reject each template request. The admin can also view each template in detail before making a decision. image Theme Settings Color Settings 1.Navigate to the Admin in Dashboard. 2.Go to Theme Settings 3.Select Color Settings. 4.In the Color Settings section, the admin can customize the appearance of the admin panel, including: Theme Color: Choose a primary color for the panel’s theme to match your brand or preference. Dark Mode: Toggle between light mode and dark mode for better visual comfort. Menu Layout: Select from available menu layout styles (e.g., vertical, horizontal, collapsed). 5.Additionally, the admin can upload or update the panel logo to personalize the branding of the admin interface. image Default Menu Navigate to the Admin in Dashboard. Go to Theme Settings Click on Menu Settings. In this section, the admin can set the default home page that users will see after logging in. A list of available pages will be displayed. The admin can select any page from the list and set it as the default home page. Once set, users will be redirected to this selected page immediately after login. image Payments User Payment Credits Navigate to the Admin panel. Go to the Payments section. In this section, you will find the User Payment Credits List. This list displays all users’ credit details, including: Credit amounts Payment status (e.g., Paid or Unpaid) If a user has already made a payment, the admin can manually update the payment status to reflect this. This feature allows the admin to correct or confirm payment records as needed. image User Wallet Logs Navigate to the Admin panel. Go to the Payments section. Click on the User Wallet Logs menu. This section displays detailed wallet transaction logs for each user. It includes information such as: Wallet balance updates Credit or debit history Usage details (e.g., credits used for sending messages) Timestamps and descriptions of each transaction This allows the admin to monitor and audit wallet activity for all users effectively. image Support Menu Manage Tickets Navigate to the Admin in Dashboard. Go to the Support menu Select Manage Tickets. This section displays all support tickets submitted by users. The admin can communicate with users by sending messages in a chat-like interface. The admin has the ability to: Cancel a ticket Close a ticket Reopen a ticket if it was previously canceled or closed If a ticket is canceled, the admin can still open it again to continue addressing the issue. image Sales Enquiry Navigate to the Admin in Dashboard. Go to Support Select Sales Enquiry menu. This section displays all sales-related issues submitted by users. The admin can assign each sales enquiry to a sales support user. A list of all sales support users associated with the admin is available for selection. The admin selects a sales support user and assigns the enquiry to them. The status of each assigned enquiry is also shown, such as Completed or Processing or Review image Report WhatsApp Report Navigate to the Admin panel. Go to the Reports section Click on WhatsApp Report. This section displays a calendar view. In the calendar, you will see the daily count of WhatsApp messages sent. When you click on a specific date, a detailed view opens showing: A breakdown of message activity for that day Data for all users, including message counts and relevant details This helps the admin monitor and analyze WhatsApp usage across all users in a calendar-based format. image Notification Add Notifications Navigate to the Admin in Dashboard. Go to the Notification section. Select Add Notifications In this section, the admin can create and send notifications to: Regular users Support users While creating a notification, the admin can: Set a title for the notification Choose a priority level (e.g., High, Medium, Low) Write a custom message The admin also has the option to send the notification via email to the selected users. This allows effective communication of important updates, alerts, or announcements. image List of Notifications Navigate to the Admin in Dashboard. Go to the Notification section. Select Notifications This section displays all notifications created by the admin. For each notification, the admin can view: The list of recipients The read/unread status for each user This allows the admin to track who has seen the notification and take further action if needed. image
Introduction Ping To Chat is a powerful omnichannel CPaaS (Communications Platform as a Service) solution designed to simplify and enhance customer engagement. It brings together all major messaging channels — SMS, WhatsApp, RCS, and Email — into a single, unified platform, allowing businesses to manage and automate customer interactions seamlessly. With Ping To Chat, you can create personalized customer journeys, automate responses, and track engagement across channels in real-time. Whether you’re sending transactional alerts, marketing campaigns, or customer support messages, Ping To Chat ensures reliable delivery and meaningful engagement at scale.
Authentication Message Template In Authentication template 3 types are there Zero Tap One Tap Copy Code ZERO TAP Zero-tap authentication templates allow your users to receive one-time passwords or codes via WhatsApp without having to leave your app.’ SAMPLE ZERO TAP TEMPLATE CREATION PAGE image image ONE TAP One-tap autofill authentication templates allow you to send a one-time password or code along with an one-tap autofill button to your users. When a WhatsApp user taps the autofill button, the WhatsApp client triggers an activity which opens your app and delivers it the password or code. SAMPLE ONE TAP TEMPLATE CREATION PAGE image image COPY CODE Copy code authentication templates allow you to send a one-time password or code along with a copy code button to your users. When a WhatsApp user taps the copy code button, the WhatsApp client copies the password or code to the device’s clipboard. The user can then switch to your app and paste the password or code into your app. SAMPLE ONE TAP TEMPLATE CREATION PAGE image image
Create Token First, you need to create an API key and token for WhatsApp configuration. To create these, click on the Pingtochat Register link to register, or the Pingtochat Login link to log in to Pingtochat. After successfully registering or logging in, you will find an option to add an API key and token on the left side of the dashboard. To Generate Token Navigate to: Settings ->API ->Token. Select your WABA ID and Sender ID, then choose the version. Finally, click the “Generate Token” button to create your Token Generate the Whatsapp Sender If you don’t have a WhatsApp sender number, click the “Register” link for Sender ID to create one. Follow the steps provided to complete the registration process. Once registered, ensure the sender number is verified and linked to your account before proceeding with token generation.
Message without parameter Description: Send a basic template message without any parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace the placeholders: {{your_domain}}: Your API domain. {{phone_number_id}}: The ID linked to your WhatsApp Business API number. {{key}}: Your API key for authentication.How to create key Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example : { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_newyear", "language": { "code": "en" }, "components": [ ] } } Field Descriptions: messaging_product: Always "whatsapp" for WhatsApp messaging. recipient_type: "individual" for single-user messages. to: Recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx for an Indian number). type: "template" for template messages. template: Contains details about the template: name: Name of the pre-approved template (marketing_newyear in this case). language: Specifies the language code. code: Language code for the template (e.g., en for English). components: An array for dynamic content or interactive elements (leave empty for simple messages). Example Response When the API processes the request successfully, it returns a response similar to this: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MDM=" } ], "messages": [ { "id": "8AVoq6uUPP", "message_status": "accepted" } ] } Response Details: contacts: input: The phone number you provided in the to field. wa_id: WhatsApp ID of the recipient. status_id: A unique identifier for the status of this contact. messages: id: A unique ID for the message. message_status: Status of the message (e.g., "accepted"). Sample View: Hi welcome to 2025 Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear”, “language”: { “code”: “en_us” }, “components”: [ ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear”, “language”: { “code”: “en_us” }, “components”: [ ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear\”,\n \”language\”: {\n \”code\”: \”en_us\”\n },\n \”components\”: [\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear”, “language”: { “code”: “en_us” }, “components”: [] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear”, “language”: { “code”: “en_us” }, “components”: [] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear\”,\n \”language\”: {\n \”code\”: \”en_us\”\n },\n \”components\”: [\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear”, “language”: { “code”: “en_us” }, “components”: [] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); })
Register 📝 Registration Process Option 1: Direct Registration Page Go to https://app.pingtochat.com/register-user. Fill in the required details: Name Email Address Designation Select Currency Phone Number (include country code) Password Click the “Register” button to submit the form. You’ll be redirected to the Login Page after successful registration. SAMPLE REGISTRATION PAGE Option 2: From the Login Page Go to https://app.pingtochat.com. On the Login page, click on “Register”. Complete the registration form with your details. Click “Register” to create your account. You will then be redirected to the Login Page.
Authentication Message Template In Authentication template 3 types are there Zero Tap One Tap Copy Code ZERO TAP Zero-tap authentication templates allow your users to receive one-time passwords or codes via WhatsApp without having to leave your app.’ SAMPLE ZERO TAP TEMPLATE CREATION PAGE image image ONE TAP One-tap autofill authentication templates allow you to send a one-time password or code along with an one-tap autofill button to your users. When a WhatsApp user taps the autofill button, the WhatsApp client triggers an activity which opens your app and delivers it the password or code. SAMPLE ONE TAP TEMPLATE CREATION PAGE image image COPY CODE Copy code authentication templates allow you to send a one-time password or code along with a copy code button to your users. When a WhatsApp user taps the copy code button, the WhatsApp client copies the password or code to the device’s clipboard. The user can then switch to your app and paste the password or code into your app. SAMPLE ONE TAP TEMPLATE CREATION PAGE image image
Credit Logs This section displays all records related to credit purchases.Whenever you buy credits, the complete transaction details — including the amount, date, and status — will be shown here. How to Access Credit Logs: Go to the Dashboard Navigate to “Transaction Logs” Click on “Credit Logs” This helps you keep track of your credit top-ups with full transparency. image
Register 📝 Registration Process Option 1: Direct Registration Page Go to https://app.pingtochat.com/register-user. Fill in the required details: Name Email Address Designation Select Currency Phone Number (include country code) Password Click the “Register” button to submit the form. You’ll be redirected to the Login Page after successful registration. SAMPLE REGISTRATION PAGE Option 2: From the Login Page Go to https://app.pingtochat.com. On the Login page, click on “Register”. Complete the registration form with your details. Click “Register” to create your account. You will then be redirected to the Login Page.
Marketing Message Template In marketing template creation, you can create templates with either a text header or a media header. For text headers, you can include one dynamic parameter. image image with button image
International SMS API Articles Introduction Create Token Send SMS API Introduction Introduction to International APIs An International API (Application Programming Interface) enables software applications to interact across borders by providing access to global services, data, or platforms. These APIs are designed to support multi-language, multi-currency, and multi-regional operations, making them essential for businesses that operate in multiple countries or serve international users. International APIs can be found in various domains such as: Payments and Banking (e.g., Stripe, PayPal, Wise) Shipping and Logistics (e.g., FedEx, DHL, EasyPost) Travel and Booking (e.g., Skyscanner, Amadeus, Booking.com) Localization and Translation (e.g., Google Translate, Microsoft Translator) Social Media and Communication (e.g., WhatsApp Business API, Facebook Graph API) These APIs help developers: Standardize integration with international services. Handle global compliance and localization. Enable real-time communication and data exchange across countries. As globalization increases, international APIs play a key role in connecting businesses, services, and users worldwide. Create Token First, you need to create an API key and token for WhatsApp configuration. To create these, click on the Pingtochat Register link to register, or the Pingtochat Login link to log in to Pingtochat. After successfully registering or logging in, you will find an option to add an API key and token on the left side of the dashboard. To Generate Token Navigate to: Settings ->API ->Internationak SMS Token. Select your WABA ID and Sender ID, then choose the version. Finally, click the “Generate Token” button to create your Token Generate the Whatsapp Sender If you don’t have a WhatsApp sender number, click the “Register” link for Sender ID to create one. Follow the steps provided to complete the registration process. Once registered, ensure the sender number is verified and linked to your account before proceeding with token generation. Send SMS API Overview This API allows you to send international SMS messages via the Your Domain (pingtochat.com) service. It is useful for businesses looking to reach users across different countries with messages such as alerts, notifications, OTPs, or promotional content. URL https://{{your_domain}}/api/v1.0/{{key}}/Internationalsms Method POST Headers Content-Type: application/json Authorization: Bearer <your_access_token> Request PayloadsYour Domain (pingtochat.com) Sending a Text Message The payload for sending a plain text message via the WhatsApp API is structured as follows: Example : { "messaging_product": "sms", "to": "91 xxxxxxxxxx", "from": "PINGTOCHAT", "message": "test message", "templateId":6, "bulkId":1 } Field description FieldTypeDescriptionmessaging_productstringType of messaging product (must be "sms" for SMS sending).tostringRecipient’s mobile number in international format. E.g., "91xxxxxxxxxx".fromstringSender name or ID (e.g., "PINGTOCHAT").messagestringMessage content to be sent.templateIdintID of the predefined message template (if applicable).bulkIdintID for grouping multiple messages as a bulk operation. ✅ Success Response HTTP 200 OK { "status": "success", "messaging_product": "sms", "bulk_id": 1, "contacts": [ { "phone_number": "+91xxxxxxxxxx", "status": "sent" } ], "messages": [ { "transaction_id": "ABCDEFGHIJ" } ] } ❌ Error Responses HTTP StatusMeaningSample Error Message400Bad Request"Invalid phone number format"401Unauthorized"Invalid API key"403Forbidden"Access denied"500Internal Server Error"Unexpected error occurred. Try again later"
Webhook Pingtochat supports webhooks that can alert you of the following via callback URLs. Messages received Messages sent (Template & Session) Status of the messages sent (Sent/Delivered/read) How to add a Webhook to Pingtochat? Navigate to:Settings ->API ->Webhook. Create an HTML URL for the webhook. Enter your Hub Verification Token in the designated field on the webhook form. When an event occurs, we will send the hub verify token along with the hub challenge to the provided URL. For verification, the customer must return the same hub challenge to confirm receipt. This ensures successful integration and validation of webhook events. Example : <?php $input = file_get_contents('php://input'); $hub_challenge = json_decode($input)->hub_challenge; $verify_token = json_decode($input)->hub_verify_token; $expected_token = '123'; if ($verify_token === $expected_token) { http_response_code(200); echo $hub_challenge; exit; } http_response_code(400); echo json_encode(["message" => "Bad request!"]); ?>
Message with parameter Description: Send a template message that includes dynamic text parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace the placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your API domain. {{phone_number_id}}: The ID linked to your WhatsApp Business API number. Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_newyear_va", "language": { "code": "en" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "user_name" }, { "type": "text", "text": "Features" } ] } ] } } Field Breakdown: messaging_product: Specifies the messaging product, always "whatsapp". recipient_type: "individual" for single-user messages. to: The recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx). type: "template" for sending a template message. template: name: The name of the pre-approved template (marketing_newyear_va in this case). language: code: The language code of the template (e.g., en for English). components: type: Specifies the part of the template being populated. Use "body" for main content placeholders. parameters: Contains dynamic data to replace placeholders in the template: type: The type of data (e.g., "text"). text: The value that replaces the placeholder in the template. Dynamic Parameters and Placeholders Templates can include dynamic placeholders represented as variables like {{1}}, {{2}}, etc. Each placeholder is replaced by the corresponding value in the parameters array. Template Example: Template name: marketing_newyear_vaTemplate content: Hi {{1}}, welcome to our platform! Check out these amazing {{2}}. Example: "parameters": [ { "type": "text", "text": "user_name" // Replaces {{1}} }, { "type": "text", "text": "Features" // Replaces {{2}} } ] Resulting message: Hi user_name, welcome to our platform! Check out these amazing Features. Response Structure A successful API call returns a 200 OK response with details about the sent message. Example Response: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTI=" } ], "messages": [ { "id": "phoSwcGtbL", "message_status": "accepted" } ] } Response Details: contacts: input: The phone number from the to field. wa_id: WhatsApp ID of the recipient. status_id: Identifier for the delivery status. messages: id: A unique identifier for the message. message_status: Status of the message, e.g., "accepted". Notes and Best Practices Pre-approved Templates: Templates must be created and approved in the WhatsApp Business Manager. Ensure placeholders ({{1}}, {{2}}, etc.) align with the payload. Dynamic Content: Use the parameters array to customize messages. Include text, media, or buttons as required by your template. Language Codes: Match the language code with the template’s approved language. Full list of ISO 639-1 codes. Testing: Use a sandbox environment to test integrations. Validate payloads and monitor logs for issues. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “user_name” }, { “type”: “text”, “text”: “Features” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “user_name” }, { “type”: “text”, “text”: “Features” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear_va\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”user_name\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”Features\”\n }\n ]\n }\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “user_name” }, { “type”: “text”, “text”: “Features” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “user_name” }, { “type”: “text”, “text”: “Features” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear_va\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”user_name\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”Features\”\n }\n ]\n }\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “user_name” }, { “type”: “text”, “text”: “Features” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Users Articles Panel Documentation Panel Documentation Introduction Ping To Chat is a powerful omnichannel CPaaS (Communications Platform as a Service) solution designed to simplify and enhance customer engagement. It brings together all major messaging channels — SMS, WhatsApp, RCS, and Email — into a single, unified platform, allowing businesses to manage and automate customer interactions seamlessly. With Ping To Chat, you can create personalized customer journeys, automate responses, and track engagement across channels in real-time. Whether you’re sending transactional alerts, marketing campaigns, or customer support messages, Ping To Chat ensures reliable delivery and meaningful engagement at scale. Register 📝 Registration Process Option 1: Direct Registration Page Go to https://app.pingtochat.com/register-user. Fill in the required details: Name Email Address Designation Select Currency Phone Number (include country code) Password Click the “Register” button to submit the form. You’ll be redirected to the Login Page after successful registration. SAMPLE REGISTRATION PAGE Option 2: From the Login Page Go to https://app.pingtochat.com. On the Login page, click on “Register”. Complete the registration form with your details. Click “Register” to create your account. You will then be redirected to the Login Page. Login 🔐 Login Process Go to https://www.app.pingtochat.com. If you’re not already logged in, the Login page will appear. Enter your Email Address and Password. Click the “Login” button. You will be redirected to your dashboard, where you can start using Pingtochat. SAMPLE LOGIN PAGE Dashboard After your successfull registration you will be redirect to the PINGTOCHAT Dashboard. Forgot Password If you’ve forgotten your Pingtochat account password, follow these steps to reset it: Go to https://www.app.pingtochat.com. On the Login Page, click on the “Forgot Password?” link below the login form. Image Enter your registered email address. Click “Send Link”. Check your email inbox for a password reset link. Click the link in the email and set your new password. Once your new password is set, return to the login page and log in with your updated credentials. Image Template Creation Step-by-Step Instructions Navigate to the “Templates” section from the dashboard. Click on “Templates”, then select “WhatsApp”. Click on “Add WhatsApp Template” to begin creating a new template. Template Categories in Pingtochat Pingtochat supports three main template categories, each designed for specific types of communication: 1. Authentication Used for identity verification, such as: OTPs (One-Time Passwords) Login confirmations 2. Marketing Supports both text and media formats. Ideal for promotional campaigns and user engagement using: Rich content Offers Announcements 3. Utility Also supports text and media formats. Best suited for sending: Notifications Reminders Transactional alerts ✉️ Message Types Templates can be created in two main message types: 1. Text Simple, clear, text-only messages for quick communication. 2. Media Rich content messages that can include: Image – Share photos or visuals. Video – Send short video clips. Document – Attach PDFs, Word files, Excel sheets, etc. Button Types Enhance user interaction by adding buttons to your messages. Available types include: Quick Reply Button▪ Offers predefined responses for fast replies. Visit Website Button▪ Directs users to a specific webpage. URL Button▪ Opens a designated URL in the browser. Phone Number Button▪ Enables users to make a direct phone call. WhatsApp Number Button (Call on WhatsApp)▪ Initiates a call directly on WhatsApp to a selected contact. Copy Offer Code Button▪ Lets users copy a promotional or offer code to their clipboard. Whatsapp Template list view image Only templates with Active status can be used to send messages. We also provide options to edit or delete templates. If a template is edited, it will be resubmitted for approval, and the status may take some time to update accordingly. Raise a Support Ticket If you’re experiencing issues or need assistance, you can raise a support ticket by following these steps: Navigate to the “Support” section in the dashboard. Click on “Raise a Ticket”. Select the issue type from the dropdown list. Enter a detailed message describing your issue or request. Click the “Raise a Ticket” button to submit your support request. Once submitted, you can track and view all your tickets, along with responses, directly from the same section. Image Ticket List and Chat View All your submitted tickets will be listed on the Ticket List page. Click the “View” button next to any ticket to open it. You can see the full conversation and messages in a chat-style interface for easy tracking and replies. image We also provide a Sales Enquiry form for users interested in our services. Users can fill out the form with their details and submit it. Once submitted, our team will review the enquiry and provide further updates or assistance accordingly. Sales Enquiry If you’re interested in our services, you can easily submit a Sales Enquiry through the dashboard. 📝 Steps to Submit a Sales Enquiry: Navigate to the “Sales Enquiry” section in the dashboard. Click on “Sales”. Fill in the required details in the Sales Enquiry Form. Click “Save” to submit your enquiry. Our team will review your request and get back to you with the necessary updates and information. image Once submitted, our team will review your request and get back to you with the necessary information or next steps. Create Group To send bulk messages efficiently, you can create a Contact Group by following these steps: Steps to Create a Contact Group: Navigate to the “Contacts” section in the dashboard. Click on the “Groups” tab to open the group list page. Click the “Add New Group” button. A popup will appear — enter the Group Name and any other required details. Click “Save Group” to create and store the new contact group. Once saved, your group will be available for use in campaigns and message broadcasts. Image Create Contact To send bulk messages efficiently, you can create a Contact Group by following these steps: Steps to Create a Contact Group: Navigate to the “Contacts” section in the dashboard. Click on the “Groups” tab to open the group list page. Click the “Add New Group” button. A popup will appear — enter the Group Name and any other required details. Click “Save Group” to create and store the new contact group. Once saved, your group will be available for use in campaigns and message broadcasts. enter one by one page image import from doc page image After creating your group and completing all the necessary WhatsApp configurations, you can proceed to send WhatsApp messages. Send WhatsApp Message You can easily send WhatsApp messages through Pingtochat by following these steps: Steps to Send a WhatsApp Message: Navigate to the “Services” section in the dashboard. Click on “WhatsApp”. Select “Create Campaign”. You will be redirected to the Send Message form. Fill in the required details: Select Sender Number Choose a Template Add Recipients via: Manual Number Entry Selecting a Group Uploading a File Review the message preview, then click “Send” to initiate your WhatsApp campaign. image Once sent, you can monitor the campaign status and delivery reports are shown in delevery report page. Delivery Report You can track the status and performance of your sent WhatsApp messages through the Delivery Report. Steps to View the Delivery Report: Navigate to the “Services” section in the dashboard. Click on “WhatsApp”. Select “Delivery Report”. You will be redirected to the Report Page, which displays your message activity in a calendar-like format. 🕒 Report Features: View message status and delivery details based on date and time. Filter reports by phone number or credit usage. Monitor the effectiveness of your campaigns in one place. image This section allows you to track message delivery, failures, and overall campaign performance. image when clicking the count you will be redirect to detailed devivery report page there you can find all details image When you click on the count, you will be redirected to the Detailed Delivery Report page, where you can view all message-specific details. detailed view image view image report image WhatsApp Chat Pingtochat also provides a Chat feature. After a message is successfully sent, the conversation will appear on the Chat page, where you can view and continue the conversation directly with the recipient. Easily manage your WhatsApp conversations through the Pingtochat chat interface. How to Access WhatsApp Chat: Go to the “Services” section in the dashboard. Click on “WhatsApp”. Select “WhatsApp Chat” from the menu. You’ll be redirected to the Chat Page, where you can: View all active WhatsApp conversations Respond to messages in real time Continue ongoing chats or initiate new replies image MIS Pingtochat provides a built-in MIS feature to help you monitor and analyze your platform usage effectively. How to Access MIS: Navigate to the “Services” section in the dashboard. Click on “WhatsApp”. Select “MIS” from the options. MIS Dashboard Features: Transaction Graphs – Visualize WhatsApp message activity over time. Credit Usage Graphs – Track how credits are consumed in campaigns. Advanced Filters – Analyze data by time range, sender ID, or template. Use the MIS section to monitor your message delivery trends, optimize credit usage, and improve overall performance. image WhatsApp SandBox The Sandbox environment in Pingtochat allows you to test WhatsApp messaging features before going live. How to Access and Activate the Sandbox: Navigate to “Services” in the dashboard. Click on “WhatsApp”, then select “Sandbox”. Scan the QR Code displayed on the screen using your WhatsApp mobile app. A default message will be sent automatically to activate the sandbox. If you are not activated the sandbox you can raise a ticket for this option then our team will be activate your sandbox Once Activated: You can test sending and receiving messages in a safe environment. Sample code snippets in various programming languages are available, including: cURL PHP Python Java C# NodeJS Ruby This is ideal for developers to integrate and test the API before using the live environment. Transaction Logs Pingtochat provides a comprehensive Transaction Log History, which is divided into two main sections: Credit Log and Wallet Log. The Credit Log records all credit purchases made by the user, displaying complete details such as the amount, date of purchase, and payment status. This helps users easily track their credit top-ups. On the other hand, the Wallet Log contains all transaction details related to WhatsApp payments and other associated activities within the platform. Together, these logs offer clear visibility into your financial activity and ensure better control over your account usage. Profile You can easily update your personal information through the profile settings in the dashboard. 👤 How to Edit Your Profile: Go to the Dashboard Navigate to “Settings” Click on “Profile Settings” Update your details such as: Name Email Address Designation Phone Number Password (if needed) After making the changes, click “Save” to update your profile. This section helps you keep your account information accurate and up to date. ⚙️ Available Settings Profile 🔒 Change Password 💳 Wallet Details 🛠️ Configuration Settings 📶 Service Status 🔔 Notifications 📧 Email Settings Each section allows you to customize and manage specific aspects of your Pingtochat account for better control and functionality. Admin
Login 🔐 Login Process Go to https://www.app.pingtochat.com. If you’re not already logged in, the Login page will appear. Enter your Email Address and Password. Click the “Login” button. You will be redirected to your dashboard, where you can start using Pingtochat. SAMPLE LOGIN PAGE
Marketing Message Template In marketing template creation, you can create templates with either a text header or a media header. For text headers, you can include one dynamic parameter. image image with button image
Wallet Logs How to Access Wallet Logs: Go to the Dashboard Navigate to “Transaction Logs” Click on “Wallet Logs” This section contains all transaction details related to WhatsApp usage, including: Message sending costs Template charges Other payment-related activities The Wallet Log helps you monitor how your credits are being used across various WhatsApp-related services. image
Login 🔐 Login Process Go to https://www.app.pingtochat.com. If you’re not already logged in, the Login page will appear. Enter your Email Address and Password. Click the “Login” button. You will be redirected to your dashboard, where you can start using Pingtochat. SAMPLE LOGIN PAGE
Utility MessageTemplate In utility template creation, you can create templates with either a text header or a media header. For text headers, you can include one dynamic parameter. image image with button image After completing your template creation, you will be redirected to the Template List page, where all the templates you have created will be displayed. If you encounter any issues, you can raise a support ticket to the admin for assistance.
RCS Documentation RCS stands for Rich Communication Services. It’s a protocol designed to enhance traditional SMS (Short Message Service) and MMS (Multimedia Messaging Service) by offering a richer, more interactive messaging experience. While SMS is limited to basic text messages, RCS supports multimedia content, group chats, read receipts, typing indicators, and many other advanced features. Articles Introduction Create Token Basic Template Create Single Template Creation Multicard Template Creation Send Single Card Message Send Basic Message Send Carousel Message Introduction Create Token Basic Template Create Overview This API allows you to create a basic RCS template with a text type. A basic template is a simpler form of RCS message that contains text-based content only, making it ideal for simple notifications, greetings, or alerts. API Endpoint POST https://{{your_domain}}/api/v1.0/{{key}}/rcs_templates URL Parameters: {{key}}: The account key in the URL should be replaced with your actual account key. . HTTP Method POST: This method is used to send the data to create a new RCS template. Headers Content-Type: application/json Authorization: Bearer <your_access_token> Replace <your_access_token> with your actual Bearer token for authentication. Request Payload The request body should be a JSON object containing the RCS template details. Below is an example of the JSON payload for creating a new RCS template: Example Request Payload: { "name": "welcome_template", "type": "basic", "basic_types": "text", "components": [ { "message": "welcome to PINGTOCHAT" } ] } Field Descriptions: Field NameTypeDescriptionnamestringThe name of the template (e.g., "welcome_template"). This is used for identification.typestringThe type of template. For a basic template, this should be "basic".basic_typesstringThe type of basic template. For text content, this should be "text".componentsarrayAn array that contains the components of the template (e.g., messages).messagestringThe text content of the template (e.g., "welcome to PINGTOCHAT"). Success Response If the template is successfully created, you will receive a 200 OK HTTP status with the details of the newly created template. Example Response: { "id": "3232", "status": "PENDING", "type": "BASIC" } Single Template Creation Overview This API allows you to create RCS templates for rich communication services. These templates can contain multiple cards, each with a title, description, media content, and buttons. The API is helpful for businesses that want to send rich, interactive messages to users via platforms that support RCS. API Endpoint POST https://{{your_domain}}/api/v1.0/{{key}}/rcs_templates URL Parameters: {{key}}: The account key in the URL should be replaced with your actual account key. . HTTP Method POST: This method is used to send the data to create a new RCS template. Headers Content-Type: application/json Authorization: Bearer <your_access_token> Replace <your_access_token> with your actual Bearer token for authentication. Request Payload The request body should be a JSON object containing the RCS template details. Below is an example of the JSON payload for creating a new RCS template: Example Request Payload: { "name": "template_name", "type": "advance", "advance_types": "single", "orientation": "vertical", "components": [ { "cards": [ { "title": "your_title", "description": "your_description", "media": { "height": "MEDIUM", "fileUrl": "https://your_file_path" }, "buttons": [ { "type": "url", "text": "link", "url": "https://example.com" }, { "type": "call", "text": "call now", "number": "9198xxxxxxxx" } ] } ] } ] } Field Descriptions: Field NameTypeDescriptionnamestringThe name of the template, typically used for identification. Example: "rcs_template_one".typestringThe type of template. It can be “advance” (for rich templates with media).advance_typesstringSpecifies the type of advance template. For example, “single”.orientationstringThe orientation of the template. Can be “vertical” or “horizontal”.componentsarrayAn array containing the template components (e.g., cards).cardsarrayAn array of cards in the template, each representing a message or content block.titlestringThe title of the card (e.g., "HI").descriptionstringA description or content for the card (e.g., "This is a sample rcs description").mediaobjectThe media object for the card, containing the height and fileUrl.heightstringSpecifies the height of the media. Example: “MEDIUM”.fileUrlstringThe URL to the media file to be included in the card. Example: image URL.buttonsarrayAn array of buttons for interaction in the card (e.g., link, call).typestringThe type of button, e.g., “url” (a link button) or “call” (a call button).textstringThe text displayed on the button (e.g., "link", "call now").urlstringThe URL to be opened when the user clicks the button (for “url” type buttons).numberstringThe phone number to be called when the “call” button is clicked. Success Response If the template is created successfully, the server will return a 200 OK status with details of the created template. Example Response: { "id": "3232", "status": "PENDING", "type": "ADVANCE" } Multicard Template Creation Overview This API allows you to create multiple RCS templates with a slider configuration. The slider type template lets you add multiple cards to the message, where each card can contain different content such as images, text, and interactive buttons. These types of templates are ideal for promotional offers, product galleries, or multiple steps in an onboarding process. API Endpoint POST https://{{your_domain}}/api/v1.0/{{key}}/rcs_templates URL Parameters: {{key}}: The account key in the URL should be replaced with your actual account key. . HTTP Method POST: This method is used to send the data to create a new RCS template. Headers Content-Type: application/json Authorization: Bearer <your_access_token> Replace <your_access_token> with your actual Bearer token for authentication. Request Payload The request body should be a JSON object containing the RCS template details. Below is an example of the JSON payload for creating a new RCS template: Example Request Payload: { "name": "template_name", "type": "advance", "advance_types": "slider", "thumbnail_alignment": "left", "card_width": "small", "components": [ { "cards": [ { "title": "title_one", "description": "description_one", "media": { "height": "MEDIUM", "fileUrl": "https://example.com/image.png" }, "buttons": [ { "type": "url", "text": "link", "url": "https://example.com" }, { "type": "call", "text": "call now", "number": "9198xxxxxxxx" } ] }, { "title": "title_two", "description": "description_two", "media": { "height": "MEDIUM", "fileUrl": "https://example.com/image.png" }, "buttons": [ { "type": "url", "text": "link", "url": "https://example.com" }, { "type": "call", "text": "call now", "number": "9198xxxxxxxx" } ] } ] } ] } Field Descriptions: Field NameTypeDescriptionnamestringThe name of the template (e.g., "template_one"). This is used for identification.typestringThe type of template. For an advance template, this should be "advance".advance_typesstringThe type of advance template. For a slider template, this should be "slider".thumbnail_alignmentstringThe alignment of the thumbnail for the media. Can be “left” or “right”.card_widthstringThe width of each card in the template. Options could include “small”, “medium”, or “large”.componentsarrayAn array that contains the template components (e.g., cards).cardsarrayA list of cards in the template, each representing a different content block.titlestringThe title of the card (e.g., "title_one").descriptionstringA description or content for the card (e.g., "description_one").mediaobjectThe media object for the card, containing the height and fileUrl.heightstringThe height of the media. This can be “SMALL”, “MEDIUM”, or “LARGE”.fileUrlstringThe URL of the image or media file. Example: "https://example.com/image.png".buttonsarrayA list of buttons to be included on the card. Each button can have a different type (e.g., “url” or “call”).typestringThe type of button. Can be “url” for a link button or “call” for a call button.textstringThe text displayed on the button (e.g., "link", "call now").urlstringThe URL to open when the “url” button is clicked. Example: "https://example.com".numberstringThe phone number to be called when the “call” button is clicked. Example: "9198xxxxxxxx". Success Response If the template is successfully created, you will receive a 200 OK HTTP status, along with the details of the newly created template. Example Response: { "id": "3232", "status": "PENDING", "type": "ADVANCE" } Send Single Card Message Overview This API allows you to send an RCS message to an individual recipient, using an advance card template. The message can contain a single card with media, buttons, title, and description. It’s ideal for sending rich content, such as promotional offers, product updates, or alerts, to a user’s device. API Endpoint POST https://{{your_domain}}/api/v1.0/{{key}}/rcs_message {{your_domain}}: Replace this with your actual domain (e.g., pingtochat.com). {{key}}: Replace this with your API key. HTTP Method POST: Used to send a message using the provided template. Headers Content-Type: application/json Authorization: Bearer <your_access_token> Replace <your_access_token> with your actual Bearer token for authentication. Request Payload This is the JSON structure used to send the RCS message with a single card template: Example Request Payload: { "messaging_product": "rcs", "recipient_type": "individual", "to": "9198xxxxxxxx", "type": "advance", "template": { "name": "basicmessgage", "components": [ { "cards": [ { "title": "your_title", "description": "your_description", "media": { "height": "MEDIUM", "fileUrl": "https://your_image_path" }, "buttons": [ { "type": "url", "text": "link", "url": "https://example.com" }, { "type": "call", "text": "call now", "number": "9198xxxxxxxx" } ] } ] } ] } } Field Description Field NameTypeDescriptionExamplemessaging_productStringSpecifies the messaging product. Set to "rcs" for RCS messaging."rcs"recipient_typeStringDefines the recipient type. Set to "individual" for sending messages to an individual user."individual"toStringThe phone number of the recipient. This is where the message will be sent."9198xxxxxxxx"typeStringDefines the type of the template. For an advanced template, this should be "advance"."advance"templateObjectContains the template details for the message. Includes the template name and components (e.g., cards).N/Atemplate.nameStringThe name of the template, used for identification."basicmessage"template.componentsArrayAn array containing the components of the message (e.g., cards, media, buttons).N/Atemplate.components.cardsArrayAn array of cards that make up the template. Each card can have a title, description, media, and buttons.N/Atemplate.components.cards.titleStringThe title of the card, typically a headline or product name."your_title"template.components.cards.descriptionStringA short description of the card content (e.g., product details, promotional text)."your_description"template.components.cards.mediaObjectContains media details like image URL and height.N/Atemplate.components.cards.media.heightStringSpecifies the height of the media. Can be "SMALL", "MEDIUM", or "LARGE"."MEDIUM"template.components.cards.media.fileUrlStringThe URL of the image or media file that will be displayed in the card."https://your_image_path"template.components.cards.buttonsArrayAn array of buttons to be included in the card. Each button can be either a URL button or a call button.N/Atemplate.components.cards.buttons.typeStringThe type of button. It can be "url" (to open a link) or "call" (to initiate a call)."url" or "call"template.components.cards.buttons.textStringThe text displayed on the button (e.g., “link”, “call now”)."link" or "call now"template.components.cards.buttons.urlStringThe URL to open when the button type is "url"."https://example.com"template.components.cards.buttons.numberStringThe phone number to call when the button type is "call"."9198xxxxxxxx" Success Response If the message is successfully sent, you will receive a 200 OK HTTP status, along with details about the sent message. Example Response: { "status": "success", "message": "Message send successfully", "transaction_id": "abvXXXXXXXXX" } Send Basic Message Overview This API allows you to send a basic RCS message to an individual recipient. In this case, no media, buttons, or advanced components are included, just a simple text message using a basic template. API Endpoint POST https://{{your_domain}}/api/v1.0/{{key}}/rcs_message {{your_domain}}: Replace this with your actual domain (e.g., pingtochat.com). {{key}}: Replace this with your API key. HTTP Method POST: Used to send the basic message. Headers Content-Type: application/json Authorization: Bearer <your_access_token> Replace <your_access_token> with your actual Bearer token for authentication. Request Payload This is the JSON structure used to send the basic RCS message with no advanced components: Example Request Payload: { "messaging_product": "rcs", "recipient_type": "individual", "to": "9198xxxxxxxx", "type": "basic", "template": { "name": "basicmessgage", "components": [ { "message": "Hello! Welcome to P2C." } ] } } Field description Field NameTypeDescriptionExamplemessaging_productStringSpecifies the messaging product. Set to "rcs" for RCS messaging."rcs"recipient_typeStringDefines the recipient type. Set to "individual" for sending messages to an individual user."individual"toStringThe phone number of the recipient. This is where the message will be sent."9198xxxxxxxx"typeStringDefines the type of the template. For a basic template, this should be "basic"."basic"templateObjectContains the template details for the message. Includes the template name and components (e.g., message body).N/Atemplate.nameStringThe name of the template, used for identification."basicmessage"template.componentsArrayAn array containing the components of the message. In this case, it contains a single message.N/Atemplate.components.messageStringThe actual message content that will be displayed in the message body."Hello! Welcome to P2C." Success Response If the message is successfully sent, you will receive a 200 OK HTTP status, along with details about the sent message. Example Response: { "status": "success", "message": "Message send successfully", "transaction_id": "abcxxxxxxxx" } Send Carousel Message Overview This API allows you to create and send advanced RCS templates with carousel configuration. The carousel template enables you to display multiple cards that users can swipe through. Each card can contain different content such as images, text, and interactive buttons. This template is ideal for showcasing multiple products, offers, or steps in a process. API Endpoint POST https://{{your_domain}}/api/v1.0/{{key}}/rcs_message {{your_domain}}: Replace this with your actual domain (e.g., pingtochat.com). {{key}}: Replace this with your API key. HTTP Method POST: Used to send the basic message. Headers Content-Type: application/json Authorization: Bearer <your_access_token> Replace <your_access_token> with your actual Bearer token for authentication. Request Payload This is the JSON structure used to send the basic RCS message with no advanced components: Example Request Payload: { "messaging_product": "rcs", "recipient_type": "individual", "to": "9198xxxxxxxx", "type": "advance", "template": { "name": "basicmessage", "components": [ { "cards": [ { "title": "title_one", "description": "description_one", "media": { "height": "MEDIUM", "fileUrl": "https://example.com/image.png" }, "buttons": [ { "type": "url", "text": "link", "url": "https://example.com" }, { "type": "call", "text": "call now", "number": "9198xxxxxxxx" } ] }, { "title": "title_two", "description": "description_two", "media": { "height": "MEDIUM", "fileUrl": "https://example.com/image.png" }, "buttons": [ { "type": "url", "text": "link", "url": "https://example.com" }, { "type": "call", "text": "call now", "number": "9198xxxxxxxx" } ] } ] } ] } } Field Descriptions: Field NameTypeDescriptionExamplemessaging_productStringSpecifies the messaging product. Set to "rcs" for RCS messaging."rcs"recipient_typeStringDefines the recipient type. Set to "individual" for sending messages to an individual user."individual"toStringThe phone number of the recipient. This is where the message will be sent."9198xxxxxxxx"typeStringDefines the type of template. For an advanced carousel template, this should be "advance"."advance"templateObjectContains the template details for the message. Includes the template name and components (e.g., cards).N/Atemplate.nameStringThe name of the template, used for identification."basicmessage"template.componentsArrayAn array containing the components of the message. In this case, it contains an array of cards.N/Atemplate.components.cardsArrayContains an array of cards, each representing a different part of the message (e.g., image, text, buttons).N/Atemplate.components.cards.titleStringThe title for the card, typically a heading or the name of the product/offer."title_one"template.components.cards.descriptionStringA short description or content for the card (e.g., product details, promo description)."description_one"template.components.cards.mediaObjectContains media details like the image URL and height.N/Atemplate.components.cards.media.heightStringSpecifies the height of the media (e.g., "SMALL", "MEDIUM", or "LARGE")."MEDIUM"template.components.cards.media.fileUrlStringThe URL to the image or media content displayed on the card."https://example.com/image.png"template.components.cards.buttonsArrayA list of buttons that are interactive on the card. Buttons can be of types "url" or "call".N/Atemplate.components.cards.buttons.typeStringThe type of button. This can either be "url" (to open a link) or "call" (to make a call)."url", "call"template.components.cards.buttons.textStringThe label text displayed on the button (e.g., "link", "call now")"link", "call now"template.components.cards.buttons.urlStringThe URL to open when the button type is "url"."https://example.com"template.components.cards.buttons.numberStringThe phone number to dial when the button type is "call"."9198xxxxxxxx" Success Response If the template is successfully created, you will receive a 200 OK HTTP status, along with the details of the newly created template. Example Response: { "status": "success", "message": "Message send successfully", "transaction_id": "abcxxxxxxxx" }
Session Message A session message in WhatsApp refers to any message exchanged between a business and a customer within a 24-hour messaging window that starts when the customer sends a message to the business. These messages are not pre-approved by WhatsApp and can include free-form text, media, or interactive content. URL http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/simpleMessages Method POST Headers Content-Type: application/json Authorization: Bearer <your_access_token> Request Payloads Sending a Text Message The payload for sending a plain text message via the WhatsApp API is structured as follows: Example : { "messaging_product": "whatsapp", "to": "91xxxxxxxxxx", "type": "text", "text": { "body": "Hello!" } } Field Descriptions messaging_product: (string) Specifies the messaging product. For WhatsApp, this is always whatsapp. to: (string) The recipient’s phone number in E.164 format. Example: 919880132082. type: (string) The type of message being sent. Use text for plain text messages. text: (object) Contains the message text. body: (string) The text message content. Example: "Hello!". Response Example Success Response A successful request returns a 200 OK status and a response payload similar to the following: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "RfzuNs4qpN" } ] } Field Descriptions messaging_product: (string) The messaging product used. Always whatsapp. contacts: (array) Contains information about the recipient. input: (string) The phone number you provided in the request. wa_id: (string) The WhatsApp ID associated with the provided phone number. messages: (array) Contains information about the sent message. id: (string) The unique identifier for the sent message. Notes Domain and Credentials: Replace {{your_domain}}, {{phone_number_id}}, and {{key}} with your API domain, phone number ID, and API key respectively. Rate Limits: Ensure your API calls comply with the rate limits set by WhatsApp to avoid being throttled. Session Window: Text messages can only be sent within a 24-hour window of the last user interaction. Template Pre-Approval: For template messages, ensure they are approved in the WhatsApp Business Manager before use. Language Code Matching: Language codes in templates must match the approved template language. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “text”, “text”: { “body”: “Hello!” } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “text”, “text”: { “body”: “Hello!” } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”text\”,\r\n \”text\”: {\r\n \”body\”: \”Hello!\”\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “text”, “text”: { “body”: “Hello!” } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “text”, “text”: { “body”: “Hello!” } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”text\”,\r\n \”text\”: {\r\n \”body\”: \”Hello!\”\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “text”, “text”: { “body”: “Hello!” } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Message without parameter with attachment Description: Send a template message with dynamic text parameters and an image attachment in the header. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Example: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_template_doc", "language": { "code": "en" }, "components": [ { "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://chat.pingtochat.com/template_media/1736424548.png" } } ] } ] } } Field Descriptions General Fields messaging_product: (string) Always whatsapp. recipient_type: (string) Set to individual for one-to-one messages. to: (string) The recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx). type: (string) Always template. Template Object name: (string) The name of the pre-approved template (e.g., marketing_newyear_va_images). language: (object) Specifies the language for the template. code: (string) The language code (e.g., en for English). Components Array Header: type: (string) Always header for attachments. parameters: (array) Holds the media or placeholders for the header. type: (string) Always image for images. image: (object) Contains the image details. link: (string) URL of the image (e.g., https://chat.pingtochat.com/template_media/1736424548.png). Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the seMessages Without Buttonsnt message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_template_doc”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_template_doc”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_template_doc\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”image\”,\n \”image\”: {\n \”link\”: \n \”https://chat.pingtochat.com/template_media/1736424548.png\”\n }\n }\n ]\n }\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_template_doc”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_template_doc”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_template_doc\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”image\”,\n \”image\”: {\n \”link\”: \n \”https://chat.pingtochat.com/template_media/1736424548.png\”\n }\n }\n ]\n }\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_template_doc”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Resellers Articles Panel Documentation Panel Documentation Introduction Ping To Chat is a powerful omnichannel CPaaS (Communications Platform as a Service) solution designed to simplify and enhance customer engagement. It brings together all major messaging channels — SMS, WhatsApp, RCS, and Email — into a single, unified platform, allowing businesses to manage and automate customer interactions seamlessly. With Ping To Chat, you can create personalized customer journeys, automate responses, and track engagement across channels in real-time. Whether you’re sending transactional alerts, marketing campaigns, or customer support messages, Ping To Chat ensures reliable delivery and meaningful engagement at scale. Register 📝 Registration Process Option 1: Direct Registration Page Go to https://app.pingtochat.com/register-user. Fill in the required details: Name Email Address Designation Select Currency Phone Number (include country code) Password Click the “Register” button to submit the form. You’ll be redirected to the Login Page after successful registration. SAMPLE REGISTRATION PAGE Option 2: From the Login Page Go to https://app.pingtochat.com. On the Login page, click on “Register”. Complete the registration form with your details. Click “Register” to create your account. You will then be redirected to the Login Page. Login 🔐 Login Process Go to https://www.app.pingtochat.com. If you’re not already logged in, the Login page will appear. Enter your Email Address and Password. Click the “Login” button. You will be redirected to your dashboard, where you can start using Pingtochat. SAMPLE LOGIN PAGE Dashboard After your successfull registration you will be redirect to the PINGTOCHAT Dashboard. image Forgot Password If you’ve forgotten your Pingtochat account password, follow these steps to reset it: Go to https://www.app.pingtochat.com. On the Login Page, click on the “Forgot Password?” link below the login form. Image Enter your registered email address. Click “Send Link”. Check your email inbox for a password reset link. Click the link in the email and set your new password. Once your new password is set, return to the login page and log in with your updated credentials. Image Template Creation Step-by-Step Instructions Navigate to the “Templates” section from the dashboard. Click on “Templates”, then select “WhatsApp”. Click on “Add WhatsApp Template” to begin creating a new template. Template Categories in Pingtochat Pingtochat supports three main template categories, each designed for specific types of communication: 1. Authentication Used for identity verification, such as: OTPs (One-Time Passwords) Login confirmations 2. Marketing Supports both text and media formats. Ideal for promotional campaigns and user engagement using: Rich content Offers Announcements 3. Utility Also supports text and media formats. Best suited for sending: Notifications Reminders Transactional alerts ✉️ Message Types Templates can be created in two main message types: 1. Text Simple, clear, text-only messages for quick communication. 2. Media Rich content messages that can include: Image – Share photos or visuals. Video – Send short video clips. Document – Attach PDFs, Word files, Excel sheets, etc. Button Types Enhance user interaction by adding buttons to your messages. Available types include: Quick Reply Button▪ Offers predefined responses for fast replies. Visit Website Button▪ Directs users to a specific webpage. URL Button▪ Opens a designated URL in the browser. Phone Number Button▪ Enables users to make a direct phone call. WhatsApp Number Button (Call on WhatsApp)▪ Initiates a call directly on WhatsApp to a selected contact. Copy Offer Code Button▪ Lets users copy a promotional or offer code to their clipboard. Whatsapp Template list view image Only templates with Active status can be used to send messages. We also provide options to edit or delete templates. If a template is edited, it will be resubmitted for approval, and the status may take some time to update accordingly. Raise a Support Ticket If you’re experiencing issues or need assistance, you can raise a support ticket by following these steps: Navigate to the “Support” section in the dashboard. Click on “Raise a Ticket”. Select the issue type from the dropdown list. Enter a detailed message describing your issue or request. Click the “Raise a Ticket” button to submit your support request. Once submitted, you can track and view all your tickets, along with responses, directly from the same section. Image Ticket List and Chat View All your submitted tickets will be listed on the Ticket List page. Click the “View” button next to any ticket to open it. You can see the full conversation and messages in a chat-style interface for easy tracking and replies. image We also provide a Sales Enquiry form for users interested in our services. Users can fill out the form with their details and submit it. Once submitted, our team will review the enquiry and provide further updates or assistance accordingly. Sales Enquiry If you’re interested in our services, you can easily submit a Sales Enquiry through the dashboard. 📝 Steps to Submit a Sales Enquiry: Navigate to the “Sales Enquiry” section in the dashboard. Click on “Sales”. Fill in the required details in the Sales Enquiry Form. Click “Save” to submit your enquiry. Our team will review your request and get back to you with the necessary updates and information. image Once submitted, our team will review your request and get back to you with the necessary information or next steps. Create Group To send bulk messages efficiently, you can create a Contact Group by following these steps: Steps to Create a Contact Group: Navigate to the “Contacts” section in the dashboard. Click on the “Groups” tab to open the group list page. Click the “Add New Group” button. A popup will appear — enter the Group Name and any other required details. Click “Save Group” to create and store the new contact group. Once saved, your group will be available for use in campaigns and message broadcasts. Image Create Contact To send bulk messages efficiently, you can create a Contact Group by following these steps: Steps to Create a Contact Group: Navigate to the “Contacts” section in the dashboard. Click on the “Groups” tab to open the group list page. Click the “Add New Group” button. A popup will appear — enter the Group Name and any other required details. Click “Save Group” to create and store the new contact group. Once saved, your group will be available for use in campaigns and message broadcasts. enter one by one page image import from doc page image After creating your group and completing all the necessary WhatsApp configurations, you can proceed to send WhatsApp messages. Send WhatsApp Message You can easily send WhatsApp messages through Pingtochat by following these steps: Steps to Send a WhatsApp Message: Navigate to the “Services” section in the dashboard. Click on “WhatsApp”. Select “Create Campaign”. You will be redirected to the Send Message form. Fill in the required details: Select Sender Number Choose a Template Add Recipients via: Manual Number Entry Selecting a Group Uploading a File Review the message preview, then click “Send” to initiate your WhatsApp campaign. image Once sent, you can monitor the campaign status and delivery reports are shown in delevery report page. Delivery Report You can track the status and performance of your sent WhatsApp messages through the Delivery Report. Steps to View the Delivery Report: Navigate to the “Services” section in the dashboard. Click on “WhatsApp”. Select “Delivery Report”. You will be redirected to the Report Page, which displays your message activity in a calendar-like format. 🕒 Report Features: View message status and delivery details based on date and time. Filter reports by phone number or credit usage. Monitor the effectiveness of your campaigns in one place. image This section allows you to track message delivery, failures, and overall campaign performance. image when clicking the count you will be redirect to detailed devivery report page there you can find all details image When you click on the count, you will be redirected to the Detailed Delivery Report page, where you can view all message-specific details. detailed view image view image report image WhatsApp Chat Pingtochat also provides a Chat feature. After a message is successfully sent, the conversation will appear on the Chat page, where you can view and continue the conversation directly with the recipient. Easily manage your WhatsApp conversations through the Pingtochat chat interface. How to Access WhatsApp Chat: Go to the “Services” section in the dashboard. Click on “WhatsApp”. Select “WhatsApp Chat” from the menu. You’ll be redirected to the Chat Page, where you can: View all active WhatsApp conversations Respond to messages in real time Continue ongoing chats or initiate new replies image MIS Pingtochat provides a built-in MIS feature to help you monitor and analyze your platform usage effectively. How to Access MIS: Navigate to the “Services” section in the dashboard. Click on “WhatsApp”. Select “MIS” from the options. MIS Dashboard Features: Transaction Graphs – Visualize WhatsApp message activity over time. Credit Usage Graphs – Track how credits are consumed in campaigns. Advanced Filters – Analyze data by time range, sender ID, or template. Use the MIS section to monitor your message delivery trends, optimize credit usage, and improve overall performance. image WhatsApp SandBox The Sandbox environment in Pingtochat allows you to test WhatsApp messaging features before going live. How to Access and Activate the Sandbox: Navigate to “Services” in the dashboard. Click on “WhatsApp”, then select “Sandbox”. Scan the QR Code displayed on the screen using your WhatsApp mobile app. A default message will be sent automatically to activate the sandbox. If you are not activated the sandbox you can raise a ticket for this option then our team will be activate your sandbox Once Activated: You can test sending and receiving messages in a safe environment. Sample code snippets in various programming languages are available, including: cURL PHP Python Java C# NodeJS Ruby This is ideal for developers to integrate and test the API before using the live environment. Transaction Logs Pingtochat provides a comprehensive Transaction Log History, which is divided into two main sections: Credit Log and Wallet Log. The Credit Log records all credit purchases made by the user, displaying complete details such as the amount, date of purchase, and payment status. This helps users easily track their credit top-ups. On the other hand, the Wallet Log contains all transaction details related to WhatsApp payments and other associated activities within the platform. Together, these logs offer clear visibility into your financial activity and ensure better control over your account usage. Profile You can easily update your personal information through the profile settings in the dashboard. 👤 How to Edit Your Profile: Go to the Dashboard Navigate to “Settings” Click on “Profile Settings” Update your details such as: Name Email Address Designation Phone Number Password (if needed) After making the changes, click “Save” to update your profile. This section helps you keep your account information accurate and up to date. ⚙️ Available Settings Profile 🔒 Change Password 💳 Wallet Details 🛠️ Configuration Settings 📶 Service Status 🔔 Notifications 📧 Email Settings Each section allows you to customize and manage specific aspects of your Pingtochat account for better control and functionality. Admin In the Admin section, under Users, Pingtochat allows you to manage user accounts efficiently. As an admin, you can create new users, promote users to roles such as Support User or Sales User, and manage existing users. You can also view detailed user information and access user activity reports, giving you full control over user management within the platform.
Utility MessageTemplate In utility template creation, you can create templates with either a text header or a media header. For text headers, you can include one dynamic parameter. image image with button image After completing your template creation, you will be redirected to the Template List page, where all the templates you have created will be displayed. If you encounter any issues, you can raise a support ticket to the admin for assistance.
Dashboard After your successfull registration you will be redirect to the PINGTOCHAT Dashboard. image
Credit Logs This section displays all records related to credit purchases.Whenever you buy credits, the complete transaction details — including the amount, date, and status — will be shown here. How to Access Credit Logs: Go to the Dashboard Navigate to “Transaction Logs” Click on “Credit Logs” This helps you keep track of your credit top-ups with full transparency. image
Whatsapp In PinToChat, we provide three distinct categories of messages, each with its own supported types and functionalities Categories: Authentication: Supports only the Body component for message templates. Primarily used for identity verification and authentication purposes, such as sending OTPs or login confirmations. Marketing: Supports all types of messaging, including text and media. Ideal for promotional campaigns and engaging with users through rich media content. Utility: Supports all types of messaging, including text and media. Designed for sending notifications, alerts, and other informative content. Message Types: Messages are available in two main types: Text: Simple text-based messages for quick and clear communication. Media: Includes rich content for enhanced engagement, categorized into: Image: Sending photos or images. Video: Sharing video clips. Document: Sending files like PDFs, Word documents, or spreadsheets Message Types: Messages are available in two main types: Text: Simple text-based messages for quick and clear communication. Media: Includes rich content for enhanced engagement, categorized into: Image: Sending photos or images. Video: Sharing video clips. Document: Sending files like PDFs, Word documents, or spreadsheets. Button Types: Interactive buttons can be added to messages for better user engagement. The available button types are: Quick Reply Button: Enables users to respond quickly with predefined options. Visit Website Button: Directs users to a specific webpage. URL Button: Opens a designated URL in the browser. Phone Number Button: Allows users to call a predefined phone number directly. WhatsApp Number Button (Call on WhatsApp): Initiates a call directly on WhatsApp to a given contact. Copy Offer Code Button: Provides an option to copy a promo or offer code to the clipboard.
Message with parameter and attachment Description: Send a template message with dynamic text parameters and an image attachment in the header. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Example: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_newyear_va_images", "language": { "code": "en" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "User_Name" }, { "type": "text", "text": "Features" } ] }, { "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://chat.pingtochat.com/template_media/1736424548.png" } } ] } ] } } Field Descriptions General Fields messaging_product: (string) Always whatsapp. recipient_type: (string) Set to individual for one-to-one messages. to: (string) The recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx). type: (string) Always template. Template Object name: (string) The name of the pre-approved template (e.g., marketing_newyear_va_images). language: (object) Specifies the language for the template. code: (string) The language code (e.g., en for English). Components Array Header: type: (string) Always header for attachments. parameters: (array) Holds the media or placeholders for the header. type: (string) Always image for images. image: (object) Contains the image details. link: (string) URL of the image (e.g., https://chat.pingtochat.com/template_media/1736424548.png). Body: type: (string) Always body for the main text content. parameters: (array) Holds the placeholders to populate the template. type: (string) Always text. text: (string) The value to replace placeholders (e.g., "User_Name", "Features"). Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the seMessages Without Buttonsnt message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear_va_images\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”User_Name\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”Features\”\n }\n ]\n },\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”image\”,\n \”image\”: {\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\n }\n }\n ]\n }\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear_va_images\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”User_Name\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”Features\”\n }\n ]\n },\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”image\”,\n \”image\”: {\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\n }\n }\n ]\n }\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Forgot Password If you’ve forgotten your Pingtochat account password, follow these steps to reset it: Go to https://www.app.pingtochat.com. On the Login Page, click on the “Forgot Password?” link below the login form. Image Enter your registered email address. Click “Send Link”. Check your email inbox for a password reset link. Click the link in the email and set your new password. Once your new password is set, return to the login page and log in with your updated credentials. Image
Wallet Logs How to Access Wallet Logs: Go to the Dashboard Navigate to “Transaction Logs” Click on “Wallet Logs” This section contains all transaction details related to WhatsApp usage, including: Message sending costs Template charges Other payment-related activities The Wallet Log helps you monitor how your credits are being used across various WhatsApp-related services. image
Message without parameters, attachments, and with buttons Description: Send a template message with dynamic text parameters and an image attachment in the header. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Example: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_buttons", "language": { "code": "en" }, "components": [ { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/" } ] } ] } } Field Descriptions messaging_product Description: Indicates the messaging product being used. Value: "whatsapp" (since this message is for WhatsApp). recipient_type Description: Specifies the type of recipient. Value: "individual" (indicates the message is intended for an individual user). to Description: The recipient’s WhatsApp phone number in international format. Value: "91xxxxxxxxxx" (replace xxxxxxxxxx with the actual phone number). type Description: Specifies the type of message being sent. Value: "template" (indicates this is a template message). template Description: The main object containing template message details. Fields: name: Description: The name of the message template. Value: "marketing_buttons" (name of the pre-approved template on WhatsApp). language: code: Description: The language code for the message. Value: "en" (English). components: Description: An array of objects specifying dynamic content for the template. components Description: Holds the dynamic elements of the template. Fields: type: Description: The type of dynamic element in the template. Value: "BUTTONS" (indicates buttons will be included in the message). buttons: Description: An array of button objects within the template. buttons Description: Defines individual buttons within the template. Fields: type: Description: The type of button. Value: "QUICK_REPLY": A button that sends a predefined reply when clicked. "url": A button that redirects the user to a specified URL. text: Description: The text displayed on the button. Value: "Unsubscribe from Promos": Text for the quick reply button. "Go to link": Text for the URL button. url (for url buttons only): Description: The URL the button redirects to. Value: "https://developers.pingtochat.com/". Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the seMessages Without Buttonsnt message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_buttons”, “language”: { “code”: “en” }, “components”: [ { “type”:”BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_buttons”, “language”: { “code”: “en” }, “components”: [ { “type”:”BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_buttons\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”:\”BUTTONS\”,\n \”buttons\”: [\n {\n \”type\”: \”QUICK_REPLY\”,\n \”text\”: \”Unsubscribe from Promos\”\n },\n \n {\n \”type\”: \”url\”,\n \”text\”: \”Go to link\”,\n \”url\”: \”https://developers.pingtochat.com/\”\n \n }\n \n \n ]\n }\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_buttons”, “language”: { “code”: “en” }, “components”: [ { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_buttons”, “language”: { “code”: “en” }, “components”: [ { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_buttons\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”:\”BUTTONS\”,\n \”buttons\”: [\n {\n \”type\”: \”QUICK_REPLY\”,\n \”text\”: \”Unsubscribe from Promos\”\n },\n \n {\n \”type\”: \”url\”,\n \”text\”: \”Go to link\”,\n \”url\”: \”https://developers.pingtochat.com/\”\n \n }\n \n \n ]\n }\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_buttons”, “language”: { “code”: “en” }, “components”: [ { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Authentication Template Message API Authentication templates are specialized message formats used by businesses to verify user identities through one-time passcodes (OTPs) delivered via messaging platforms like WhatsApp. These templates ensure secure and efficient user authentication during processes such as account verification, recovery, and integrity challenges. Key Features of Authentication Templates: Preset Message Content: The templates include fixed text, such as “<VERIFICATION_CODE> is your verification code,” along with optional security disclaimers and expiration warnings. Interactive Buttons: They feature buttons like “COPY_CODE,” which allows users to copy the OTP to their clipboard, and “ONE_TAP,” enabling automatic code autofill within the app. Zero-Tap Authentication Templates Zero-tap authentication templates allow your users to receive one-time passwords or codes via WhatsApp without having to leave your app.’ One-Tap Autofill Authentication Templates One-tap autofill authentication templates allow you to send a one-time password or code along with an one-tap autofill button to your users. When a WhatsApp user taps the autofill button, the WhatsApp client triggers an activity which opens your app and delivers it the password or code. Copy Code Authentication Templates Copy code authentication templates allow you to send a one-time password or code along with a copy code button to your users. When a WhatsApp user taps the copy code button, the WhatsApp client copies the password or code to the device’s clipboard. The user can then switch to your app and paste the password or code into your app. Articles Parameter with button Parameter with button This API enables you to send WhatsApp authentication template messages using the provided template configuration. The messages are sent to individual recipients using a specific template ID, phone number ID, and API key. Request Format HTTP Method POST API Version V1.0 Request URL http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Body { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "bulk_id":"12345", "type": "template", "template": { "name": "authentication_template", "language": { "code": "en" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "958625" } ] }, { "type": "button", "sub_type": "url", "index": "0", "parameters": [ { "type": "text", "text": "958625" } ] } ] } } Response Success Response HTTP Status Code: 200 OK Sample Response: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "ODIxMTE=" } ], "messages": [ { "id": "RFPQoMGZWt", "message_status": "accepted" } ] } Message Sample View 958625 is your verification code. For your security, do not share this code. Field Descriptions Root-Level Fields FieldTypeDescriptionmessaging_productstringMust be whatsapp. Identifies the messaging platform being used.recipient_typestringMust be individual. Specifies the type of recipient.tostringThe recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx).typestringMust be template. Specifies the type of message being sent. Template-Level Fields FieldTypeDescriptionnameStringName of the template. For example, "otp_message".languageObjectSpecifies the language of the template.componentsArrayContains the components of the message (body, buttons). Notes Ensure the template name matches an approved template in your WhatsApp Business Account. The phone number must be in E.164 format (e.g., 91xxxxxxxxxx for Indian numbers). Language codes must follow ISO 639-1 standards. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “bulk_id”:”12345″, “type”: “template”, “template”: { “name”: “authentication_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] }, { “type”: “button”, “sub_type”: “url”, “index”: “0”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “bulk_id”:”12345″, “type”: “template”, “template”: { “name”: “authentication_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] }, { “type”: “button”, “sub_type”: “url”, “index”: “0”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”bulk_id\”:\”12345\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”authentication_template\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”958625\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”url\”,\r\n \”index\”: \”0\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”958625\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “bulk_id”: “12345”, “type”: “template”, “template”: { “name”: “authentication_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] }, { “type”: “button”, “sub_type”: “url”, “index”: “0”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “bulk_id”: “12345”, “type”: “template”, “template”: { “name”: “authentication_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] }, { “type”: “button”, “sub_type”: “url”, “index”: “0”, “parameters”: [ { “type”: “text”, “text”: “958625” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”bulk_id\”:\”12345\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”authentication_template\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”958625\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”url\”,\r\n \”index\”: \”0\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”958625\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”bulk_id\”:\”12345\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”authentication_template\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”958625\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”url\”,\r\n \”index\”: \”0\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”958625\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync());
Forgot Password If you’ve forgotten your Pingtochat account password, follow these steps to reset it: Go to https://www.app.pingtochat.com. On the Login Page, click on the “Forgot Password?” link below the login form. Image Enter your registered email address. Click “Send Link”. Check your email inbox for a password reset link. Click the link in the email and set your new password. Once your new password is set, return to the login page and log in with your updated credentials. Image
Template Creation Step-by-Step Instructions Navigate to the “Templates” section from the dashboard. Click on “Templates”, then select “WhatsApp”. Click on “Add WhatsApp Template” to begin creating a new template. Template Categories in Pingtochat Pingtochat supports three main template categories, each designed for specific types of communication: 1. Authentication Used for identity verification, such as: OTPs (One-Time Passwords) Login confirmations 2. Marketing Supports both text and media formats. Ideal for promotional campaigns and user engagement using: Rich content Offers Announcements 3. Utility Also supports text and media formats. Best suited for sending: Notifications Reminders Transactional alerts ✉️ Message Types Templates can be created in two main message types: 1. Text Simple, clear, text-only messages for quick communication. 2. Media Rich content messages that can include: Image – Share photos or visuals. Video – Send short video clips. Document – Attach PDFs, Word files, Excel sheets, etc. Button Types Enhance user interaction by adding buttons to your messages. Available types include: Quick Reply Button▪ Offers predefined responses for fast replies. Visit Website Button▪ Directs users to a specific webpage. URL Button▪ Opens a designated URL in the browser. Phone Number Button▪ Enables users to make a direct phone call. WhatsApp Number Button (Call on WhatsApp)▪ Initiates a call directly on WhatsApp to a selected contact. Copy Offer Code Button▪ Lets users copy a promotional or offer code to their clipboard. Whatsapp Template list view image Only templates with Active status can be used to send messages. We also provide options to edit or delete templates. If a template is edited, it will be resubmitted for approval, and the status may take some time to update accordingly. Articles Authentication Message Template Marketing Message Template Utility MessageTemplate Authentication Message Template In Authentication template 3 types are there Zero Tap One Tap Copy Code ZERO TAP Zero-tap authentication templates allow your users to receive one-time passwords or codes via WhatsApp without having to leave your app.’ SAMPLE ZERO TAP TEMPLATE CREATION PAGE image image ONE TAP One-tap autofill authentication templates allow you to send a one-time password or code along with an one-tap autofill button to your users. When a WhatsApp user taps the autofill button, the WhatsApp client triggers an activity which opens your app and delivers it the password or code. SAMPLE ONE TAP TEMPLATE CREATION PAGE image image COPY CODE Copy code authentication templates allow you to send a one-time password or code along with a copy code button to your users. When a WhatsApp user taps the copy code button, the WhatsApp client copies the password or code to the device’s clipboard. The user can then switch to your app and paste the password or code into your app. SAMPLE ONE TAP TEMPLATE CREATION PAGE image image Marketing Message Template In marketing template creation, you can create templates with either a text header or a media header. For text headers, you can include one dynamic parameter. image image with button image Utility MessageTemplate In utility template creation, you can create templates with either a text header or a media header. For text headers, you can include one dynamic parameter. image image with button image After completing your template creation, you will be redirected to the Template List page, where all the templates you have created will be displayed. If you encounter any issues, you can raise a support ticket to the admin for assistance.
Email Configuratoin Admin SMTP Configuration? Admin SMTP Configuration refers to the setup process performed by system administrators to enable email sending from a server, web application, or platform. This configuration ensures the system can send essential emails reliably and securely. How to Set Up SMTP Go to Admin in dashboard Click on Email. Select SMTP. Click Create to add a new SMTP configuration. Fill in the required SMTP details (e.g., server, port, username, password, etc.). Save the configuration. Use the Send Test Email option to verify the setup. Confirm that the test email is received to ensure everything is working correctly. SMTP configuration is crucial for: 🔑 Sending password reset emails 📢 Delivering system notifications or alerts 💬 Facilitating communication with users or administrators We provide a user-friendly form to help you easily create an SMTP configuration. Additionally, you can use this form to test and verify that your email setup is working correctly by sending a test email. This ensures your email settings are properly configured before going live. image Email Templates You can manage and customize email templates in the Admin How to setup Navigate to Admin in dashboard Click to Email Select Email Template We provide built-in templates for the following email types: Welcome Email – Sent to users when they register or join. Forgot Password Email – Sent to users who request a password reset. Subscription Email – Sent to users for subscription confirmations or updates. You can edit these templates to match your brand and messaging style before they are used in live emails.
Marketing Template Message API Overview Marketing templates on WhatsApp are designed to send promotional messages, share information about products or services, or communicate business-related updates. These templates are pre-approved by WhatsApp and must comply with the platform’s policies to ensure they provide value to users without being spammy or intrusive. Below is the detailed documentation on marketing templates, their structure, and best practices. Key Characteristics of Marketing Templates Purpose: To promote products, services, or offers. To share informational updates about the business. To engage users with campaigns, announcements, or events. Use Cases: Sending special offers or discounts. Announcing a new product or service. Inviting users to events or webinars. Sharing business updates, such as holiday hours or relocations. Compliance: Must adhere to WhatsApp’s Business Policy. Requires explicit user opt-in for promotional content. Components of a Marketing Template Marketing templates can consist of the following elements: 1. Header (Optional) Type: Text, Image, Video, or Document. Purpose: To grab attention with a visually appealing or textual header. Example: Including a product image or a “Special Offer” banner. 2. Body (Required) Type: Text. Purpose: Contains the primary message content, such as promotional text or product details. Example: “Get 20% off on your next purchase! Use code SAVE20. Offer valid till Jan 31, 2025.” “Introducing our latest collection! Check it out now and enjoy exclusive discounts.” 3. Footer (Optional) Type: Text. Purpose: Provides additional context, disclaimers, or contact information. Example: “Terms and conditions apply. Visit our website for more details.” 4. Buttons (Optional) Types: Quick Reply , URL ,Phone Number and Copy Code Purpose: To encourage user interaction and provide actionable options. Quick Reply: Predefined responses (e.g., “I’m interested”). URL: Redirects to a webpage (e.g., “Shop Now”). Phone: Contact number or Company Phone number (e.f., +919xxxxxxxxx). Copy Code : Use the code for any offers (e,g.,”12345axw”). Articles Message without parameter Message with parameter Message without parameter with attachment Message with parameter and attachment Message without parameters, attachments, and with buttons Message with parameters, attachments, and with buttons Message with parameters,header ,body ,footer and with buttons No parameter with header-text and body and button quick-replay No parameter with body and button quick-replay No parameter with body , footer and button quick-replay , visit-website and phone-number and copy code No parameter with header-text and body and button quick-replay and visit-website No parameter with body and button with quick-replay and visit-website No parameter with body and button with quick-replay , visit-website , phone-number No parameter with header-text , body ,button quick-replay , visit-website and phone-number No parameter with body and button with quick-replay , visit-website , phone-number and copy-code No parameter with header-text , body ,button quick-replay , visit-website , phone-number and copy-code Parameter with header and body No parameter with body , footer and button quick-replay Parameter with header body footer Parameter header body,footer,buttons - quick-replay No parameter with body , footer and button quick-replay and visit-website No parameter with body , footer and button quick-replay , visit-website and phone-number Parameter with header-body-footer , buttons - quick-replay,visit-website,phone-number Parameter with header , body , footer and buttons - quick-replay ,visit website Parameter with header-body-footer , buttons - quick-replay,visit-website,phone-number,copy-code Parameter with body footer button - quick replay Parameter with body footer button - quick-replay ,visit-website and phone-number Parameter with body footer button - quick-replay ,visit-website, phone-number and copy-code Parameter with body , button - quick-replay Parameter with body , button - quick-replay, visit-website Parameter with body , button - quick-replay, visit-website, phone-number Parameter with body , button - quick-replay, visit-website, phone-number, copy-code Parameter with body ,footer, button - quick-replay, visit-website Parameter with body , button - quick replay - visit website Parameter with body , button - phone number - copy code No parameter body ,footer, button - quick replay - visit website No parameter body ,footer, button - phone number - copy code Message without parameter Description: Send a basic template message without any parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace the placeholders: {{your_domain}}: Your API domain. {{phone_number_id}}: The ID linked to your WhatsApp Business API number. {{key}}: Your API key for authentication.How to create key Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example : { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_newyear", "language": { "code": "en" }, "components": [ ] } } Field Descriptions: messaging_product: Always "whatsapp" for WhatsApp messaging. recipient_type: "individual" for single-user messages. to: Recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx for an Indian number). type: "template" for template messages. template: Contains details about the template: name: Name of the pre-approved template (marketing_newyear in this case). language: Specifies the language code. code: Language code for the template (e.g., en for English). components: An array for dynamic content or interactive elements (leave empty for simple messages). Example Response When the API processes the request successfully, it returns a response similar to this: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MDM=" } ], "messages": [ { "id": "8AVoq6uUPP", "message_status": "accepted" } ] } Response Details: contacts: input: The phone number you provided in the to field. wa_id: WhatsApp ID of the recipient. status_id: A unique identifier for the status of this contact. messages: id: A unique ID for the message. message_status: Status of the message (e.g., "accepted"). Sample View: Hi welcome to 2025 Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear”, “language”: { “code”: “en_us” }, “components”: [ ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear”, “language”: { “code”: “en_us” }, “components”: [ ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear\”,\n \”language\”: {\n \”code\”: \”en_us\”\n },\n \”components\”: [\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear”, “language”: { “code”: “en_us” }, “components”: [] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear”, “language”: { “code”: “en_us” }, “components”: [] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear\”,\n \”language\”: {\n \”code\”: \”en_us\”\n },\n \”components\”: [\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear”, “language”: { “code”: “en_us” }, “components”: [] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }) Message with parameter Description: Send a template message that includes dynamic text parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace the placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your API domain. {{phone_number_id}}: The ID linked to your WhatsApp Business API number. Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_newyear_va", "language": { "code": "en" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "user_name" }, { "type": "text", "text": "Features" } ] } ] } } Field Breakdown: messaging_product: Specifies the messaging product, always "whatsapp". recipient_type: "individual" for single-user messages. to: The recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx). type: "template" for sending a template message. template: name: The name of the pre-approved template (marketing_newyear_va in this case). language: code: The language code of the template (e.g., en for English). components: type: Specifies the part of the template being populated. Use "body" for main content placeholders. parameters: Contains dynamic data to replace placeholders in the template: type: The type of data (e.g., "text"). text: The value that replaces the placeholder in the template. Dynamic Parameters and Placeholders Templates can include dynamic placeholders represented as variables like {{1}}, {{2}}, etc. Each placeholder is replaced by the corresponding value in the parameters array. Template Example: Template name: marketing_newyear_vaTemplate content: Hi {{1}}, welcome to our platform! Check out these amazing {{2}}. Example: "parameters": [ { "type": "text", "text": "user_name" // Replaces {{1}} }, { "type": "text", "text": "Features" // Replaces {{2}} } ] Resulting message: Hi user_name, welcome to our platform! Check out these amazing Features. Response Structure A successful API call returns a 200 OK response with details about the sent message. Example Response: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTI=" } ], "messages": [ { "id": "phoSwcGtbL", "message_status": "accepted" } ] } Response Details: contacts: input: The phone number from the to field. wa_id: WhatsApp ID of the recipient. status_id: Identifier for the delivery status. messages: id: A unique identifier for the message. message_status: Status of the message, e.g., "accepted". Notes and Best Practices Pre-approved Templates: Templates must be created and approved in the WhatsApp Business Manager. Ensure placeholders ({{1}}, {{2}}, etc.) align with the payload. Dynamic Content: Use the parameters array to customize messages. Include text, media, or buttons as required by your template. Language Codes: Match the language code with the template’s approved language. Full list of ISO 639-1 codes. Testing: Use a sandbox environment to test integrations. Validate payloads and monitor logs for issues. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “user_name” }, { “type”: “text”, “text”: “Features” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “user_name” }, { “type”: “text”, “text”: “Features” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear_va\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”user_name\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”Features\”\n }\n ]\n }\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “user_name” }, { “type”: “text”, “text”: “Features” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “user_name” }, { “type”: “text”, “text”: “Features” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear_va\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”user_name\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”Features\”\n }\n ]\n }\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “user_name” }, { “type”: “text”, “text”: “Features” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Message without parameter with attachment Description: Send a template message with dynamic text parameters and an image attachment in the header. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Example: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_template_doc", "language": { "code": "en" }, "components": [ { "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://chat.pingtochat.com/template_media/1736424548.png" } } ] } ] } } Field Descriptions General Fields messaging_product: (string) Always whatsapp. recipient_type: (string) Set to individual for one-to-one messages. to: (string) The recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx). type: (string) Always template. Template Object name: (string) The name of the pre-approved template (e.g., marketing_newyear_va_images). language: (object) Specifies the language for the template. code: (string) The language code (e.g., en for English). Components Array Header: type: (string) Always header for attachments. parameters: (array) Holds the media or placeholders for the header. type: (string) Always image for images. image: (object) Contains the image details. link: (string) URL of the image (e.g., https://chat.pingtochat.com/template_media/1736424548.png). Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the seMessages Without Buttonsnt message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_template_doc”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_template_doc”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_template_doc\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”image\”,\n \”image\”: {\n \”link\”: \n \”https://chat.pingtochat.com/template_media/1736424548.png\”\n }\n }\n ]\n }\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_template_doc”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_template_doc”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_template_doc\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”image\”,\n \”image\”: {\n \”link\”: \n \”https://chat.pingtochat.com/template_media/1736424548.png\”\n }\n }\n ]\n }\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_template_doc”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Message with parameter and attachment Description: Send a template message with dynamic text parameters and an image attachment in the header. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Example: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_newyear_va_images", "language": { "code": "en" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "User_Name" }, { "type": "text", "text": "Features" } ] }, { "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://chat.pingtochat.com/template_media/1736424548.png" } } ] } ] } } Field Descriptions General Fields messaging_product: (string) Always whatsapp. recipient_type: (string) Set to individual for one-to-one messages. to: (string) The recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx). type: (string) Always template. Template Object name: (string) The name of the pre-approved template (e.g., marketing_newyear_va_images). language: (object) Specifies the language for the template. code: (string) The language code (e.g., en for English). Components Array Header: type: (string) Always header for attachments. parameters: (array) Holds the media or placeholders for the header. type: (string) Always image for images. image: (object) Contains the image details. link: (string) URL of the image (e.g., https://chat.pingtochat.com/template_media/1736424548.png). Body: type: (string) Always body for the main text content. parameters: (array) Holds the placeholders to populate the template. type: (string) Always text. text: (string) The value to replace placeholders (e.g., "User_Name", "Features"). Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the seMessages Without Buttonsnt message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear_va_images\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”User_Name\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”Features\”\n }\n ]\n },\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”image\”,\n \”image\”: {\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\n }\n }\n ]\n }\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear_va_images\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”User_Name\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”Features\”\n }\n ]\n },\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”image\”,\n \”image\”: {\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\n }\n }\n ]\n }\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Message without parameters, attachments, and with buttons Description: Send a template message with dynamic text parameters and an image attachment in the header. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Example: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_buttons", "language": { "code": "en" }, "components": [ { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/" } ] } ] } } Field Descriptions messaging_product Description: Indicates the messaging product being used. Value: "whatsapp" (since this message is for WhatsApp). recipient_type Description: Specifies the type of recipient. Value: "individual" (indicates the message is intended for an individual user). to Description: The recipient’s WhatsApp phone number in international format. Value: "91xxxxxxxxxx" (replace xxxxxxxxxx with the actual phone number). type Description: Specifies the type of message being sent. Value: "template" (indicates this is a template message). template Description: The main object containing template message details. Fields: name: Description: The name of the message template. Value: "marketing_buttons" (name of the pre-approved template on WhatsApp). language: code: Description: The language code for the message. Value: "en" (English). components: Description: An array of objects specifying dynamic content for the template. components Description: Holds the dynamic elements of the template. Fields: type: Description: The type of dynamic element in the template. Value: "BUTTONS" (indicates buttons will be included in the message). buttons: Description: An array of button objects within the template. buttons Description: Defines individual buttons within the template. Fields: type: Description: The type of button. Value: "QUICK_REPLY": A button that sends a predefined reply when clicked. "url": A button that redirects the user to a specified URL. text: Description: The text displayed on the button. Value: "Unsubscribe from Promos": Text for the quick reply button. "Go to link": Text for the URL button. url (for url buttons only): Description: The URL the button redirects to. Value: "https://developers.pingtochat.com/". Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the seMessages Without Buttonsnt message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_buttons”, “language”: { “code”: “en” }, “components”: [ { “type”:”BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_buttons”, “language”: { “code”: “en” }, “components”: [ { “type”:”BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_buttons\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”:\”BUTTONS\”,\n \”buttons\”: [\n {\n \”type\”: \”QUICK_REPLY\”,\n \”text\”: \”Unsubscribe from Promos\”\n },\n \n {\n \”type\”: \”url\”,\n \”text\”: \”Go to link\”,\n \”url\”: \”https://developers.pingtochat.com/\”\n \n }\n \n \n ]\n }\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_buttons”, “language”: { “code”: “en” }, “components”: [ { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_buttons”, “language”: { “code”: “en” }, “components”: [ { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_buttons\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”:\”BUTTONS\”,\n \”buttons\”: [\n {\n \”type\”: \”QUICK_REPLY\”,\n \”text\”: \”Unsubscribe from Promos\”\n },\n \n {\n \”type\”: \”url\”,\n \”text\”: \”Go to link\”,\n \”url\”: \”https://developers.pingtochat.com/\”\n \n }\n \n \n ]\n }\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_buttons”, “language”: { “code”: “en” }, “components”: [ { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Message with parameters, attachments, and with buttons Description: Send a basic template message with any parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace the placeholders: {{your_domain}}: Your API domain. {{phone_number_id}}: The ID linked to your WhatsApp Business API number. {{key}}: Your API key for authentication.How to create key Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example : { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_newyear_va_images", "language": { "code": "en" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "User_Name" }, { "type": "text", "text": "Features" } ] }, { "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://chat.pingtochat.com/template_media/1736424548.png" } } ] }, { "type": "FOOTER", "text": "Use the buttons below to visit our website" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/" } ] } ] } } Key Points in the Payload Components: header: Includes an image URL. body: Contains text with placeholders replaced by dynamic values. footer: Simple static text. buttons: Supports two types of buttons: QUICK_REPLY: For quick interactions. URL: Redirects to a specific URL. Parameters: The parameters inside header and body match the placeholders defined in the template. URL Requirements: The URL in the buttons section must be publicly accessible. Template Approval: Templates (e.g., marketing_newyear_va_images) must be pre-approved. Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the seMessages Without Buttonsnt message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “FOOTER”, “text”: “Use the buttons below to visit our website” }, { “type”:”BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “FOOTER”, “text”: “Use the buttons below to visit our website” }, { “type”:”BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear_va_images\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”User_Name\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”Features\”\n }\n ]\n },\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”image\”,\n \”image\”: {\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\n }\n }\n ]\n },\n {\n \”type\”: \”FOOTER\”,\n \”text\”: \”Use the buttons below to visit our website\”\n },\n {\n \”type\”:\”BUTTONS\”,\n \”buttons\”: [\n {\n \”type\”: \”QUICK_REPLY\”,\n \”text\”: \”Unsubscribe from Promos\”\n },\n {\n \”type\”: \”url\”,\n \”text\”: \”Go to link\”,\n \”url\”: \”https://developers.pingtochat.com/\”\n }\n \n ]\n }\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “FOOTER”, “text”: “Use the buttons below to visit our website” }, { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “FOOTER”, “text”: “Use the buttons below to visit our website” }, { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear_va_images\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”User_Name\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”Features\”\n }\n ]\n },\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”image\”,\n \”image\”: {\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\n }\n }\n ]\n },\n {\n \”type\”: \”FOOTER\”,\n \”text\”: \”Use the buttons below to visit our website\”\n },\n {\n \”type\”:\”BUTTONS\”,\n \”buttons\”: [\n {\n \”type\”: \”QUICK_REPLY\”,\n \”text\”: \”Unsubscribe from Promos\”\n },\n {\n \”type\”: \”url\”,\n \”text\”: \”Go to link\”,\n \”url\”: \”https://developers.pingtochat.com/\”\n }\n \n ]\n }\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “FOOTER”, “text”: “Use the buttons below to visit our website” }, { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Message with parameters,header ,body ,footer and with buttons PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number, Copy Code) For URL and Phone Number buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_all_buttons", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Hi user" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Points in the Payload Components: Header: Includes an image URL. Body: Contains text with placeholders replaced by dynamic values. Footer: Simple static text. Buttons: Supports two types of buttons: QUICK_REPLY: For quick interactions. URL: Redirects to a specific URL. Parameters: The parameters inside the header and body match the placeholders defined in the template. URL Requirements: The URL in the buttons section must be publicly accessible. Template Approval: Templates (e.g., marketing_all_buutons) must be pre-approved. Response Structure A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "MTA0NDI3" } ], "messages": [ { "id": "kfGlB7LpVI", "message_status": "accepted" } ]} Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns "whatsapp" for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the sent message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., "M2s4da2y4P"). message_status: Type: String Description: The status of the message at the time of the response. Example values include: “accepted” – The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_all_buttons”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_all_buttons”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_all_buttons\”,\n \”language\”: {\n \”code\”: \”en_us\”\n },\n \”components\”: [\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”Hi user\”\n }\n ]\n },\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”Our\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”whatsapp message app\”\n }\n ]\n },\n {\n \”type\”: \”button\”,\n \”sub_type\”: \”quick_reply\”,\n \”index\”: 0,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”Unsubscribe from Promos\”\n }\n ]\n },\n {\n \”type\”: \”button\”,\n \”sub_type\”: \”copy_code\”, \n \”index\”: 1,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”WRETTT\” \n }\n ]\n }\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_all_buttons”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_all_buttons”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_all_buttons\”,\n \”language\”: {\n \”code\”: \”en_us\”\n },\n \”components\”: [\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”Hi user\”\n }\n ]\n },\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”Our\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”whatsapp message app\”\n }\n ]\n },\n {\n \”type\”: \”button\”,\n \”sub_type\”: \”quick_reply\”,\n \”index\”: 0,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”Unsubscribe from Promos\”\n }\n ]\n },\n {\n \”type\”: \”button\”,\n \”sub_type\”: \”copy_code\”, \n \”index\”: 1,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”WRETTT\” \n }\n ]\n }\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_all_buttons”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with header-text and body and button quick-replay PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply) For URL and Phone Number buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxx", "type": "template", "template": { "name": "marketing_h", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_h". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. 1. Button Component Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the type of button. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxx", "wa_id": "91xxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘authToken: eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_h\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“authToken”, “eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“authToken”, “eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_h\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘authToken’: ‘eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with body and button quick-replay PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply) Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "markting_p", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "markting_p". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_p\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_p\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with body , footer and button quick-replay , visit-website and phone-number and copy code PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number, Copy Code) For URL and Phone Number buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "markting_o", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "markting_o". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Copy Code Button Type: button Description: Adds an interactive Copy Code button. sub_type Value: "copy_code" Description: Defines the button as a Copy Code button. "copy_code": Allows users to copy a predefined code. index Type: Integer Description: Position of the button in the template. "1": The second button. parameters Type: `Array** Description: Defines the copy code text. text: "WRETTT" (example code that users can copy). Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_o”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_o”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_o\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_o”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_o”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_o\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_o”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with header-text and body and button quick-replay and visit-website PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL) For URL buttons, they do not need to be included in the example payload request. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxxx", "type": "template", "template": { "name": "marketing_i", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_i". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. 1. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxxx", "wa_id": "91xxxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_i\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_i\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with body and button with quick-replay and visit-website PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL) For URL buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "markting_q", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "markting_q". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: `Array** Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: `Array** Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_q”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_q”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_q\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_q”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_q”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_q\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_q”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with body and button with quick-replay , visit-website , phone-number PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number) For URL and Phone Number buttons, they do not need to be included in the Example code. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "markting_r", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "markting_r". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: `Array** Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: `Array** Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_r\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with header-text , body ,button quick-replay , visit-website and phone-number PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number) For URL and Phone Number buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "markting_j", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_j". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: `Array** Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: `Array** Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_j\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_j\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with body and button with quick-replay , visit-website , phone-number and copy-code PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number, Copy Code) For URL and Phone Number buttons, they do not need to be included in the Example payload. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "markting_s", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "markting_s". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: `Array** Description: Defines the button text. text: "Unsubscribe from Promos" Copy Code Button Type: button Description: Adds a Copy Code button. sub_type Value: "copy_code" Description: Defines the button as a Copy Code button. "copy_code": Allows users to copy a predefined code. index Type: Integer Description: Position of the button in the template. "1": The second button. parameters Type: `Array** Description: Defines the text associated with the Copy Code button. text: "WRETTT" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_s\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_s\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with header-text , body ,button quick-replay , visit-website , phone-number and copy-code PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number, Copy Code) For URL and Phone Number buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_k", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_k". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. 1. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" 2. Copy Code Button Type: button Description: Adds a Copy Code button, which allows users to copy a given promo code. sub_type Value: "copy_code" Description: Allows users to copy a promo code for future use. index Type: Integer Description: Position of the button in the template. "1": The second button. parameters Type: Array Description: Contains the promo code to be copied. text: "WRETTT" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_k”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_k”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_k\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_k”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_k”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_k\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_k”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with header and body Overview A header that dynamically personalizes the message with text. A body that provides additional message content with placeholders for dynamic text. This template is used for sending marketing-related messages to users. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_t", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Hi user" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_t". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "Hi user" – The actual content of the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "MTA0NDQ5" } ], "messages": [ { "id": "KrNLbzOCZb", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } } ‘ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } } ‘, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_t\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_t\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with body , footer and button quick-replay PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply) For URL and Phone Number buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_l", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_l". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_l\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_l\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with header body footer Overview A header that dynamically personalizes the message with text. A body that provides additional message content with placeholders for dynamic text. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is used for sending marketing-related messages. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_u", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Hi user" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_u". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "Hi user" – The actual content of the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_u”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } } ‘ ‘<'+'?'+'php'+ ` ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_u”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } } ‘, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_u\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_u”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_u”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_u\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_u”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter header body,footer,buttons - quick-replay Overview A header that dynamically personalizes the message with text. A body that provides additional message content with placeholders for dynamic text. A Quick Reply Button that allows users to opt out of promotional messages. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is used for sending marketing-related messages with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_v", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Hi user" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_v". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "Hi user" – The actual content of the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_v\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_v\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with body , footer and button quick-replay and visit-website PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL) For URL buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_m", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_m". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_m\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_m\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with body , footer and button quick-replay , visit-website and phone-number PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number, Copy Code) For URL and Phone Number buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxx", "type": "template", "template": { "name": "markting_n", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "markting_n". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_n\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_n\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with header-body-footer , buttons - quick-replay,visit-website,phone-number Overview A header with dynamic text personalization. A body containing the main message text with placeholders for dynamic content. A Quick Reply Button that enables users to opt out of promotional messages. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for sending marketing messages while providing an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_x", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Hi user" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_x". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "Hi user" – The actual content of the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Expected API Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_x\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_x\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with header , body , footer and buttons - quick-replay ,visit website ingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL) For URL buttons, they do not need to be included in the example payload request. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Headers Content-Type: Indicates that the request body is in JSON format. Authorization: A Bearer token for authentication. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_w", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Hi user" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_w". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. 1. Header Component Type: header Description: Displays dynamic text at the top of the message. parameters Type: Array Description: Holds the text parameter for the header. Example: "Hi user" 2. Body Component Type: body Description: Contains the main content of the message. parameters Type: Array Description: Holds dynamic values to personalize the message. Example: "Our" "whatsapp message app" 3. Button Component Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the type of button. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_w”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_w”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_w\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_w”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_w”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_w\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_w”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with header-body-footer , buttons - quick-replay,visit-website,phone-number,copy-code Overview A header with a personalized text greeting. A body containing the main message text. A Quick Reply Button that allows users to opt out of promotional messages. A Copy Code Button that enables users to copy a predefined code. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is ideal for marketing campaigns while giving users an easy way to opt out and use a promotional code. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_y", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Hi user" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_y". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "Hi user" – The actual content of the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Copy Code Button Type: button Description: Adds a Copy Code button. sub_type: "copy_code" index: 1 (Second button in the list) parameters: type: "text" text: "WRETTT" – The predefined code for the user to copy. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_y\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_y\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body footer button - quick replay Overview A body containing the main message text. A Quick Reply Button that allows users to opt out of promotional messages. For URL and Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is ideal for marketing campaigns while giving users an easy way to opt out. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_z", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_z". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_z\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_z\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body footer button - quick-replay ,visit-website and phone-number Overview The marketing_aa template is a WhatsApp Business API message template that includes: A body containing the main message text. A Quick Reply Button that allows users to opt out of promotional messages. Phone Number Used for contact information For URL and Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is useful for marketing messages while providing users with an easy way to opt out. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxxx", "type": "template", "template": { "name": "marketing_aa", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_aa". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxxx", "wa_id": "91xxxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_aa\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_aa\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body footer button - quick-replay ,visit-website, phone-number and copy-code Overview A body containing the main message text. A Quick Reply Button that allows users to opt out of promotional messages. A Phone Number Used for contact information A Copy Code Button that enables users to copy a predefined code (WRETTT). For URL and Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is useful for marketing messages while providing users with interactive options. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_ab", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_ab". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Copy Code Button Type: button Description: Adds a Copy Code button. sub_type: "copy_code" index: 1 (Second button in the list) parameters: type: "text" text: "WRETTT" – The predefined code to be copied. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ab\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ab\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body , button - quick-replay Overview Body with dynamic text placeholders. Quick Reply Button for unsubscribing from promotions. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_ac", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_ac". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ac\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ac\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body , button - quick-replay, visit-website Overview A body containing the main marketing message text. A Quick Reply Button that allows users to unsubscribe from promotional messages. For URL and Phone Number buttons, they do not need to be included in the Example payload. This template is ideal for marketing campaigns that also provide users with an easy way to opt out. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_ad", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_ad". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ad\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ad\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body , button - quick-replay, visit-website, phone-number Overview A body containing the main marketing message text. A Quick Reply Button that allows users to unsubscribe from promotional messages. A Phone Number Used for contact information For URL and Phone Number buttons, they do not need to be included in the Example payload. This template is ideal for marketing campaigns that also provide users with an easy way to opt out. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_ae", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_ae". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ae”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ae”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ae\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ae”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ae”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ae\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ae”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body , button - quick-replay, visit-website, phone-number, copy-code Overview The marketing_af template is a WhatsApp Business API message template used for marketing purposes. It includes: A body containing the main marketing message text. A Quick Reply Button that allows users to unsubscribe from promotional messages. A Phone Number Used for contact information A Copy Code Button that enables users to copy a predefined code (WRETTT). For URL and Phone Number buttons, they do not need to be included in the Example payload. This template is ideal for marketing campaigns that provide users with an interactive experience. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_af", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_af". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Copy Code Button Type: button Description: Adds a Copy Code button. sub_type: "copy_code" index: 1 (Second button in the list) parameters: type: "text" text: "WRETTT" – The predefined code to be copied. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_af\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_af\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body ,footer, button - quick-replay, visit-website Overview A body containing the main marketing message text. A Quick Reply Button that allows users to unsubscribe from promotional messages. A Copy Code Button that enables users to copy a predefined code (WRETTT). For URL and Phone Number buttons, they do not need to be included in the Example payload. This template is ideal for marketing and promotional messages that provide an interactive experience. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_ag", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_ag". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Copy Code Button Type: button Description: Adds a Copy Code button. sub_type: "copy_code" index: 1 (Second button in the list) parameters: type: "text" text: "WRETTT" – The predefined code to be copied. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ag”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ag”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ag\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ag”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ag”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ag\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ag”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body , button - quick replay - visit website Overview A body containing the main marketing message text. A Quick Reply Button that allows users to opt out of promotional messages. This template helps engage users while providing them with an easy way to unsubscribe if they choose. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_ai", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_ai". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ai\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ai\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body , button - phone number - copy code Overview A body containing the main marketing message text. A Copy Code Button, allowing users to copy a promotional code directly. For URL and Phone Number buttons, they do not need to be included in the Example payload. This template is ideal for marketing campaigns where users can quickly receive and use a promotional code. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_aj", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_aj". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Copy Code Button Type: button Description: Adds a Copy Code button for users to copy a promotional code. sub_type: "copy_code" index: 0 parameters: type: "text" text: "WRETTT" – The promotional code displayed. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_aj\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_aj\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter body ,footer, button - quick replay - visit website Overview A body containing the main marketing message text. A Quick Reply Button that allows users to opt out of promotional messages. This template helps engage users while providing them with an easy way to unsubscribe if they choose. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_ak", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_ak". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ak\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ak\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter body ,footer, button - phone number - copy code Overview A body containing the main marketing message text. A Copy Code Button that allows users to copy a promotional code. For URL and Phone Number buttons, they do not need to be included in the Example payload. This template helps engage users while providing them with an easy way to copy promotional codes for offers or discounts. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_al", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "copy_code", "index": 0, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_al". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Copy Code Button Type: button Description: Adds an interactive Copy Code button. sub_type: "copy_code" index: 0 parameters: type: "text" text: "WRETTT" – The code that users can copy. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_al\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_al\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Message with parameters, attachments, and with buttons Description: Send a basic template message with any parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace the placeholders: {{your_domain}}: Your API domain. {{phone_number_id}}: The ID linked to your WhatsApp Business API number. {{key}}: Your API key for authentication.How to create key Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example : { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_newyear_va_images", "language": { "code": "en" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "User_Name" }, { "type": "text", "text": "Features" } ] }, { "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://chat.pingtochat.com/template_media/1736424548.png" } } ] }, { "type": "FOOTER", "text": "Use the buttons below to visit our website" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/" } ] } ] } } Key Points in the Payload Components: header: Includes an image URL. body: Contains text with placeholders replaced by dynamic values. footer: Simple static text. buttons: Supports two types of buttons: QUICK_REPLY: For quick interactions. URL: Redirects to a specific URL. Parameters: The parameters inside header and body match the placeholders defined in the template. URL Requirements: The URL in the buttons section must be publicly accessible. Template Approval: Templates (e.g., marketing_newyear_va_images) must be pre-approved. Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the seMessages Without Buttonsnt message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “FOOTER”, “text”: “Use the buttons below to visit our website” }, { “type”:”BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “FOOTER”, “text”: “Use the buttons below to visit our website” }, { “type”:”BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear_va_images\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”User_Name\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”Features\”\n }\n ]\n },\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”image\”,\n \”image\”: {\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\n }\n }\n ]\n },\n {\n \”type\”: \”FOOTER\”,\n \”text\”: \”Use the buttons below to visit our website\”\n },\n {\n \”type\”:\”BUTTONS\”,\n \”buttons\”: [\n {\n \”type\”: \”QUICK_REPLY\”,\n \”text\”: \”Unsubscribe from Promos\”\n },\n {\n \”type\”: \”url\”,\n \”text\”: \”Go to link\”,\n \”url\”: \”https://developers.pingtochat.com/\”\n }\n \n ]\n }\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “FOOTER”, “text”: “Use the buttons below to visit our website” }, { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “FOOTER”, “text”: “Use the buttons below to visit our website” }, { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_newyear_va_images\”,\n \”language\”: {\n \”code\”: \”en\”\n },\n \”components\”: [\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”User_Name\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”Features\”\n }\n ]\n },\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”image\”,\n \”image\”: {\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\n }\n }\n ]\n },\n {\n \”type\”: \”FOOTER\”,\n \”text\”: \”Use the buttons below to visit our website\”\n },\n {\n \”type\”:\”BUTTONS\”,\n \”buttons\”: [\n {\n \”type\”: \”QUICK_REPLY\”,\n \”text\”: \”Unsubscribe from Promos\”\n },\n {\n \”type\”: \”url\”,\n \”text\”: \”Go to link\”,\n \”url\”: \”https://developers.pingtochat.com/\”\n }\n \n ]\n }\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_newyear_va_images”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “User_Name” }, { “type”: “text”, “text”: “Features” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “FOOTER”, “text”: “Use the buttons below to visit our website” }, { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://developers.pingtochat.com/” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Template Creation Step-by-Step Instructions Navigate to the “Templates” section from the dashboard. Click on “Templates”, then select “WhatsApp”. Click on “Add WhatsApp Template” to begin creating a new template. Template Categories in Pingtochat Pingtochat supports three main template categories, each designed for specific types of communication: 1. Authentication Used for identity verification, such as: OTPs (One-Time Passwords) Login confirmations 2. Marketing Supports both text and media formats. Ideal for promotional campaigns and user engagement using: Rich content Offers Announcements 3. Utility Also supports text and media formats. Best suited for sending: Notifications Reminders Transactional alerts ✉️ Message Types Templates can be created in two main message types: 1. Text Simple, clear, text-only messages for quick communication. 2. Media Rich content messages that can include: Image – Share photos or visuals. Video – Send short video clips. Document – Attach PDFs, Word files, Excel sheets, etc. Button Types Enhance user interaction by adding buttons to your messages. Available types include: Quick Reply Button▪ Offers predefined responses for fast replies. Visit Website Button▪ Directs users to a specific webpage. URL Button▪ Opens a designated URL in the browser. Phone Number Button▪ Enables users to make a direct phone call. WhatsApp Number Button (Call on WhatsApp)▪ Initiates a call directly on WhatsApp to a selected contact. Copy Offer Code Button▪ Lets users copy a promotional or offer code to their clipboard. Whatsapp Template list view image Only templates with Active status can be used to send messages. We also provide options to edit or delete templates. If a template is edited, it will be resubmitted for approval, and the status may take some time to update accordingly. Articles Authentication Message Template Marketing Message Template Utility MessageTemplate Authentication Message Template In Authentication template 3 types are there Zero Tap One Tap Copy Code ZERO TAP Zero-tap authentication templates allow your users to receive one-time passwords or codes via WhatsApp without having to leave your app.’ SAMPLE ZERO TAP TEMPLATE CREATION PAGE image image ONE TAP One-tap autofill authentication templates allow you to send a one-time password or code along with an one-tap autofill button to your users. When a WhatsApp user taps the autofill button, the WhatsApp client triggers an activity which opens your app and delivers it the password or code. SAMPLE ONE TAP TEMPLATE CREATION PAGE image image COPY CODE Copy code authentication templates allow you to send a one-time password or code along with a copy code button to your users. When a WhatsApp user taps the copy code button, the WhatsApp client copies the password or code to the device’s clipboard. The user can then switch to your app and paste the password or code into your app. SAMPLE ONE TAP TEMPLATE CREATION PAGE image image Marketing Message Template In marketing template creation, you can create templates with either a text header or a media header. For text headers, you can include one dynamic parameter. image image with button image Utility MessageTemplate In utility template creation, you can create templates with either a text header or a media header. For text headers, you can include one dynamic parameter. image image with button image After completing your template creation, you will be redirected to the Template List page, where all the templates you have created will be displayed. If you encounter any issues, you can raise a support ticket to the admin for assistance.
Raise a Support Ticket If you’re experiencing issues or need assistance, you can raise a support ticket by following these steps: Navigate to the “Support” section in the dashboard. Click on “Raise a Ticket”. Select the issue type from the dropdown list. Enter a detailed message describing your issue or request. Click the “Raise a Ticket” button to submit your support request. Once submitted, you can track and view all your tickets, along with responses, directly from the same section. Image Ticket List and Chat View All your submitted tickets will be listed on the Ticket List page. Click the “View” button next to any ticket to open it. You can see the full conversation and messages in a chat-style interface for easy tracking and replies. image We also provide a Sales Enquiry form for users interested in our services. Users can fill out the form with their details and submit it. Once submitted, our team will review the enquiry and provide further updates or assistance accordingly.
SEO Configuration You can manage your site’s SEO settings from Admin How to setup Navigate to Admin in dashboard Go to SEO Click to Add SEO This section allows you to optimize your website for search engines by configuring the following: Meta Title – Set the title that appears in browser tabs and search engine results. Meta Description – Add a short summary that describes your page content for search engines. Keywords – Define relevant keywords to improve search visibility. Make sure to regularly update these settings to improve your website’s search engine ranking and visibility.
Utility Template Message API Overview Utility templates on WhatsApp are specifically designed to provide functional and transactional support for existing orders or accounts. These templates are pre-approved by WhatsApp to ensure they meet compliance guidelines and are not used for promotional or marketing purposes. Below is the documentation detailing their usage, structure, and limitations. Key Characteristics of Utility Templates Purpose: To provide updates related to a customer’s existing order or account. Includes transactional messages such as: Order confirmations. Shipping updates. Account notifications (e.g., password reset). Restrictions: Cannot be used for marketing or promotional purposes. Only supports transactional and service-related use cases. Compliance: Must comply with WhatsApp’s Business Policy. Requires prior approval in WhatsApp Business Manager. Components of a Utility Template Utility templates can consist of the following dynamic and static elements: 1. Header (Optional) Type: Text, Image, Video, or Document. Purpose: To highlight the primary content of the message. Example: Including an order invoice or a delivery tracking image. 2. Body (Required) Type: Text. Purpose: Contains the main content of the message. Example: “Your order #12345 has been shipped. Track your delivery here: [tracking link].” “Your account password was successfully changed.” 3. Footer (Optional) Type: Text. Purpose: Adds additional context, disclaimers, or legal information. Example: “For assistance, reply HELP or contact our support.” 4. Buttons (Optional) Types: Quick Reply ,URL and Phone Number. Purpose: To enhance interactivity by providing actionable options. Quick Reply: For user responses (e.g., “Need Assistance”). URL: Redirect to a webpage (e.g., “Track Your Order”). Phone: Contact number or Company Phone number (e.f., +919xxxxxxxxx). Articles Message without parameter Message with parameter Message without parameter with attachment Message with parameter and attachment Message without parameters and with buttons Message with parameters, attachments, and with buttons No parameter with header , body , footer and buttons - quick replay No parameter with header-text and body and footer Message with parameters header body footer and with buttons No parameter header , body , footer and buttons - quick-replay ,visit website No parameter header , body , footer and buttons - quick-replay ,visit-website,phone-number No parameter body,footer and buttons - quick-replay No parameter body,footer and buttons - quick-replay,visit-website No parameter body,footer and buttons - quick-replay,visit-website,phone-number Template without parameter body,footer and buttons - quick-replay,visit-website No parameter body,footer and buttons - phone number No parameter body,buttons - quick-replay No parameter body,buttons - quick-replay,visit-website No parameter body,buttons - quick-replay,visit-website,phone-number No parameter body,buttons - quick-replay,visit-website Parameter with header and body Parameter with header,body,footer Parameter with header,body,footer buttons - quick-replay Parameter with header,body,footer buttons - quick-replay,visit-website Parameter with header,body,footer buttons - quick-replay,visit-website,phone-number Parameter with body,footer buttons - quick-replay Parameter with body,footer buttons - quick-replay,visit-website Parameter with body,footer buttons - quick-replay,visit-website,phone-number Parameter with body,footer buttons - phone-number Parameter with body buttons - quick-replay Parameter with body buttons - quick-replay,visit-website Parameter with body buttons - quick-replay,visit-website,phone-number Parameter with body buttons - phone-number Message without parameter Description: Send a basic template message without any parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace the placeholders: {{your_domain}}: Your API domain. {{phone_number_id}}: The ID linked to your WhatsApp Business API number. {{key}}: Your API key for authentication.How to create key Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example : { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_templates", "language": { "code": "en" }, "components": [ ] } } Field Descriptions: messaging_product: Always "whatsapp" for WhatsApp messaging. recipient_type: "individual" for single-user messages. to: Recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx for an Indian number). type: "template" for template messages. template: Contains details about the template: name: Name of the pre-approved template (utility_templates in this case). language: Specifies the language code. code: Language code for the template (e.g., en for English). components: An array for dynamic content or interactive elements (leave empty for simple messages). Example Response When the API processes the request successfully, it returns a response similar to this: CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxx…….’ \ –data ‘{ “messaging_product”: “whatsapp”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_a”, “language”: { “code”: “en_us” }, “components”: [ ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://${domain}/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS => ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “whatsapp:+${toNumber}”, “type”: “template”, “template”: { “name”: “${selectedTemplateName}”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: ${JSON.stringify(parameters)} } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: ${userToken}’, ‘Content-Type: application/json’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”to\”: \”919946371505\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”utility_a\”,\n \”language\”: {\n \”code\”: \”en_us\”\n },\n \”components\”: [\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://app.pingtochat.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://app.pingtochat.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_a”, “language”: { “code”: “en_us” }, “components”: [] } }) response = https.request(request) puts response.read_body import http.client import json conn = http.client.HTTPSConnection(“app.pingtochat.com”) payload = json.dumps({ “messaging_product”: “whatsapp”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_a”, “language”: { “code”: “en_us” }, “components”: [] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ } conn.request(“POST”, “/api/v1.0/phone_number_id/key/messages”, payload, headers) res = conn.getresponse() data = res.read() print(data.decode(“utf-8”)) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://app.pingtochat.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”to\”: \”919946371505\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”utility_a\”,\n \”language\”: {\n \”code\”: \”en_us\”\n },\n \”components\”: [\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://app.pingtochat.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_a”, “language”: { “code”: “en_us” }, “components”: [] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "ODIxMTg=" } ], "messages": [ { "id": "4gmNEgkX7r", "message_status": "accepted" } ] } Response Details: contacts: input: The phone number you provided in the to field. wa_id: WhatsApp ID of the recipient. status_id: A unique identifier for the status of this contact. messages: id: A unique ID for the message. message_status: Status of the message (e.g., "accepted"). Message with parameter Description: Send a template message that includes dynamic text parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace the placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your API domain. {{phone_number_id}}: The ID linked to your WhatsApp Business API number. Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_template_variable", "language": { "code": "en" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "User_Name" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "adv45667" } ] } ] } } Field Breakdown: messaging_product: Specifies the messaging product, always "whatsapp". recipient_type: "individual" for single-user messages. to: The recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx). type: "template" for sending a template message. template: name: The name of the pre-approved template (marketing_newyear_va in this case). language: code: The language code of the template (e.g., en for English). components: type: Specifies the part of the template being populated. Use "body" for main content placeholders. parameters: Contains dynamic data to replace placeholders in the template: type: The type of data (e.g., "text"). text: The value that replaces the placeholder in the template. Dynamic Parameters and Placeholders Templates can include dynamic placeholders represented as variables like {{1}}, {{2}}, etc. Each placeholder is replaced by the corresponding value in the parameters array. Template Example: Template name: utility_template_variableTemplate content: Hi {{1}}, Your Order number {{2}} is 24-oct-2024 delevered Example: "parameters": [ { "type": "text", "text": "user_name" // Replaces {{1}} }, { "type": "text", "text": "adv45667" // Replaces {{2}} } ] Resulting message: Hi user_name, Your Order number adv45667 is 24-oct-2024 delevered. Response Structure A successful API call returns a 200 OK response with details about the sent message. Example Response: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "ODIxMTc=" } ], "messages": [ { "id": "SD7mtgA4PH", "message_status": "accepted" } ] } Response Details: contacts: input: The phone number from the to field. wa_id: WhatsApp ID of the recipient. status_id: Identifier for the delivery status. messages: id: A unique identifier for the message. message_status: Status of the message, e.g., "accepted". Notes and Best Practices Pre-approved Templates: Templates must be created and approved in the WhatsApp Business Manager. Ensure placeholders ({{1}}, {{2}}, etc.) align with the payload. Dynamic Content: Use the parameters array to customize messages. Include text, media, or buttons as required by your template. Language Codes: Match the language code with the template’s approved language. Full list of ISO 639-1 codes. Testing: Use a sandbox environment to test integrations. Validate payloads and monitor logs for issues. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxx……’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_b”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } } ‘ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_b”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } } ‘, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxx…..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_b\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxx……….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxx………” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_b”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_b”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxx…………’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/keymessages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxx………”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_b\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxx………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_b”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Message without parameter with attachment Description: Send a template message without dynamic text parameters and with an image attachment in the header. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Example: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_attachment", "language": { "code": "en" }, "components": [ { "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://developers.pingtochat.com/template_media/1736424548.png" } } ] } ] } } Field Descriptions General Fields messaging_product: (string) Always whatsapp. recipient_type: (string) Set to individual for one-to-one messages. to: (string) The recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx). type: (string) Always template. Template Object name: (string) The name of the pre-approved template (e.g., utility_attachment). language: (object) Specifies the language for the template. code: (string) The language code (e.g., en for English). Components Array Header: type: (string) Always header for attachments. parameters: (array) Holds the media or placeholders for the header. type: (string) Always image for images. image: (object) Contains the image details. link: (string) URL of the image (e.g., https://chat.pingtochat.com/template_media/1736424548.png). Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc="marketing_newyear_va_images } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the sent message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘authToken: xxxxxxxxxxx…….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxx……’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } } ‘ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } } ‘, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxxxx………’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxx………’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_variables_attachment\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n \r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”image\”,\r\n \”image\”: {\r\n \”link\”: \”https://example.com/template_media/1736424548.png\”\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxxx……….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxxxx…………” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxx…………” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………..’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx…………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxxxxx………..”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxxxxx……………”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_variables_attachment\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n \r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”image\”,\r\n \”image\”: {\r\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxx………………’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx………………’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Message with parameter and attachment Description: Send a template message with dynamic text parameters and an image attachment in the header. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Example: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_variables_attachment", "language": { "code": "en" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12345" } ] }, { "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://chat.pingtochat.com/template_media/1736424548.png" } } ] } ] } } Field Descriptions General Fields messaging_product: (string) Always whatsapp. recipient_type: (string) Set to individual for one-to-one messages. to: (string) The recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx). type: (string) Always template. Template Object name: (string) The name of the pre-approved template (e.g., utility_variables_attachment). language: (object) Specifies the language for the template. code: (string) The language code (e.g., en for English). Components Array Header: type: (string) Always header for attachments. parameters: (array) Holds the media or placeholders for the header. type: (string) Always image for images. image: (object) Contains the image details. link: (string) URL of the image (e.g., https://chat.pingtochat.com/template_media/1736424548.png). Body: type: (string) Always body for the main text content. parameters: (array) Holds the placeholders to populate the template. type: (string) Always text. text: (string) The value to replace placeholders (e.g.,"12345"). Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the sent message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘authToken: xxxxxxxxxxxx…………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxx…………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } } ‘ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } } ‘, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxx…………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxx…………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_b\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxx……….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxx…………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxx…………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxx…………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx…………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxx…………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxx…………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_variables_attachment\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12345\”\r\n }\r\n \r\n ]\r\n },\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”image\”,\r\n \”image\”: {\r\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxx…………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx…………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Message without parameters and with buttons Description: Send a template message without dynamic text parameters attachment with buttons message . Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Example: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_button", "language": { "code": "en" }, "components": [ { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://chat.pingtochat.com/" } ] } ] } } Field Descriptions messaging_product Description: Indicates the messaging platform being used. Value: "whatsapp" (signifies this is a WhatsApp message). recipient_type Description: Defines the type of recipient. Value: "individual" (the message is sent to an individual user). to Description: The recipient’s phone number in international format. Value: "91xxxxxxxxxx" (replace with the intended recipient’s phone number). type Description: Specifies the type of message being sent. Value: "template" (indicates this is a pre-approved template message). template Description: The container for the template message configuration. Fields within template name Description: The unique name of the pre-approved template on WhatsApp. Value: "utility_button". language Description: Specifies the language in which the template message is sent. Fields: code: Description: The language code for the message. Value: "en" (English). components Description: Contains the dynamic parts of the template, such as text variables or buttons. Fields within components type Description: The type of dynamic component being used. Value: "BUTTONS" (indicates that this template contains buttons). buttons Description: An array of button configurations for the message. Fields within buttons Each button object in the buttons array has the following fields: For Button 1: Quick Reply type: Description: The type of button. Value: "QUICK_REPLY" (a button that sends a predefined reply when clicked). text: Description: The text displayed on the button. Value: "Unsubscribe from Promos". For Button 2: URL type: Description: The type of button. Value: "url" (a button that redirects to an external link when clicked). text: Description: The text displayed on the button. Value: "Go to link". url: Description: The URL the button opens when clicked. Value: "https://chat.pingtochat.com/". Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the sent message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxx………..’ \ –header ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx………..’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_d”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_d”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxx………..’, ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx………..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”919946371505\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_d\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n },\r\n {\r\n \”type\”: \”url\”,\r\n \”text\”: \”Go to link\”,\r\n \”url\”: \”https://chat.pingtochat.com/\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxx………..”) .addHeader(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxx………..” request[“Cookie”] = “XSRF-TOKEN=xxxxxxxxxxx………..” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_d”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_d”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxx………..”); request.Headers.Add(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx………..”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”919946371505\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_d\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n },\r\n {\r\n \”type\”: \”url\”,\r\n \”text\”: \”Go to link\”,\r\n \”url\”: \”https://chat.pingtochat.com/\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_d”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Message with parameters, attachments, and with buttons Description: Send a template message with dynamic text parameters attachment with buttons message . Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Example: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_full_template", "language": { "code": "en" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12345" } ] }, { "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://chat.pingtochat.com/template_media/1736424548.png" } } ] }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://chat.pingtochat.com/" } ] } ] } } Field Descriptions messaging_product Description: Indicates the messaging platform being used. Value: "whatsapp" (specific to WhatsApp). recipient_type Description: Defines the type of recipient. Value: "individual" (indicates the message is for an individual). to Description: The recipient’s WhatsApp phone number in international format. Value: "919946371505" (replace with the intended recipient’s phone number). type Description: Specifies the type of message being sent. Value: "template" (indicates this is a template message). template Description: Contains the details of the template message. Fields within template name Description: The unique name of the pre-approved template. Value: "utility_full_template". language Description: Specifies the language in which the template is sent. Fields: code: Description: The language code. Value: "en" (English). components Description: Defines the dynamic parts of the template, such as text, images, and buttons. Fields within components type: body Description: Defines the message body. Fields: parameters: Description: Contains dynamic values to populate the body text. Subfields: type: Description: Type of the parameter. Value: "text" (indicates this is text content). text: Description: The dynamic text content to include in the message. Value: "12345" (can be replaced with relevant dynamic content). type: header Description: Defines the message header, which can contain media (images, videos, or documents) or text. Fields: parameters: Description: Contains the dynamic media or text for the header. Subfields: type: Description: Type of the parameter. Value: "image" (indicates the header contains an image). image: Description: Contains details about the image. Subfield: link: Description: The URL of the image to include in the header. Value: "https://chat.pingtochat.com/template_media/1736424548.png". type: BUTTONS Description: Defines interactive buttons in the message. Fields: buttons: Description: An array of buttons to include in the message. Subfields: For Button 1: Quick Reply type: Description: The type of button. Value: "QUICK_REPLY" (sends a predefined response when clicked). text: Description: The text displayed on the button. Value: "Unsubscribe from Promos". For Button 2: URL type: Description: The type of button. Value: "url" (redirects to a URL when clicked). text: Description: The text displayed on the button. Value: "Go to link". url: Description: The URL the button redirects to. Value: "https://chat.pingtochat.com/". Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the sent message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxx…………..’ \ –header ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx…………..’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_full_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”:”BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_full_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”:”BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxx…………..’, ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx…………..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_full_template\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12345\”\r\n }\r\n \r\n ]\r\n },\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”image\”,\r\n \”image\”: {\r\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”:\”BUTTONS\”,\r\n \”buttons\”: [\r\n {\r\n \”type\”: \”QUICK_REPLY\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n },\r\n \r\n {\r\n \”type\”: \”url\”,\r\n \”text\”: \”Go to link\”,\r\n \”url\”: \”https://chat.pingtochat.com/\”\r\n \r\n }\r\n ]\r\n } \r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxx…………..”) .addHeader(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx…………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxx…………..” request[“Cookie”] = “XSRF-TOKEN=xxxxxxxxxxx…………..” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_full_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_full_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx…………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx…………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxx…………..”); request.Headers.Add(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx…………..”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_full_template\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12345\”\r\n }\r\n \r\n ]\r\n },\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”image\”,\r\n \”image\”: {\r\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”:\”BUTTONS\”,\r\n \”buttons\”: [\r\n {\r\n \”type\”: \”QUICK_REPLY\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n },\r\n \r\n {\r\n \”type\”: \”url\”,\r\n \”text\”: \”Go to link\”,\r\n \”url\”: \”https://chat.pingtochat.com/\”\r\n \r\n }\r\n ]\r\n } \r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx…………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx…………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_full_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with header , body , footer and buttons - quick replay Request URL POST http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace the placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your API domain. {{phone_number_id}}: The ID linked to your WhatsApp Business API number. Headers Content-Type: Specifies that the request body is in JSON format. Authorization: A Bearer token is required for authentication. Example Payload { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_h", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } 6. Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_h". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Button Component Type: button Description: This component allows interactive Quick Replies. sub_type Value: "quick_reply" Description: Defines the type of button. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxx…………..’ \ –header ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx…………..’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxx…………..’, ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx…………..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_h\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxx…………..”) .addHeader(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx…………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxx…………..” request[“Cookie”] = “XSRF-TOKEN=xxxxxxxxxxx…………..” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx…………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx…………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxx…………..”); request.Headers.Add(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx…………..”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_h\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx…………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx…………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter with header-text and body and footer Endpoint: POST http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace the placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your API domain. {{phone_number_id}}: The ID linked to your WhatsApp Business API number. Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_g", "language": { "code": "en_us" }, "components": [ ] } } 6. Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_g". template.language.code Type: String Description: Language code for the template. The value should match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: This field is empty ([]) since the utility_g template does not include any dynamic content. 7. Expected API Response When the request is successful, the API will return an HTTP 200 OK status along with the following JSON response: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp" to indicate the platform. contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier representing the status of the message. messages Type: Array Description: Contains information about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the status of the message processing. "accepted" – The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxx……….’ \ –header ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx……….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_g”, “language”: { “code”: “en_us” }, “components”: [ ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_g”, “language”: { “code”: “en_us” }, “components”: [ ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxx……….’, ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx……….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_g\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxx……….”) .addHeader(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx……….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxx……….” request[“Cookie”] = “XSRF-TOKEN=xxxxxxxxxxx……….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_g”, “language”: { “code”: “en_us” }, “components”: [] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_g”, “language”: { “code”: “en_us” }, “components”: [] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx……….’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx……….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxx……….”); request.Headers.Add(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx……….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_g\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx……….’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx……….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_g”, “language”: { “code”: “en_us” }, “components”: [] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Message with parameters header body footer and with buttons PingtoChat’s Utility Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number) For URL and Phone Number buttons, they do not need to be included in the response. Endpoint: POST http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_ab", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "p2c" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components 1. Header Type: Text Content: "p2c" Purpose: Displays a short heading or key identifier. 2. Body Type: Text Content: "12CR007" Purpose: Contains the main message content. 3. Buttons Type: Quick Reply Text: "Unsubscribe from Promos" Purpose: Allows users to quickly opt out of promotional messages. Response Structure A successful request will return an HTTP status code of 200 OK along with the following response: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "MTA0NDI4" } ], "messages": [ { "id": "8Eb8pQg0Xl", "message_status": "accepted" } ] } Field Descriptions messaging_product Type: String Description: Indicates the messaging platform. Always returns "whatsapp". contacts Type: Array Description: Contains information about the message recipient. Fields: input: Type: String Description: The phone number used in the API request. wa_id: Type: String Description: The WhatsApp ID associated with the phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages Type: Array Description: Contains details about the sent message. Fields: id: Type: String Description: A unique identifier for the message sent. message_status: Type: String Description: The status of the message at the time of the response. Example values include: "accepted" – The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxx…………..’ \ –header ‘Cookie: XSRF-TOKEN=xxxxxxxxxxxx…………..’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxx…………..’, ‘Cookie: XSRF-TOKEN=xxxxxxxxxxxx…………..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ab\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxx…………..”) .addHeader(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxxx…………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxx…………..” request[“Cookie”] = “XSRF-TOKEN=xxxxxxxxxxxx…………..” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx…………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxxx…………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxx…………..”); request.Headers.Add(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxxx…………..”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ab\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx…………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxxx…………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter header , body , footer and buttons - quick-replay ,visit website Overview A Quick Reply Button This ensures a seamless user experience by giving them control over their messaging preferences. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_i", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_i". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 parameters: type: "text" text: "Unsubscribe" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "MTA0NDUw" } ], "messages": [ { "id": "ILHxFrzvI0", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe ” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe ” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_b\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxx……….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe ” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe ” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_i\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe \”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe ” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter header , body , footer and buttons - quick-replay ,visit-website,phone-number Overview A Quick Reply Button A URL A Phone Number For URL and Phone Number buttons, they do not need to be included in the Example payload. This template provides a user-friendly way to manage marketing preferences. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_j", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_j". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxx……….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxx……….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_j\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxx……….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxx……….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxx……….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxx……….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_j\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxx……….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter body,footer and buttons - quick-replay Overview A Quick Reply Button that allows users to unsubscribe from promotional messages. This template enhances user interaction by providing a simple opt-out option for promotional content. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_l", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_l". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "MTA0NDUw" } ], "messages": [ { "id": "ILHxFrzvI0", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxx…………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxx…………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_l\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxx…………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxx…………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx…………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxx…………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_l\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx…………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter body,footer and buttons - quick-replay,visit-website Overview A Quick Reply Button that allows users to unsubscribe from promotional messages. A URL for visiting their website For URL buttons, they do not need to be included in the Example payload. This template enhances user engagement by giving users a quick and easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_m", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_m". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "MTA0NDUw" } ], "messages": [ { "id": "ILHxFrzvI0", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxxxx…………..’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxxxx…………..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_m\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxxxx…………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxxxx…………..” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxxx…………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxxxx…………..”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_m\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxxx…………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter body,footer and buttons - quick-replay,visit-website,phone-number Overview The utility_n template is a WhatsApp Business API message template designed for utility-based messaging. It includes: A Quick Reply Button that allows users to unsubscribe from promotional messages. A URL Button A Phone Number Button For URL and Phone Number buttons, they do not need to be included in the Example payload. This template enhances user engagement by providing an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_n", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_n". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "MTA0NDUw" } ], "messages": [ { "id": "ILHxFrzvI0", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_n\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_n\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Template without parameter body,footer and buttons - quick-replay,visit-website Overview A Quick Reply Button that enables users to opt out of promotional messages easily. A URL for visiting their website For URL buttons, they do not need to be included in the Example payload. This template is ideal for sending service-related updates while providing a simple opt-out mechanism. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_p", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_p". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_id_key/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_id_key/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_p\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_id_key/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_id_key/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_id_key/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_id_key/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_p\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_id_key/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter body,footer and buttons - phone number Overview A Phone Number For calling For Phone Number buttons, they do not need to be included in the Example payload. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_qqq", "language": { "code": "en_us" }, "components": [ ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_qqq". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. In this case, the array is empty ([]), meaning there are no additional components such as headers, body text, or buttons. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx…………’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_qqq”, “language”: { “code”: “en_us” }, “components”: [ ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_qqq”, “language”: { “code”: “en_us” }, “components”: [ ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx…………’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_qqq\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx…………”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx…………” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_qqq”, “language”: { “code”: “en_us” }, “components”: [] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_qqq”, “language”: { “code”: “en_us” }, “components”: [] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx…………’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx…………”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_qqq\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx…………’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_qqq”, “language”: { “code”: “en_us” }, “components”: [] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter body,buttons - quick-replay Overview A Quick Reply Button that enables users to opt out of promotional messages. This template is suitable for sending service notifications while providing an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_r", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_r". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx…………’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx…………’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_r\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx…………”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx…………” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx…………’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx…………”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_r\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx…………’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter body,buttons - quick-replay,visit-website Overview A Quick Reply Button that enables users to opt out of promotional messages. A URL for visiting their website For URL buttons, they do not need to be included in the Example payload. This template is suitable for sending service notifications while providing an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_s", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_s". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxxxxxxx………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxxxxxxx………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_s\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxxxxxxx………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxxxxxxx………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxxxxxx………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxxxxxxx………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_s\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxxxxxx………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter body,buttons - quick-replay,visit-website,phone-number The utility_t template is a WhatsApp Business API message template designed for utility and service-related notifications. It includes: A Quick Reply Button that allows users to opt out of promotional messages. A URL for visiting their website A Phone Number For calling For URL and Phone Number buttons, they do not need to be included in the Example payload. This template is suitable for sending important service messages while providing an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_t", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_t". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxxx…………..’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxxx…………..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_t\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxxx…………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxxx…………..” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxx…………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxxx…………..”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_t\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxx…………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); No parameter body,buttons - quick-replay,visit-website Overview A Quick Reply Button that allows users to opt out of promotional messages. A URL for visiting their website For URL buttons, they do not need to be included in the Example payload. This template is suitable for sending important service messages while providing an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_v", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_v". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxxx…………..’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxxx…………..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_v\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxxx…………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxxx…………..” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxx…………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxxx…………..”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_v\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxx…………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with header and body Overview A header with dynamic text personalization. A body containing key details with placeholders for dynamic content. This template is ideal for transactional messages, customer updates, and service notifications. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_x", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "p2c" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_x". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "p2c" – Dynamic text used in the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }’ ‘<'+'?'+'php'+ ` ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_x\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_x\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with header,body,footer Overview A header with dynamic text. A body containing the main message text with placeholders for dynamic content. A Footer The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for transactional messages, order confirmations, or customer updates. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_y", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "p2c" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_y". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "p2c" – Dynamic text used in the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_y\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_y\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with header,body,footer buttons - quick-replay Overview A header with dynamic text. A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_z", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "p2c" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_z". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "p2c" – Dynamic text used in the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_z\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_z\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with header,body,footer buttons - quick-replay,visit-website Overview A header with dynamic text. A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. A URL for visiting their website For URL and Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_aa", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "p2c" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_aa". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "p2c" – Dynamic text used in the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_aa\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_aa\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with header,body,footer buttons - quick-replay,visit-website,phone-number Overview A header with dynamic text. A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. A URL for visiting their website A Phone Number For URL and Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_ab", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "p2c" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_ab". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "p2c" – Dynamic text used in the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”919946371505\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ab\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”); request.Headers.Add(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”919946371505\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ab\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body,footer buttons - quick-replay Overview A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_ac", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_ac". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. 7. Expected API Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ac\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ac\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body,footer buttons - quick-replay,visit-website Overview A header with dynamic text. A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. A URL for visiting their website For URL and Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxxx", "type": "template", "template": { "name": "utility_ad", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_ad". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ad\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ad\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body,footer buttons - quick-replay,visit-website,phone-number Overview A header with dynamic text. A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. A URL for visiting their website A Phone Number for calling For URL and Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_af", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_af". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_af\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_af\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body,footer buttons - phone-number Overview A body containing the main message text with placeholders for dynamic content. A URL for visiting their website For Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_ai", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] } ] } } Key Components in the Payload ✅ messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". ✅ recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. ✅ to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). ✅ type Type: String Description: Defines the type of message. Always set to "template". ✅ template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_ai". ✅ template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). ✅ components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ai\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ai\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body buttons - quick-replay Overview A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_aj", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_aj". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_aj\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_aj\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body buttons - quick-replay,visit-website Overview A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. A URL for visiting their website For URL buttons, they do not need to be included in the Example payload. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_ak", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_ak". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ak\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ak\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body buttons - quick-replay,visit-website,phone-number Overview A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. A URL for visiting their website A Phone Number for calling For URL and Phone Number buttons, they do not need to be included in the Example payload. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_al", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_al". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_al\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_al\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); Parameter with body buttons - phone-number Overview A body containing the main message text with placeholders for dynamic content. A Phone Number for calling For Phone Number buttons, they do not need to be included in the Example payload. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method:s POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_ah", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] } ] } } Explanation of Fields messaging_product Type: string Value: "whatsapp" Description: Defines the messaging platform. recipient_type Type: string Value: "individual" Description: Indicates a one-on-one message. to Type: string Example: "91xxxxxxxxxx" Description: The recipient’s WhatsApp number in international format. type Type: string Value: "template" Description: Defines this as a template message. template.name Type: string Value: "utility_ah" Description: Name of the pre-approved WhatsApp template. template.language.code Type: string Value: "en_us" Description: Language of the template. components Type: array Description: Contains message elements. Body Component Type: "body" Description: Contains the main message text. Parameters: Type: "text" Value: "12CR007" – Dynamic text inserted into the message. Expected API Response On success, WhatsApp returns a 200 OK response: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ah”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ah”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ah\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ah”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ah”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ah\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ah”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Message with parameters,header ,body ,footer and with buttons PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number, Copy Code) For URL and Phone Number buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_all_buttons", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Hi user" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Points in the Payload Components: Header: Includes an image URL. Body: Contains text with placeholders replaced by dynamic values. Footer: Simple static text. Buttons: Supports two types of buttons: QUICK_REPLY: For quick interactions. URL: Redirects to a specific URL. Parameters: The parameters inside the header and body match the placeholders defined in the template. URL Requirements: The URL in the buttons section must be publicly accessible. Template Approval: Templates (e.g., marketing_all_buutons) must be pre-approved. Response Structure A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "MTA0NDI3" } ], "messages": [ { "id": "kfGlB7LpVI", "message_status": "accepted" } ]} Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns "whatsapp" for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the sent message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., "M2s4da2y4P"). message_status: Type: String Description: The status of the message at the time of the response. Example values include: “accepted” – The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_all_buttons”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_all_buttons”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_all_buttons\”,\n \”language\”: {\n \”code\”: \”en_us\”\n },\n \”components\”: [\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”Hi user\”\n }\n ]\n },\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”Our\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”whatsapp message app\”\n }\n ]\n },\n {\n \”type\”: \”button\”,\n \”sub_type\”: \”quick_reply\”,\n \”index\”: 0,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”Unsubscribe from Promos\”\n }\n ]\n },\n {\n \”type\”: \”button\”,\n \”sub_type\”: \”copy_code\”, \n \”index\”: 1,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”WRETTT\” \n }\n ]\n }\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_all_buttons”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_all_buttons”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”recipient_type\”: \”individual\”,\n \”to\”: \”91xxxxxxxxxx\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”marketing_all_buttons\”,\n \”language\”: {\n \”code\”: \”en_us\”\n },\n \”components\”: [\n {\n \”type\”: \”header\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”Hi user\”\n }\n ]\n },\n {\n \”type\”: \”body\”,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”Our\”\n },\n {\n \”type\”: \”text\”,\n \”text\”: \”whatsapp message app\”\n }\n ]\n },\n {\n \”type\”: \”button\”,\n \”sub_type\”: \”quick_reply\”,\n \”index\”: 0,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”Unsubscribe from Promos\”\n }\n ]\n },\n {\n \”type\”: \”button\”,\n \”sub_type\”: \”copy_code\”, \n \”index\”: 1,\n \”parameters\”: [\n {\n \”type\”: \”text\”,\n \”text\”: \”WRETTT\” \n }\n ]\n }\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_all_buttons”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Raise a Support Ticket If you’re experiencing issues or need assistance, you can raise a support ticket by following these steps: Navigate to the “Support” section in the dashboard. Click on “Raise a Ticket”. Select the issue type from the dropdown list. Enter a detailed message describing your issue or request. Click the “Raise a Ticket” button to submit your support request. Once submitted, you can track and view all your tickets, along with responses, directly from the same section. Image Ticket List and Chat View All your submitted tickets will be listed on the Ticket List page. Click the “View” button next to any ticket to open it. You can see the full conversation and messages in a chat-style interface for easy tracking and replies. image We also provide a Sales Enquiry form for users interested in our services. Users can fill out the form with their details and submit it. Once submitted, our team will review the enquiry and provide further updates or assistance accordingly.
Sales Enquiry If you’re interested in our services, you can easily submit a Sales Enquiry through the dashboard. 📝 Steps to Submit a Sales Enquiry: Navigate to the “Sales Enquiry” section in the dashboard. Click on “Sales”. Fill in the required details in the Sales Enquiry Form. Click “Save” to submit your enquiry. Our team will review your request and get back to you with the necessary updates and information. image Once submitted, our team will review your request and get back to you with the necessary information or next steps.
WhatsApp Package An admin can create a package only if the main admin has already been assigned a package. Admins can create packages for sending WhatsApp messages. We also provide a default package for admins, where you can add a surcharge for each message category—such as Authentication, Utility, and Marketing—based on the country name and country code. How to create package Navigate to WhatsApp Package in dashboard Select Package Create image Set Package to User Admins need to assign a package to their users in order to enable message sending. To do this, select the user, choose a package, and assign it accordingly. How to assign package to user Navigate to WhatsApp Package in dashboard Select Set Package If the selected user already has a package assigned, it will be displayed in the list. Otherwise, no package will be shown. You can also assign or update a new package for the same user. Package Listing When selecting a package, the full details of that package will be displayed. Navigate to WhatsApp Package in dashboard Select Package List
No parameter with header-text and body and button quick-replay PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply) For URL and Phone Number buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxx", "type": "template", "template": { "name": "marketing_h", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_h". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. 1. Button Component Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the type of button. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxx", "wa_id": "91xxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘authToken: eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_h\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“authToken”, “eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“authToken”, “eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_h\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘authToken’: ‘eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Authentication Template Creation API Articles Zero-Tap Template Auto-Fill Template Copy-Code Template Zero-Tap Template This document provides detailed information about the Authentication Template used for secure verification purposes. These templates allow businesses to send structured messages to users for authentication via one-time passcodes (OTPs). Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: zero_tap_auth_template_one Language: en_US (English – United States) Category: AUTHENTICATION Message Send TTL: 60 seconds Allow Category Change: No Components The zero_tap_auth_template_one consists of a Body, Footer, and Buttons component. Body Type: BODY Security Recommendation: true Purpose: Includes an OTP and a security recommendation advising users to keep their verification code confidential. Footer Type: FOOTER Code Expiration: 5 minutes Purpose: Informs the user of the OTP validity period. Buttons Type: BUTTONS Buttons: Type: otp OTP Type: zero_tap Text: Copy Code Autofill Text: Autofill Zero-Tap Terms Accepted: true Supported Apps: Package Name: app.pingtochat.com Signature Hash: K8a/AINcGX7 Sample Request { "name": "zero_tap_auth_template_one", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "zero_tap", "text": "Copy Code", "autofill_text": "Autofill", "zero_tap_terms_accepted": true, "supported_apps": [ { "package_name": "app.pingtochat.com", "signature_hash": "K8a/AINcGX7" } ] } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "AUTHENTICATION" } Notes This template is designed specifically for authentication purposes, including account verification and secure access. The Zero-Tap Autofill feature enhances user experience by reducing manual entry. The Copy Code button provides an alternative for users who need to manually enter their OTP. The message format supports variable placeholders, making it adaptable for multiple authentication scenarios. Auto-Fill Template This document provides detailed information about the Authentication Template used for secure verification purposes. These templates allow businesses to send structured messages to users for authentication via one-time passcodes (OTPs). Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: authentication_code_autofill_button_one Language: en_US (English – United States) Category: AUTHENTICATION Message Send TTL: 60 seconds Allow Category Change: No Components The authentication_code_autofill_button_one consists of a Body, Footer, and Buttons component. Body Type: BODY Security Recommendation: true Purpose: Includes an OTP and a security recommendation advising users to keep their verification code confidential. Footer Type: FOOTER Code Expiration: 10 minutes Purpose: Informs the user of the OTP validity period. Buttons Type: BUTTONS Buttons: Type: otp OTP Type: one_tap Text: Copy Code Autofill Text: Autofill Package Name: app.pingtochat.com Signature Hash: K8a/AINcGX7 Sample Request { "name": "authentication_code_autofill_button_one", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 10 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "one_tap", "text": "Copy Code", "autofill_text": "Autofill", "package_name": "app.pingtochat.com", "signature_hash": "K8a/AINcGX7" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "AUTHENTICATION" } Notes This template is designed specifically for authentication purposes, including account verification and secure access. The One-Tap Autofill feature enhances user experience by allowing quick OTP entry. The Copy Code button provides an alternative for users who need to manually enter their OTP. The message format supports variable placeholders, making it adaptable for multiple authentication scenarios. Copy-Code Template This document provides detailed information about the Authentication Template used for secure verification purposes. These templates allow businesses to send structured messages to users for authentication via one-time passcodes (OTPs). Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: authentication_copy_code_button_one Language: en_US (English – United States) Category: AUTHENTICATION Message Send TTL: 60 seconds Allow Category Change: No Components The authentication_copy_code_button_one consists of a Body, Footer, and Buttons component. Body Type: BODY Security Recommendation: true Purpose: Includes an OTP and a security recommendation advising users to keep their verification code confidential. Footer Type: FOOTER Code Expiration: 5 minutes Purpose: Informs the user of the OTP validity period. Buttons Type: BUTTONS Buttons: Type: otp OTP Type: copy_code Text: Copy Code Sample Request { "name": "authentication_copy_code_button_one", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "copy_code", "text": "Copy Code" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "AUTHENTICATION" } Notes This template is designed specifically for authentication purposes, including account verification and secure access. The Copy Code button provides an easy way for users to manually copy and paste the OTP. The message format supports variable placeholders, making it adaptable for multiple authentication scenarios.
Sales Enquiry If you’re interested in our services, you can easily submit a Sales Enquiry through the dashboard. 📝 Steps to Submit a Sales Enquiry: Navigate to the “Sales Enquiry” section in the dashboard. Click on “Sales”. Fill in the required details in the Sales Enquiry Form. Click “Save” to submit your enquiry. Our team will review your request and get back to you with the necessary updates and information. image Once submitted, our team will review your request and get back to you with the necessary information or next steps.
Create Group To send bulk messages efficiently, you can create a Contact Group by following these steps: Steps to Create a Contact Group: Navigate to the “Contacts” section in the dashboard. Click on the “Groups” tab to open the group list page. Click the “Add New Group” button. A popup will appear — enter the Group Name and any other required details. Click “Save Group” to create and store the new contact group. Once saved, your group will be available for use in campaigns and message broadcasts. Image
Create User In the admin section, the admin can directly create users, add services, and assign packages. How to create user Navigate to Admin in Dashboard Select Customer Click the Create User image While adding a user, the admin can promote the user to a support role, such as Sales Support or IT Support. Select one or more users from the user selection list, choose a user type (e.g., IT Support or Sales Support), and click ‘Update’ to apply the changes. Image
No parameter with body and button quick-replay PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply) Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "markting_p", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "markting_p". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_p\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_p\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Marketing Template Creation API Articles No parameter No parameter with header-text and body No parameter with header-text and body and footer No parameter with header-text and body and button quick-replay No parameter with header-text and body and button quick-replay,visit-website No parameter with header-text and body and button quick-replay,visit-website, phone number No parameter with header-text and body and button quick-replay,visit-website, phone number and copy-code No parameter body , footer and button quick-replay No parameter body , footer and button quick-replay and visit-website No parameter body , footer and button quick-replay , visit-website and phone-number No parameter body , footer and button quick-replay , visit-website , phone-number and copy-code No parameter with body , button quick-replay No parameter body , button quick-replay and visit-website No parameter body , button quick-replay , visit-website , phone-number No parameter body , button quick-replay , visit-website , phone-number and copy-code Parameter with header and body Parameter with header , body and footer Parameter with header-body-footer , buttons - quick-replay Parameter with header-body-footer , buttons - quick-replay,visit website Parameter with header-body-footer , buttons - quick-replay,visit-website,phone-number Parameter with header-body-footer , buttons - quick-replay,visit-website,phone-number,copy-code Parameter with body footer button - quick replay Parameter with body footer button - quick-replay ,visit-website and phone-number Parameter with body footer button - quick-replay ,visit-website, phone-number and copy-code Parameter with body , button - quick-replay Parameter with body , button - quick-replay, visit-website Parameter with body , button - quick-replay, visit-website, phone-number Parameter with body , button - quick-replay, visit-website, phone-number, copy-code Template with header-image body and button quick replay No parameter with header-image body and button quick replay phone number and copy code No Parameter with header-video body footer and buttons - quick-replay,visit-website,phone-number,copy-code No parameter with header-pdf body footer and buttons - quick-replay,visit-website,phone-number,copy-code Parameter with header-image body footer and buttons - quick-replay,visit-website,phone-number,copy-code Parameter with header-video body footer and buttons - quick-replay,visit-website,phone-number,copy-code Parameter with header-pdf body footer and buttons - quick-replay,visit-website,phone-number,copy-code No parameter The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., BODY). text (string, required): The actual content of the template component. Request Body { "name": "marketing_a", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are introducing our new product!" } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. No parameter with header-text and body The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the header and body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Content-Type: Should be set to application/json. Authorization: Bearer token for authentication. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required): The actual content of the template component. Request Body { "name": "markting_f", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component requires a format field (e.g., TEXT). No parameter with header-text and body and footer The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required): The actual content of the template component. Request Body { "name": "markting_g", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component requires a format field (e.g., TEXT). The FOOTER component is an optional text field that typically contains closing remarks. No parameter with header-text and body and button quick-replay The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY). text (string, required): The label displayed on the button. Request Body { "name": "markting_h", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component requires a format field (e.g., TEXT). The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY options. No parameter with header-text and body and button quick-replay,visit-website The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY). text (string, required): The label displayed on the button. Sample Request { "name": "markting_i", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component requires a format field (e.g., TEXT). The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY options. No parameter with header-text and body and button quick-replay,visit-website, phone number The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER). text (string, required): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The contact number for the call button. Sample Request { "name": "markting_j", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component requires a format field (e.g., TEXT). The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY options, URL buttons for external links, and PHONE_NUMBER buttons for direct calling. No parameter with header-text and body and button quick-replay,visit-website, phone number and copy-code The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The contact number for the call button. example (string, required for COPY_CODE type): The example code to be copied when the button is clicked. Sample Request { "name": "markting_k", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component requires a format field (e.g., TEXT). The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY options, URL buttons for external links, PHONE_NUMBER buttons for direct calling, and COPY_CODE buttons for copying promo codes. No parameter body , footer and button quick-replay The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The contact number for the call button. example (string, required for COPY_CODE type): The example code to be copied when the button is clicked. Sample Request { "name": "markting_l", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY options for user interaction. No parameter body , footer and button quick-replay and visit-website The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL). text (string, required for QUICK_REPLY, URL types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. Sample Request { "name": "markting_m", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY options for user interaction. No parameter body , footer and button quick-replay , visit-website and phone-number The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The phone number associated with the button. Sample Request { "name": "markting_n", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY, URL, and PHONE_NUMBER buttons for user interaction. No parameter body , footer and button quick-replay , visit-website , phone-number and copy-code The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The phone number associated with the button. example (string, required for COPY_CODE type): The example code to be copied when the button is pressed. Sample Request { "name": "markting_o", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY, URL, PHONE_NUMBER, and COPY_CODE buttons for user interaction. No parameter with body , button quick-replay The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The phone number associated with the button. example (string, required for COPY_CODE type): The example code to be copied when the button is pressed. Sample Request { "name": "markting_p", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY. No parameter body , button quick-replay and visit-website The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. Sample Request { "name": "markting_q", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY and URL. No parameter body , button quick-replay , visit-website , phone-number The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The phone number associated with the button. Sample Request { "name": "markting_r", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY, URL, and PHONE_NUMBER. No parameter body , button quick-replay , visit-website , phone-number and copy-code The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The phone number associated with the button. example (string, required for COPY_CODE type): The example code to be copied when the button is pressed. Sample Request { "name": "markting_s", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY, URL, PHONE_NUMBER, and COPY_CODE buttons for user interaction. Parameter with header and body This document provides detailed information about the Marketing Template (marketing_t). It is designed for marketing purposes, allowing businesses to send customizable messages to users. The template supports placeholders for dynamic content, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_t Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components This template consists of two primary components: Header and Body. 1. Header Component Type: HEADER Format: TEXT Text: Our {{1}} is on! Example Usage: Example Header Text: Our Summer Sale is on! Here, {{1}} is dynamically replaced with Summer Sale or any other promotional event. 2. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}} in Header: Represents the name of the promotional event (e.g., Summer Sale, Winter Discount). {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Header) = Holiday Sale {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Header: Our Holiday Sale is on! Body: We are introducing our new product about new chat feature. Example request { "name": "marketing_t", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. Parameter with header , body and footer This document provides detailed information about the Marketing Template (marketing_u). It is designed for marketing purposes, allowing businesses to send customizable messages to users. The template supports placeholders for dynamic content, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_u Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components This template consists of three primary components: Header, Body, and Footer. 1. Header Component Type: HEADER Format: TEXT Text: Our {{1}} is on! Example Usage: Example Header Text: Our Summer Sale is on! Here, {{1}} is dynamically replaced with Summer Sale or any other promotional event. 2. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 3. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}} in Header: Represents the name of the promotional event (e.g., Summer Sale, Winter Discount). {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Header) = Holiday Sale {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Header: Our Holiday Sale is on! Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Sample Request { "name": "marketing_u", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. Parameter with header-body-footer , buttons - quick-replay This document provides detailed information about the Marketing Template (marketing_v). It is designed for marketing purposes, allowing businesses to send customizable messages to users. The template supports placeholders for dynamic content, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_v Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components This template consists of four primary components: Header, Body, Footer, and Buttons. 1. Header Component Type: HEADER Format: TEXT Text: Our {{1}} is on! Example Usage: Example Header Text: Our Summer Sale is on! Here, {{1}} is dynamically replaced with Summer Sale or any other promotional event. 2. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 3. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. 4. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button allowing users to quickly opt out of promotional messages. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}} in Header: Represents the name of the promotional event (e.g., Summer Sale, Winter Discount). {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Header) = Holiday Sale {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Header: Our Holiday Sale is on! Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Button: Unsubscribe from Promos Sample Request { "name": "marketing_v", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations. Parameter with header-body-footer , buttons - quick-replay,visit website This document provides detailed information about the Marketing Template (marketing_w). It is designed for marketing purposes, allowing businesses to send customizable messages to users. The template supports placeholders for dynamic content, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_w Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components This template consists of four primary components: Header, Body, Footer, and Buttons. 1. Header Component Type: HEADER Format: TEXT Text: Our {{1}} is on! Example Usage: Example Header Text: Our Summer Sale is on! Here, {{1}} is dynamically replaced with Summer Sale or any other promotional event. 2. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 3. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. 4. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button allowing users to quickly opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs users to an external link for additional information or actions. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}} in Header: Represents the name of the promotional event (e.g., Summer Sale, Winter Discount). {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Header) = Holiday Sale {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Header: Our Holiday Sale is on! Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (Redirects to https://app.pingtochat.com/) Sample Request { "name": "marketing_w", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations. The Go to link button enables users to navigate to external pages for more details or additional actions. Parameter with header-body-footer , buttons - quick-replay,visit-website,phone-number This document provides detailed information about the Marketing Template (marketing_x). It is designed for marketing purposes, allowing businesses to send customizable messages to users. The template supports placeholders for dynamic content, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_x Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components This template consists of four primary components: Header, Body, Footer, and Buttons. 1. Header Component Type: HEADER Format: TEXT Text: Our {{1}} is on! Example Usage: Example Header Text: Our Summer Sale is on! Here, {{1}} is dynamically replaced with Summer Sale or any other promotional event. 2. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 3. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. 4. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button allowing users to quickly opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs users to an external link for additional information or actions. Type: PHONE_NUMBER Text: Call Phone Number: +91xxxxxxxxxx Purpose: Allows users to directly call a specified phone number for further assistance. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}} in Header: Represents the name of the promotional event (e.g., Summer Sale, Winter Discount). {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Header) = Holiday Sale {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Header: Our Holiday Sale is on! Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (Redirects to https://app.pingtochat.com/) Call (Dials +91xxxxxxxxxx) Sample Request { "name": "marketing_x", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations. The Go to link button enables users to navigate to external pages for more details or additional actions. The Call button provides direct contact with customer support or sales teams, improving customer engagement. Parameter with header-body-footer , buttons - quick-replay,visit-website,phone-number,copy-code This document provides detailed information about the Marketing Template (marketing_y). It is designed for marketing purposes, allowing businesses to send customizable messages to users. The template supports placeholders for dynamic content, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_y Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components This template consists of four primary components: Header, Body, Footer, and Buttons. 1. Header Component Type: HEADER Format: TEXT Text: Our {{1}} is on! Example Usage: Example Header Text: Our Summer Sale is on! Here, {{1}} is dynamically replaced with Summer Sale or any other promotional event. 2. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 3. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. 4. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button allowing users to quickly opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs users to an external link for additional information or actions. Type: PHONE_NUMBER Text: Call Phone Number: +91xxxxxxxxxx Purpose: Allows users to directly call a specified phone number for further assistance. Type: COPY_CODE Example: WRETTT Purpose: Provides users with a code that can be copied for promotional use, discounts, or verification. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}} in Header: Represents the name of the promotional event (e.g., Summer Sale, Winter Discount). {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Header) = Holiday Sale {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Header: Our Holiday Sale is on! Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (Redirects to https://app.pingtochat.com/) Call (Dials +91xxxxxxxxxx) Copy Code (WRETTT – Users can copy this code for later use) Sample Request { "name": "marketing_y", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations. The Go to link button enables users to navigate to external pages for more details or additional actions. The Call button provides direct contact with customer support or sales teams, improving customer engagement. The Copy Code button allows users to easily copy a promotional or discount code for later use. Parameter with body footer button - quick replay This document provides detailed information about the Marketing Template (marketing_z). It is designed for marketing purposes, allowing businesses to send customizable messages to users. The template supports placeholders for dynamic content, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_z Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components This template consists of three primary components: Body, Footer, and Buttons. 1. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 2. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. 3. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button allowing users to quickly opt out of promotional messages. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Sample Request { "name": "marketing_z", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations. Parameter with body footer button - quick-replay ,visit-website and phone-number This document provides detailed information about the Marketing Templates used for marketing purposes. These templates allow businesses to send customizable messages to users with dynamic placeholders, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Marketing Template AA Name: marketing_aa Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components The marketing_aa template consists of multiple components: Body, Footer, and Buttons. 1. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 2. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. 3. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button for opting out of promotions. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs users to an external link for further engagement. Type: PHONE_NUMBER Text: Call Phone Number: 91xxxxxxxxxx Purpose: Provides a direct call option for customer support or inquiries. Dynamic Placeholders The templates include placeholders for dynamic content: {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (redirects to https://app.pingtochat.com/) Call (dials 91xxxxxxxxxx) Sample Request { "name": "marketing_aa", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations. The Go to link button helps direct users to external resources, while the Call button facilitates direct communication. Parameter with body footer button - quick-replay ,visit-website, phone-number and copy-code This document provides detailed information about the Marketing Templates used for marketing purposes. These templates allow businesses to send customizable messages to users with dynamic placeholders, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Marketing Template AB Name: marketing_ab Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components The marketing_ab template consists of multiple components: Body, Footer, and Buttons. 1. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 2. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. 3. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button for opting out of promotions. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs users to an external link for further engagement. Type: PHONE_NUMBER Text: Call Phone Number: 91xxxxxxxxxx Purpose: Provides a direct call option for customer support or inquiries. Type: COPY_CODE Example: WRETTT Purpose: Allows users to copy a promotional or discount code for use. Dynamic Placeholders The templates include placeholders for dynamic content: {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (redirects to https://app.pingtochat.com/) Call (dials 91xxxxxxxxxx) Copy Code: WRETTT Sample Request { "name": "marketing_ab", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations. The Go to link button helps direct users to external resources, while the Call button facilitates direct communication. The Copy Code button allows users to quickly copy promotional or discount codes for convenience. Parameter with body , button - quick-replay This document provides detailed information about the Marketing Templates used for marketing purposes. These templates allow businesses to send customizable messages to users with dynamic placeholders, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Marketing Template AC Name: marketing_ac Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components The marketing_ac template consists of Body and Buttons components. 1. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 2. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button for opting out of promotions. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}}** in Body:** Represents an introductory phrase (e.g., our, the latest). {{2}}** in Body:** Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Body: We are introducing our new product about new chat feature. Buttons: Unsubscribe from Promos Sample Request { "name": "marketing_ac", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations. Parameter with body , button - quick-replay, visit-website This document provides detailed information about the Marketing Templates used for marketing purposes. These templates allow businesses to send customizable messages to users with dynamic placeholders, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_ad Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components The marketing_ad template consists of a Body and a Buttons component. Body: Type: BODY Text: "We are introducing {{1}} new product about {{2}}" Example: "We are introducing our new product about WhatsApp message app" Purpose: Used for marketing campaigns to introduce new products or services dynamically. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows users to opt out of future marketing messages. Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Redirects the recipient to an external site for more details or purchase options. Example Message Generation: "We are introducing our new product about WhatsApp message app" Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) Sample Request { "name": "marketing_ad", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes: This is a Marketing Template, meaning it is designed to promote and advertise new products. Dynamic placeholders ({{1}} and {{2}}) allow customization for different products and topics. Quick Reply Button enables users to opt out of promotional messages. URL Button provides direct access to the product or promotional landing page. There is no header or footer, keeping the message concise and action-oriented. Parameter with body , button - quick-replay, visit-website, phone-number This document provides detailed information about the Marketing Templates used for marketing purposes. These templates allow businesses to send customizable messages to users with dynamic placeholders, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_ae Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components The marketing_ae template consists of a Body and Buttons component. Body: Type: BODY Text: "We are introducing {{1}} new product about {{2}}" Example: "We are introducing our new product about WhatsApp message app" Purpose: Used for marketing campaigns to introduce new products or services dynamically. Buttons: Type: BUTTONS Buttons: Quick Reply Button Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows users to opt out of promotional messages. URL Button Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Redirects the recipient to an external site for more details or purchase options. Phone Number Button Type: PHONE_NUMBER Text: "Call" Phone Number: +91xxxxxxxxxx Purpose: Allows users to directly call a support or sales representative. Example Message Generation: 📢 "We are introducing our new product about WhatsApp message app" Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) "Call" (Phone Number: +91xxxxxxxxxx) Sample Request { "name": "marketing_ae", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes: This is a Marketing Template, meaning it is designed to promote and advertise new products. Dynamic placeholders ({{1}} and {{2}}) allow customization for different products and topics. Quick Reply Button enables users to opt out of promotional messages. URL Button provides direct access to the product or promotional landing page. Phone Number Button allows users to contact support/sales directly. There is no header or footer, keeping the message concise and action-oriented. Parameter with body , button - quick-replay, visit-website, phone-number, copy-code This document provides detailed information about the Marketing Templates used for marketing purposes. These templates allow businesses to send customizable messages to users with dynamic placeholders, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_af Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components The marketing_af template consists of a Body and Buttons component. Body: Type: BODY Text: “We are introducing {{1}} new product about {{2}}” Example: “We are introducing our new product about WhatsApp message app” Purpose: Used for marketing campaigns to introduce new products or services dynamically. Buttons: Type: BUTTONS Buttons: Quick Reply Button Type: QUICK_REPLY Text: “Unsubscribe from Promos” Purpose: Allows users to opt out of promotional messages. URL Button Type: URL Text: “Go to link” URL: “https://app.pingtochat.com/“ Purpose: Redirects the recipient to an external site for more details or purchase options. Phone Number Button Type: PHONE_NUMBER Text: “Call” Phone Number: “+91xxxxxxxxxx” Purpose: Allows users to directly call a support or sales representative. Copy Code Button Type: COPY_CODE Example: “WRETTT” Purpose: Provides a code that users can copy for discounts or promotions. Example Message Generation: “We are introducing our new product about WhatsApp message app” Buttons: “Unsubscribe from Promos” “Go to link” (URL: “https://app.pingtochat.com/“) “Call” (Phone Number: “+91xxxxxxxxxx”) “Copy Code” (Example: “WRETTT”) Sample Request { "name": "marketing_af", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes: This is a Marketing Template, meaning it is designed to promote and advertise new products. Dynamic placeholders ({{1}} and {{2}}) allow customization for different products and topics. Quick Reply Button enables users to opt out of promotional messages. URL Button provides direct access to the product or promotional landing page. Phone Number Button allows users to contact support/sales directly. Copy Code Button is useful for sharing discount codes, promo codes, or reference codes. There is no header or footer, keeping the message concise and action-oriented. Template with header-image body and button quick replay The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., Header). type (string, required): Type of component (e.g., BODY). text (string, required): The actual content of the template component. file (string, required): Request Body { "name": "marketing_attachment_one", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://app.pingtochat.com/template_media/1736424548.png" } } ] }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. No parameter with header-image body and button quick replay phone number and copy code The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as body text, headers, footers, and interactive buttons. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). text (string, required for BODY and FOOTER): The actual content of the template component. format (string, required for HEADER when media is used): The format type (e.g., MEDIA). example (object, required for HEADER with media and copy_code button): Example data such as media URL or promo code. buttons (array, required for BUTTONS component): List of interactive buttons. type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER): The button label text. url (string, required for URL button): The destination link. phone_number (string, required for PHONE_NUMBER button): Contact number. example (string, required for COPY_CODE button): Example promo code. Request Body Example { "name": "markting_attachment_no_parameter", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the template name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component supports media attachments via a valid media URL. The BUTTONS component provides interactive elements such as quick replies, URLs, phone numbers, and copy codes for user engagement. No Parameter with header-video body footer and buttons - quick-replay,visit-website,phone-number,copy-code Template Creation API Documentation The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as body text, headers, footers, and interactive buttons. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER when media is used): The format type (e.g., MEDIA). text (string, required for BODY and FOOTER): The actual content of the template component. example (object, required for HEADER with media and COPY_CODE button): Example data such as media URL or promo code. buttons (array, required for BUTTONS component): List of interactive buttons. type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER): The button label text. url (string, required for URL button): The destination link. phone_number (string, required for PHONE_NUMBER button): Contact number. example (string, required for COPY_CODE button): Example promo code. Request Body Example { "name": "markting_attachment_no_parameter_1", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://file-examples.com/storage/fe21422a6d67aa28993b797/2017/04/file_example_MP4_480_1_5MG.mp4" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "URL", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" }, { "type": "COPY_CODE", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the template name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component supports media attachments via a valid media URL. The BUTTONS component provides interactive elements such as quick replies, URLs, phone numbers, and copy codes for user engagement. No parameter with header-pdf body footer and buttons - quick-replay,visit-website,phone-number,copy-code Template Creation API Documentation The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as body text, headers, footers, and interactive buttons. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER when media is used): The format type (e.g., MEDIA). text (string, required for BODY and FOOTER): The actual content of the template component. example (object, required for HEADER with media and COPY_CODE button): Example data such as media URL or promo code. buttons (array, required for BUTTONS component): List of interactive buttons. type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER): The button label text. url (string, required for URL button): The destination link. phone_number (string, required for PHONE_NUMBER button): Contact number. example (string, required for COPY_CODE button): Example promo code. Request Body Example { "name": "markting_attachment_no_parameter_2", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "URL", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "COPY_CODE", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the template name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component supports media attachments via a valid media URL. The BUTTONS component provides interactive elements such as quick replies, URLs, phone numbers, and copy codes for user engagement. Parameter with header-image body footer and buttons - quick-replay,visit-website,phone-number,copy-code The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as body text, headers, footers, and interactive buttons. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). text (string, required for BODY and FOOTER): The actual content of the template component. format (string, required for HEADER when media is used): The format type (e.g., MEDIA). example (object, required for HEADER with media, BODY with placeholders, and copy_code button): Example data such as media URL, placeholder values, or promo code. buttons (array, required for BUTTONS component): List of interactive buttons. type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER): The button label text. url (string, required for URL button): The destination link. phone_number (string, required for PHONE_NUMBER button): Contact number. example (string, required for COPY_CODE button): Example promo code. Request Body Examples { "name": "marketing_parameter_attachment", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our", "whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the template name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component supports media attachments via a valid media URL. The BODY component supports placeholders for dynamic content. The BUTTONS component provides interactive elements such as quick replies, URLs, phone numbers, and copy codes for user engagement. Parameter with header-video body footer and buttons - quick-replay,visit-website,phone-number,copy-code The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as body text, headers, footers, and interactive buttons. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER when media is used): The format type (e.g., MEDIA). text (string, required for BODY and FOOTER): The actual content of the template component. example (object, required for HEADER with media and COPY_CODE button): Example data such as media URL or promo code. buttons (array, required for BUTTONS component): List of interactive buttons. type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER): The button label text. url (string, required for URL button): The destination link. phone_number (string, required for PHONE_NUMBER button): Contact number. example (string, required for COPY_CODE button): Example promo code. Request Body Example { "name": "marketing_parameter_attachment_1", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": https://file-examples.com/storage/fe21422a6d67aa28993b797/2017/04/file_example_MP4_480_1_5MG.mp4" } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our", "whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "URL", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "COPY_CODE", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the template name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component supports media attachments via a valid media URL. The BODY component supports parameters for dynamic content insertion. The BUTTONS component provides interactive elements such as quick replies, URLs, phone numbers, and copy codes for user engagement. Parameter with header-pdf body footer and buttons - quick-replay,visit-website,phone-number,copy-code The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as body text, headers, footers, and interactive buttons. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER when media is used): The format type (e.g., MEDIA). text (string, required for BODY and FOOTER): The actual content of the template component. example (object, required for HEADER with media and COPY_CODE button): Example data such as media URL or promo code. buttons (array, required for BUTTONS component): List of interactive buttons. type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER): The button label text. url (string, required for URL button): The destination link. phone_number (string, required for PHONE_NUMBER button): Contact number. example (string, required for COPY_CODE button): Example promo code. Request Body Example { "name": "marketing_parameter_attachment_1", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our", "whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "URL", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "COPY_CODE", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the template name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component supports media attachments via a valid media URL. The BODY component supports parameters for dynamic content insertion. The BUTTONS component provides interactive elements such as quick replies, URLs, phone numbers, and copy codes for user engagement.
Create Group To send bulk messages efficiently, you can create a Contact Group by following these steps: Steps to Create a Contact Group: Navigate to the “Contacts” section in the dashboard. Click on the “Groups” tab to open the group list page. Click the “Add New Group” button. A popup will appear — enter the Group Name and any other required details. Click “Save Group” to create and store the new contact group. Once saved, your group will be available for use in campaigns and message broadcasts. Image
Create Contact To send bulk messages efficiently, you can create a Contact Group by following these steps: Steps to Create a Contact Group: Navigate to the “Contacts” section in the dashboard. Click on the “Groups” tab to open the group list page. Click the “Add New Group” button. A popup will appear — enter the Group Name and any other required details. Click “Save Group” to create and store the new contact group. Once saved, your group will be available for use in campaigns and message broadcasts. enter one by one page image import from doc page image After creating your group and completing all the necessary WhatsApp configurations, you can proceed to send WhatsApp messages.
Manage User How to Manage user Navigate to Admin in Dashboard Select Customer Click to Manage User 1. User Management View list of all users Add / Edit / users Activate / Deactivate user accounts Search and filter users Assign roles or permissions (if role-based access) 2. User Profile Management View and update user profile details Change user password View login history / security logs 3. Pre-Login User Actions Admin can login to their own users account 4. Service Management View list of all services Add new services Update service details Enable / Disable services 5. Wallet Management View all user wallets Add funds to a user’s wallet Deduct funds manually View wallet transaction history Image
No parameter with body , footer and button quick-replay , visit-website and phone-number and copy code PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number, Copy Code) For URL and Phone Number buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "markting_o", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "markting_o". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Copy Code Button Type: button Description: Adds an interactive Copy Code button. sub_type Value: "copy_code" Description: Defines the button as a Copy Code button. "copy_code": Allows users to copy a predefined code. index Type: Integer Description: Position of the button in the template. "1": The second button. parameters Type: `Array** Description: Defines the copy code text. text: "WRETTT" (example code that users can copy). Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_o”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_o”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_o\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_o”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_o”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_o\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_o”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Utility Template Creation API Articles No parameter No parameter head and body No parameter head , body and footer No parameter header , body , footer and buttons - quick replay No parameter header , body , footer and buttons - quick-replay visit website No parameter body,footer and buttons - quick-replay No parameter body,footer and buttons - quick-replay,visit-website No parameter body,footer and buttons - quick-replay,visit-website,phone-number No parameter body,footer and buttons - quick-replay,visit-website No parameter body,footer and buttons - phone number No parameter body,buttons - quick-replay No parameter body,buttons - quick-replay,visit-website No parameter body,buttons - quick-replay,visit-website,phone-number Parameter with header and body Parameter with header,body,footer Parameter with header,body,footer buttons - quick-replay Parameter with header,body,footer buttons - quick-replay,visit-website No parameter header , body , footer and buttons - quick-replay ,visit-website,phone-number arameter with header,body,footer buttons - quick-replay,visit-website,phone-number Parameter with body,footer buttons - quick-replay Parameter with body,footer buttons - quick-replay,visit-website Parameter with body,footer buttons - quick-replay,visit-website,phone-number Parameter with body buttons - quick-replay Parameter with body buttons - quick-replay,visit-website Parameter with body buttons - quick-replay,visit-website,phone-number No parameter with header-image and body and button quick-replay,visit-website, phone number No parameter with header-pdf and body and button quick-replay,visit-website, phone number No parameter with header-video and body and button quick-replay,visit-website, phone number Parameter with header-video and body and button quick-replay,visit-website, phone number Parameter with header-pdf and body and button quick-replay,visit-website, phone number Parameter with header-image and body and button quick-replay,visit-website, phone number No parameter This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template A Name: utility_a Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_a template consists of a Body component. 1. Body Component Type: BODY Text: Item no 12CR007 is confirmed! Purpose: This message serves as a confirmation notification for an item, order, or transaction. Example Message Generation The generated message will be: Body: Item no 12CR007 is confirmed! Sample Request { "name": "utility_a", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no 12CR007 is confirmed!" } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The message format is fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter head and body This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template F Name: utility_f Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components 1. Utility Template F Components The utility_f template consists of a Header and a Body component. Header: Type: HEADER Format: TEXT Text: Order Infermation Purpose: Provides a title for the message, indicating that it contains order-related details. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Example Message Generation Utility Template F Header: Order Infermation Body: Item no CR7000 is confirmed! Sample Request { "name": "utility_f", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Order Infermation" }, { "type": "BODY", "text": "Item no CR7000 is confirmed!" } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter head , body and footer This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template G Name: utility_g Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template G Components The utility_g template consists of a Header, a Body, and a Footer component. Header: Type: HEADER Format: TEXT Text: Order Infermation Purpose: Provides a title for the message, indicating that it contains order-related details. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Example Message Generation Utility Template G Header: Order Infermation Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Sample Request { "name": "utility_g", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Order Infermation" }, { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter header , body , footer and buttons - quick replay This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template H Name: utility_h Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template H Components The utility_h template consists of a Header, a Body, a Footer, and a Buttons component. Header: Type: HEADER Format: TEXT Text: Order Infermation Purpose: Provides a title for the message, indicating that it contains order-related details. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button for the recipient to opt out of promotional messages. Example Message Generation Utility Template H Header: Order Infermation Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Button: Unsubscribe from Promos Sample Request { "name": "utility_h", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Order Infermation" }, { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The inclusion of a Quick Reply Button allows recipients to opt out of promotional content easily. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter header , body , footer and buttons - quick-replay visit website This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template I Name: utility_i Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template I Components The utility_i template consists of a Header, a Body, a Footer, and a Buttons component. Header: Type: HEADER Format: TEXT Text: Order Infermation Purpose: Provides a title for the message, indicating that it contains order-related details. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Provides a link for the recipient to access additional resources or actions. Example Message Generation Utility Template I Header: Order Infermation Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_i", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Order Infermation" }, { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The inclusion of Quick Reply and URL Buttons allows recipients to opt out of promotions or take further actions easily. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter body,footer and buttons - quick-replay This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template L Name: utility_l Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template L Components The utility_l template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages. Example Message Generation Utility Template L Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Sample Request { "name": "utility_l", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The inclusion of a Quick Reply Button allows recipients to opt out of promotions easily. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter body,footer and buttons - quick-replay,visit-website This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template M Name: utility_m Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template M Components The utility_m template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Provides a link for the recipient to access additional resources or actions. Example Message Generation Utility Template M Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_m", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The inclusion of Quick Reply and URL Button allows recipients to opt out of promotions or access additional resources easily. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter body,footer and buttons - quick-replay,visit-website,phone-number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template N Name: utility_n Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template N Components The utility_n template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Provides a link for the recipient to access additional resources or actions. Type: PHONE_NUMBER Text: Call Phone Number: 91xxxxxxxxxx Purpose: Allows the recipient to directly call a designated phone number for support or inquiries. Example Message Generation Utility Template N Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (URL: https://app.pingtochat.com/) Call (Phone: 91xxxxxxxxxx) Sample Request { "name": "utility_n", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The inclusion of Quick Reply, URL Button, and Phone Number Button allows recipients to opt out of promotions, access resources, or make direct calls conveniently. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter body,footer and buttons - quick-replay,visit-website This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template P Name: utility_p Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template P Components The utility_p template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Provides a link for the recipient to access additional resources or actions. Example Message Generation Utility Template P Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_p", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The inclusion of Quick Reply and URL Button allows recipients to opt out of promotions or access additional resources conveniently. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter body,footer and buttons - phone number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template QQQ Name: utility_qqq Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template QQQ Components The utility_qqq template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: PHONE_NUMBER Text: Call Phone Number: 91xxxxxxxxxx Purpose: Allows the recipient to initiate a call directly for further assistance. Example Message Generation Utility Template QQQ Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Buttons: Call (Phone Number: 91xxxxxxxxxx) Sample Request { "name": "utility_qqq", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The Phone Number Button allows recipients to directly contact the sender for support or inquiries. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter body,buttons - quick-replay This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template R Name: utility_r Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template R Components The utility_r template consists of a Body and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages quickly. Example Message Generation Utility Template R Body: Item no CR7000 is confirmed!Buttons: Unsubscribe from Promos Sample Request { "name": "utility_r", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The Quick Reply Button allows recipients to quickly opt out of promotions. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter body,buttons - quick-replay,visit-website This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template S Name: utility_s Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template S Components The utility_s template consists of a Body and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages quickly. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Example Message Generation Utility Template S Body: Item no CR7000 is confirmed!Buttons: Unsubscribe from Promos Go to link (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_s", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The Quick Reply Button allows recipients to quickly opt out of promotions. The URL Button provides direct access to an external link for additional actions. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. No parameter body,buttons - quick-replay,visit-website,phone-number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_t Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_t template consists of a Body and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages quickly. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Type: PHONE_NUMBER Text: Call Phone Number: 91xxxxxxxxxx Purpose: Allows the recipient to initiate a call directly for further assistance. Example Message Generation Body: Item no CR7000 is confirmed!Buttons: Call (Phone Number: 91xxxxxxxxxx) Unsubscribe from Promos Go to link (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_t", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Quick Reply Button enables recipients to opt out of promotions. The URL Button directs users to an external link for further actions. The Phone Number Button allows recipients to initiate a call for assistance. The message format is fixed and does not include dynamic placeholders, making it suitable for standard notifications. Parameter with header and body This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_x Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_x template consists of a Header and a Body component. Header: Type: HEADER Format: TEXT Text: Hi confirmation from {{1}}! Example: "Hi confirmation from P2C!" Purpose: Provides a personalized greeting that includes a dynamic value (e.g., company name or sender). Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Example Message Generation Header: "Hi confirmation from P2C!"Body: "Item no 12CR007 is confirmed!" Sample Request { "name": "utility_x", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Hi confirmation from {{1}}!", "example": { "header_text": [ "P2C" ] } }, { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Header is dynamic, allowing customization of the sender name or company. The Body is also dynamic, enabling personalization of item numbers for better clarity. The message format supports variable placeholders, making it adaptable for multiple use cases. Parameter with header,body,footer This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_y Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_y template consists of a Header, a Body, and a Footer component. Header: Type: HEADER Format: TEXT Text: Hi confirmation from {{1}}! Example: "Hi confirmation from P2C!" Purpose: Provides a personalized greeting that includes a dynamic value (e.g., company name or sender). Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Footer: Type: FOOTER Text: "Thank you for choosing us!" Purpose: Adds a closing remark to appreciate the recipient. Example Message Generation Header: "Hi confirmation from P2C!"Body: "Item no 12CR007 is confirmed!"Footer: "Thank you for choosing us!" Sample Request { "name": "utility_y", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Hi confirmation from {{1}}!", "example": { "header_text": [ "P2C" ] } }, { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Header is dynamic, allowing customization of the sender name or company. The Body is also dynamic, enabling personalization of item numbers for better clarity. The Footer provides a standard thank-you message, enhancing user engagement. The message format supports variable placeholders, making it adaptable for multiple use cases. Parameter with header,body,footer buttons - quick-replay This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_z Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_z template consists of a Header, a Body, a Footer, and a Buttons component. Header: Type: HEADER Format: TEXT Text: Hi confirmation from {{1}}! Example: "Hi confirmation from P2C!" Purpose: Provides a personalized greeting that includes a dynamic value (e.g., company name or sender). Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Footer: Type: FOOTER Text: "Thank you for choosing us!" Purpose: Adds a closing remark to appreciate the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Example Message Generation Header: "Hi confirmation from P2C!"Body: "Item no 12CR007 is confirmed!"Footer: "Thank you for choosing us!"Buttons: "Unsubscribe from Promos" Sample Request { "name": "utility_z", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Hi confirmation from {{1}}!", "example": { "header_text": [ "P2C" ] } }, { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Header and Body are dynamic, allowing personalization for a more user-specific experience. The Footer provides a thank-you message to improve customer engagement. The Quick Reply Button enables users to opt out of promotional messages easily. Parameter with header,body,footer buttons - quick-replay,visit-website This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_aa Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_aa template consists of a Header, a Body, a Footer, and a Buttons component. Header: Type: HEADER Format: TEXT Text: Hi confirmation from {{1}}! Example: "Hi confirmation from P2C!" Purpose: Provides a personalized greeting that includes a dynamic value (e.g., company name or sender). Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Footer: Type: FOOTER Text: "Thank you for choosing us!" Purpose: Adds a closing remark to appreciate the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Example Message Generation Header: "Hi confirmation from P2C!"Body: "Item no 12CR007 is confirmed!"Footer: "Thank you for choosing us!"Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_aa", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Hi confirmation from {{1}}!", "example": { "header_text": [ "P2C" ] } }, { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Header and Body are dynamic, allowing personalization for a more user-specific experience. The Footer provides a thank-you message to improve customer engagement. The Quick Reply Button enables users to opt out of promotional messages easily. The URL Button provides direct access to an external link for additional actions. No parameter header , body , footer and buttons - quick-replay ,visit-website,phone-number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template J Name: utility_j Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template J Components The utility_j template consists of a Header, a Body, a Footer, and a Buttons component. Header: Type: HEADER Format: TEXT Text: Order Infermation Purpose: Provides a title for the message, indicating that it contains order-related details. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Provides a link for the recipient to access additional resources or actions. Type: PHONE_NUMBER Text: Call Phone Number: 91xxxxxxxxxx Purpose: Provides a direct call option for customer support or further assistance. Example Message Generation Utility Template J Header: Order Infermation Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (URL: https://app.pingtochat.com/) Call (Phone: 91xxxxxxxxxx) Sample Request { "name": "utility_j", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Order Infermation" }, { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The inclusion of Quick Reply, URL, and Phone Number Buttons allows recipients to opt out of promotions, access additional resources, or directly call for support. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications. arameter with header,body,footer buttons - quick-replay,visit-website,phone-number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_ab Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_ab template consists of a Header, a Body, a Footer, and a Buttons component. Header: Type: HEADER Format: TEXT Text: Hi confirmation from {{1}}! Example: "Hi confirmation from P2C!" Purpose: Provides a personalized greeting that includes a dynamic value (e.g., company name or sender). Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Footer: Type: FOOTER Text: "Thank you for choosing us!" Purpose: Adds a closing remark to appreciate the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Type: PHONE_NUMBER Text: "Call" Phone Number: 91xxxxxxxxxx Purpose: Allows the recipient to initiate a call directly for further assistance. Example Message Generation Header: "Hi confirmation from P2C!"Body: "Item no 12CR007 is confirmed!"Footer: "Thank you for choosing us!"Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) "Call" (Phone Number: 91xxxxxxxxxx) Sample Request { "name": "utility_ab", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Hi confirmation from {{1}}!", "example": { "header_text": [ "P2C" ] } }, { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Header and Body are dynamic, allowing personalization for a more user-specific experience. The Footer provides a thank-you message to improve customer engagement. The Quick Reply Button enables users to opt out of promotional messages easily. The URL Button provides direct access to an external link for additional actions. The Phone Number Button allows recipients to initiate a call for further assistance. Parameter with body,footer buttons - quick-replay This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_ac Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_ac template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Footer: Type: FOOTER Text: "Thank you for choosing us!" Purpose: Adds a closing remark to appreciate the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Example Message Generation Body: "Item no 12CR007 is confirmed!"Footer: "Thank you for choosing us!"Buttons: "Unsubscribe from Promos" Sample Request { "name": "utility_ac", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Footer provides a thank-you message to improve customer engagement. The Quick Reply Button enables users to opt out of promotional messages easily. Parameter with body,footer buttons - quick-replay,visit-website This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_ad Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_ad template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Footer: Type: FOOTER Text: "Thank you for choosing us!" Purpose: Adds a closing remark to appreciate the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Example Message Generation Body: "Item no 12CR007 is confirmed!"Footer: "Thank you for choosing us!"Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_ad", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Footer provides a thank-you message to improve customer engagement. The Quick Reply Button enables users to opt out of promotional messages easily. The URL Button allows users to access an external link for additional actions. Parameter with body,footer buttons - quick-replay,visit-website,phone-number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_af Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_af template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Footer: Type: FOOTER Text: "Thank you for choosing us!" Purpose: Adds a closing remark to appreciate the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Type: PHONE_NUMBER Text: "Call" Phone Number: 91xxxxxxxxxx Purpose: Allows the recipient to initiate a call for further assistance. Example Message Generation Body: "Item no 12CR007 is confirmed!"Footer: "Thank you for choosing us!"Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) "Call" (Phone Number: 91xxxxxxxxxx) Sample Request { "name": "utility_af", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Footer provides a thank-you message to enhance customer experience. The Quick Reply Button enables users to opt out of promotional messages easily. The URL Button allows users to access an external link for additional actions. The Phone Number Button lets users directly call customer support for assistance. Parameter with body buttons - quick-replay This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_aj Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_aj template consists of a Body and a Buttons component. Body: Type: BODY Text: "Item no {{1}} is confirmed!" Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Example Message Generation Body: "Item no 12CR007 is confirmed!"Buttons: "Unsubscribe from Promos" Sample Request { "name": "utility_aj", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for transactional confirmation messages with a simple opt-out feature. The Quick Reply Button enables users to opt out of promotional messages easily. There is no Footer or Header in this template, keeping it minimal and focused. Parameter with body buttons - quick-replay,visit-website This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_ak Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_ak template consists of a Body and a Buttons component. Body: Type: BODY Text: "Item no {{1}} is confirmed!" Example: "Item no 12CR007 is confirmed!" Purpose: Provides a confirmation message for an item, order, or transaction with a dynamic item number. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Example Message Generation Body: "Item no 12CR007 is confirmed!"Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_ak", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for transactional confirmation messages with options for opting out of promotions and redirecting users to an external link. The Quick Reply Button enables users to opt out of promotional messages easily. The URL Button provides direct access to an external link for additional actions. There is no Footer or Header, keeping the template minimal and functional. Parameter with body buttons - quick-replay,visit-website,phone-number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_al Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_al template consists of a Body and a Buttons component. Body: Type: BODY Text: "Item no {{1}} is confirmed!" Example: "Item no 12CR007 is confirmed!" Purpose: Provides a confirmation message for an item, order, or transaction with a dynamic item number. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Type: PHONE_NUMBER Text: "Call" Phone Number: 91xxxxxxxxxx Purpose: Allows the recipient to initiate a call directly for further assistance. Example Message Generation Body: "Item no 12CR007 is confirmed!"Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) "Call" (Phone Number: 91xxxxxxxxxx) Sample Request { "name": "utility_al", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for transactional confirmation messages with options for opting out of promotions, redirecting users to an external link, and calling a support number. The Quick Reply Button enables users to opt out of promotional messages easily. The URL Button provides direct access to an external link for additional actions. The Phone Number Button allows recipients to call customer support instantly. There is no Footer or Header, keeping the template minimal and functional. No parameter with header-image and body and button quick-replay,visit-website, phone number The utility_attachment_no_parameter template is a Utility Template designed for transactional or informational messaging. This template includes an image attachment, a confirmation message, and interactive buttons to engage users. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Details Name: utility_attachment_no_parameter Language: en_US (English – United States) Category: UTILITY Allow Category Change: true Components Header Type: HEADER Format: MEDIA Example Media URL: https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png Body Type: BODY Text: Item no 12CR007 is confirmed! Footer Type: FOOTER Text: Thank you for choosing us! Buttons Type: BUTTONS Buttons: Quick Reply: Unsubscribe from Promos URL Button: Text: Go to link URL: https://app.pingtochat.com/ Phone Number Button: Text: Call Phone Number: +91xxxxxxxxxx Example Request { "name": "utility_attachment_no_parameter", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" } }, { "type": "BODY", "text": "Item no 12CR007 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response { "id": "xxxxxx", "status": "APPROVED", "category": "UTILITY" } Notes This template is intended for transactional confirmations. The Quick Reply button allows users to opt out of promotional messages. The URL button directs users to an external website for further actions. The Phone Number button lets users call support directly. The image attachment enhances engagement by providing a visual confirmation. No parameter with header-pdf and body and button quick-replay,visit-website, phone number The Utility Attachment (No Parameter) Template allows businesses to send structured messages containing a PDF attachment for transactional or informational purposes. This template ensures clear communication with users regarding confirmed items or transactions. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_attachment_no_parameter Language: en_US (English – United States) Category: UTILITY Allow Category Change: true Components Header Type: HEADER Format: MEDIA Example: { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } Purpose: Attaches a PDF file to provide relevant documents or receipts. Body Type: BODY Text: Item no 12CR007 is confirmed! Purpose: Notifies the user about a confirmed transaction or order. Footer Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a courteous closing statement. Buttons Type: BUTTONS Buttons: Quick Reply Text: Unsubscribe from Promos Purpose: Allows users to opt-out of promotional messages. URL Button Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs users to an external link for more details. Phone Number Button Text: Call Phone Number: +91xxxxxxxxxx Purpose: Enables users to directly call customer support. Sample API Request { "name": "utility_attachment_no_parameter", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "Item no 12CR007 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response { "id": "xxxxxx", "status": "APPROVED", "category": "UTILITY" } Notes The template is designed for sending confirmation messages with an attached PDF document. The allow_category_change flag is set to true, enabling flexibility in category selection. The Quick Reply button helps users opt out of promotional messages. The URL button allows users to access additional details via an external link. The Phone Number button provides quick access to customer support. No parameter with header-video and body and button quick-replay,visit-website, phone number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_attachment_no_parameter Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_attachment_no_parameter template consists of a Header, Body, and Buttons component. Header: Type: HEADER Format: MEDIA Example Media URL: https://urwallet.pingtochat.com/template_media/1740161305.mp4 Purpose: Provides a media attachment such as a video to enhance the message. Body: Type: BODY Text: "Item no 12CR007 is confirmed!" Purpose: Provides a confirmation message for an item, order, or transaction. Buttons: Type: BUTTONS Buttons List: Quick Reply:"Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. URL Button:"Go to link" → Pingtochat Purpose: Directs the recipient to an external link for further actions. Phone Number Button:"Call" → +91xxxxxxxxxx Purpose: Allows the recipient to initiate a call directly for further assistance. Buttons: “Unsubscribe from Promos” “Go to link” (URL: https://app.pingtochat.com/) “Call” (Phone Number: +91xxxxxxxxxx) Sample Request { "name": "utility_attachment_no_parameter", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://pingtochat.com/template_media/1740161305.mp4" } }, { "type": "BODY", "text": "Item no 12CR007 is confirmed!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 CREATED { "id": "xxxxxx", "status": "APPROVED", "category": "UTILITY" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for transactional confirmation messages with options for: Opting out of promotions Redirecting users to an external link Calling a support number The Quick Reply Button enables users to opt out of promotional messages easily. The URL Button provides direct access to an external link for additional actions. The Phone Number Button allows recipients to call customer support instantly. The Header includes a video attachment, making it a rich media template. Parameter with header-video and body and button quick-replay,visit-website, phone number This document provides detailed information about the Utility Parameter Attachment template, which is used for marketing communications that include media attachments and dynamic parameters. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_parameter_attachment Language: en_US (English – United States) Category: MARKETING Allow Category Change: true Components Header Type: HEADER Format: MEDIA Example Media URL: Google Logo Purpose: Displays an image attachment in the message. Body Type: BODY Text: We are introducing {{1}} new product about {{2}} Example: our whatsapp message app Purpose: Provides dynamic placeholders to introduce a new product. Footer Type: FOOTER Text: Thank you for choosing us! Purpose: Adds a closing remark to the message. Buttons Type: BUTTONS Buttons: Quick Reply Text: Unsubscribe from Promos Purpose: Allows users to opt out of marketing messages. URL Button Text: Go to link URL: PingToChat Purpose: Redirects users to an external link. Phone Number Button Text: Call Phone Number: +91xxxxxxxxxx Purpose: Allows users to initiate a call for inquiries. Example Request { "name": "utility_parameter_attachment", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" } }, { "type": "BODY", "text": "We are introducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our", "whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED Example Response: { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes This template is designed for marketing communications involving product introductions. The Body section allows dynamic placeholders for product customization. The Quick Reply button lets users opt out of future promotional messages. The URL Button provides a direct link to additional information or a product page. The Phone Number Button facilitates instant customer support. Parameter with header-pdf and body and button quick-replay,visit-website, phone number This document provides detailed information about the Utility Template with Parameter used for communication purposes. This template allows businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_parameter_attachment Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components The utility_parameter_attachment template consists of the following components: 1. Header Type: HEADER Format: MEDIA Example: jsonCopyEdit{ "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } Purpose: Displays a media file (in this case, a PDF file). 2. Body Type: BODY Text: “We are introducing {{1}} new product about {{2}}” Purpose: This component allows dynamic insertion of values through parameters ({{1}} and {{2}}), which will be replaced with actual data at runtime. Example: jsonCopyEdit{ "body_text": [ [ "our", "whatsapp message app" ] ] } 3. Footer Type: FOOTER Text: “Thank you for choosing us!” Purpose: Displays a closing message at the bottom of the template. 4. Buttons Type: BUTTONS Buttons: Type: QUICK_REPLY Text: “Unsubscribe from Promos” Purpose: A quick reply button to allow the recipient to opt out of promotions. Type: URL Text: “Go to link” URL: “https://app.pingtochat.com/“ Purpose: Provides a clickable link to direct the user to a URL. Type: PHONE_NUMBER Text: “Call” Phone Number: “91xxxxxxxxxx” Purpose: Initiates a call to the given phone number. Sample Request { "name": "utility_parameter_attachment", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "We are introducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our", "whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category, as allow_category_change is set to true. The template is designed for marketing messages, introducing new products and providing a call-to-action with multiple buttons for user interaction (Unsubscribe, Go to Link, and Call). The Quick Reply Button allows recipients to easily opt out of promotional messages. The URL Button redirects users to an external link. The Phone Number Button enables direct calling to customer support. Parameter with header-image and body and button quick-replay,visit-website, phone number The Utility Attachment (Parameter) Template is designed for sending structured messages with media attachments. This template allows businesses to send confirmation messages with dynamic item numbers, along with interactive buttons for user actions. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_attachment_no_parameter Language: en_US Category: UTILITY Allow Category Change: true Components: Header: Type: HEADER Format: MEDIA Example Media URL: https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png Body: Type: BODY Text: Item no {{1}} is confirmed! Example: { "body_text": [["12CR007"]] } Footer: Type: FOOTER Text: Thank you for choosing us! Buttons: Type: BUTTONS Buttons: Quick Reply: { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } URL Button: { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } Phone Number Button: { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" } Example API Request { "name": "utility_attachment_parameter", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" } }, { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [["12CR007"]] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response { "id": "xxxxxx", "status": "APPROVED", "category": "UTILITY" } Notes This template is designed for transactional confirmation messages. The Quick Reply Button allows users to opt out of promotional messages easily. The URL Button provides direct access to an external link for additional actions. The Phone Number Button allows recipients to call customer support instantly. Since allow_category_change is true, the template can be used for multiple categories as needed.
Create Contact To send bulk messages efficiently, you can create a Contact Group by following these steps: Steps to Create a Contact Group: Navigate to the “Contacts” section in the dashboard. Click on the “Groups” tab to open the group list page. Click the “Add New Group” button. A popup will appear — enter the Group Name and any other required details. Click “Save Group” to create and store the new contact group. Once saved, your group will be available for use in campaigns and message broadcasts. enter one by one page image import from doc page image After creating your group and completing all the necessary WhatsApp configurations, you can proceed to send WhatsApp messages.
Send WhatsApp Message You can easily send WhatsApp messages through Pingtochat by following these steps: Steps to Send a WhatsApp Message: Navigate to the “Services” section in the dashboard. Click on “WhatsApp”. Select “Create Campaign”. You will be redirected to the Send Message form. Fill in the required details: Select Sender Number Choose a Template Add Recipients via: Manual Number Entry Selecting a Group Uploading a File Review the message preview, then click “Send” to initiate your WhatsApp campaign. image Once sent, you can monitor the campaign status and delivery reports are shown in delevery report page.
Admin Settings WhatsApp Configuration Navigate to the Admin in Dashboard. In the Admin panel, go to Admin Settings. Click on WhatsApp Configuration. You will see the default WhatsApp package displayed in the table. All available WhatsApp packages are listed below. You can select only one package from the list to set as the default. Once selected, click to set it as the default package. This will replace the existing default with the newly selected package. image Menu Settings Navigate to the Admin panel. In the Admin panel, go to Admin Settings. Click on Menu Settings. Here, the admin can add menus for their users. The admin can assign different menus or any combination of menus to each user. A reset menu option is also available to restore default menu settings. image
No parameter with header-text and body and button quick-replay and visit-website PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL) For URL buttons, they do not need to be included in the example payload request. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxxx", "type": "template", "template": { "name": "marketing_i", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_i". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. 1. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxxx", "wa_id": "91xxxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_i\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_i\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Edit Templates API Articles Parameter with header body without static button url and quick-replay Parameter with header body without static button url and quick-replay, phone-number Parameter with header body without static button url and quick-replay, phone-number and copy-code Parameter with header body dynamic button url to static url Parameter with header body without dynamic button url to static url and quick-replay Parameter with header body without dynamic button url to static url and quick-replay,phone-number Parameter wit header body without dynamic button url to static url and quick-replay,phone-number and copy-code header-text to pdf header-text to image header-text to video header-pdf to text header-image to text header-video to text header-pdf to image header-image to pdf header-image to video No parameter with body No parameter with header-text and body No parameter with header-text and body and footer No parameter with header-text and body and footer button quick-replay No parameter with header-text and body and footer button quick-replay and visit-website No parameter with header-text and body and footer button quick-replay and visit-website and phone-number No parameter with header-text and body and footer button quick-replay,visit-website, phone-number and copy-code No parameter with header-text and body and footer static without url button No parameter with header-text and body and footer static without url button and with quick-replay No parameter with header-text and body and footer static without url button and with quick-replay,phone-number No parameter with header-text and body and footer static without url button and with quick-replay,phone-number,copy-code No parameter with header-text and body and footer dynamic without url button No parameter with header-text and body and footer edit without url button and with quick-replay,phone-number No parameter with header-text and body and footer dynamic without url button and with quick-replay,phone-number,copy-code No parameter with header-text and body and footer static with url button No parameter with header-text and body and footer static with url button and with quick-replay No parameter with header-text and body and footer static with url button and with quick-replay,phone-number No parameter with header-text and body and footer static with url to dynamic url button and with quick-replay,phone-number,copy-code No parameter with header-text and body and footer dynamic url to static url No parameter with header-text and body and footer dynamic url to static button quick-replay,phone-number,copy-code Parameter with header body without static button url Parameter with header body without static button url and quick-replay Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_z", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Parameters name (string, required) – Unique identifier for the template (e.g., “edit_s”). language (string, required) – Language code for the template (e.g., “en_US”). category (string, required) – Category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Whether the category can be changed (true/false). components (array, required) – List of structural components of the template. Components Breakdown HEADER type (string, required) – “HEADER” format (string, required) – “TEXT” text (string, required) – “Our summer sale is on!” BODY type (string, required) – “BODY” text (string, required) – “Shop now and use code CR7000 to get more offers” FOOTER type (string, required) – “FOOTER” text (string, required) – “Thank you for choosing us!” BUTTONS type (string, required) – “BUTTONS” buttons (array, required) – Contains interactive buttons. QUICK_REPLY type (string, required) – “QUICK_REPLY” text (string, required) – “Unsubscribe from Promos” URL Button type (string, required) – “url” text (string, required) – “Go to link” url (string, required) – “https://app.pingtochat.com“ Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Winter Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "45OFF", "35%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your Urwallet subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Components Breakdown HEADER text: “Our pingtochat {{1}} is on!” example: “Winter Sale” BODY text: “Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.” example: “the end of August”, “45OFF”, “35%” FOOTER text: “Use the buttons below to manage your Urwallet subscriptions” BUTTONS Quick Reply Button text: “Unsubscribe Urwallet” URL Button text: “Go to link” url: “https://app.pingtochat.com“ Response { "success": true, "id": "xxxxxx", "name": "edit_z", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Parameter with header body without static button url and quick-replay, phone-number Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_aa", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Parameters name (string, required) – Unique identifier for the template (e.g., “edit_aa”). language (string, required) – Language code for the template (e.g., “en_US”). category (string, required) – Category of the template (e.g., “UTILITY”). allow_category_change (boolean, optional) – Whether the category can be changed (true/false). components (array, required) – List of structural components of the template. Components Breakdown HEADER type (string, required) – “HEADER” format (string, required) – “TEXT” text (string, required) – “Our pingtochat {{1}} is on!” BODY type (string, required) – “BODY” text (string, required) – “Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.” FOOTER type (string, required) – “FOOTER” text (string, required) – “Use the buttons below to manage your marketing subscriptions” BUTTONS type (string, required) – “BUTTONS” buttons (array, required) – Contains interactive buttons. QUICK_REPLY type (string, required) – “QUICK_REPLY” text (string, required) – “Unsubscribe from Promos” PHONE_NUMBER Button type (string, required) – “PHONE_NUMBER” text (string, required) – “Call” phone_number (string, required) – “91xxxxxxxxxx” Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Winter Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "45OFF", "35%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your Urwallet subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Components Breakdown HEADER – Text: “Our summer sale is on in Urwallet!” BODY – Text: “We are introducing our new product in Urwallet!” FOOTER – Text: “Thank you for choosing Urwallet!” BUTTONS Quick Reply Button – “Unsubscribe Urwallet!” URL Button – “Go to link” (Dynamic URL support with example values) Phone Number Button – “Call” (Calls a specified phone number) Response { "success": true, "id": "xxxxxx", "name": "edit_s", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Parameter with header body without static button url and quick-replay, phone-number and copy-code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_ab", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Components Header Text: "Our pingtochat {{1}} is on!" Example: "Summer Sale" Body Text: "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise." Example: {{1}}: "the end of August" {{2}}: "25OFF" {{3}}: "25%" Footer Text: "Use the buttons below to manage your marketing subscriptions" Buttons Quick Reply Button Text: "Unsubscribe from Promos" Phone Number Button Text: "Call" Phone Number: "919526986676" Copy Code Button Example Code: "WRETTT" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Winter Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "45OFF", "35%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your Urwallet subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Components Breakdown HEADER – Text: “Our summer sale is on in Urwallet!” BODY – Text: “We are introducing our new product in Urwallet!” FOOTER – Text: “Thank you for choosing Urwallet!” BUTTONS Quick Reply Button – “Unsubscribe Urwallet!” URL Button – “Go to link” (Dynamic URL support with example values) Phone Number Button – “Call” (Calls a specified phone number) Copy Code Button – Provides a predefined code for easy copying Response { "success": true, "id": "xxxxxx", "name": "edit_ab", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Parameter with header body dynamic button url to static url Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_ac", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" } ] } Parameters Name: edit_ac Language: en_US Category: UTILITY Allow Category Change: true Components Header Text: "Our pingtochat {{1}} is on!" Example: "Summer Sale" Body Text: "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise." Example: {{1}}: "the end of August" {{2}}: "25OFF" {{3}}: "25%" Footer Text: "Use the buttons below to manage your marketing subscriptions" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Winter Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "45OFF", "35%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your Urwallet subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] } ] } ] } Component Header Example: "Winter Sale" Body Example: {{1}}: "the end of August" {{2}}: "45OFF" {{3}}: "35%" Footer Text: "Use the buttons below to manage your Urwallet subscriptions" Buttons URL Button Text: "Go to link" URL: "https://developers.pingtochat.com/{{1}}" Example: "?docs=pingtochat/wp" Response { "success": true, "id": "xxxxxx", "name": "edit_s", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Parameter with header body without dynamic button url to static url and quick-replay Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_ad", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Components Header Text: "Our pingtochat {{1}} is on!" Example: "Summer Sale" Body Text: "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise." Example: {{1}}: "the end of August" {{2}}: "25OFF" {{3}}: "25%" Footer Text: "Use the buttons below to manage your marketing subscriptions" Buttons Quick Reply: "Unsubscribe from Promos" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Winter Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "45OFF", "35%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your Urwallet subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] } ] } ] } Components Breakdown Header Example: "Winter Sale" Body Example: {{1}}: "the end of August" {{2}}: "45OFF" {{3}}: "35%" Footer Text: "Use the buttons below to manage your Urwallet subscriptions" Buttons Quick Reply: "Unsubscribe from Promos" URL Button Text: "Go to link" URL: "https://developers.pingtochat.com/{{1}}" Example: "?docs=pingtochat/wp" Response { "success": true, "id": "xxxxxx", "name": "edit_ad", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Parameter with header body without dynamic button url to static url and quick-replay,phone-number Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_ae", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Components Header Text: "Our pingtochat {{1}} is on!" Example: "Summer Sale" Body Text: "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise." Example: {{1}}: "the end of August" {{2}}: "25OFF" {{3}}: "25%" Footer Text: "Use the buttons below to manage your marketing subscriptions" Buttons Quick Reply: "Unsubscribe from Promos" Phone Number: "Call" (Number: 91xxxxxxxxxx) Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Winter Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "45OFF", "35%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your Urwallet subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Components Breakdown Header Example: "Winter Sale" Body Example: {{1}}: "the end of August" {{2}}: "45OFF" {{3}}: "35%" Footer Text: "Use the buttons below to manage your Urwallet subscriptions" Buttons Quick Reply: "Unsubscribe from Promos" URL Button Text: "Go to link" URL: "https://developers.pingtochat.com/{{1}}" Example: "?docs=pingtochat/wp" Phone Number: "Call" (Number: 91xxxxxxxxxx) Response { "success": true, "id": "xxxxxx", "name": "edit_ae", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Parameter wit header body without dynamic button url to static url and quick-replay,phone-number and copy-code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_af", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Components Header Text: "Our pingtochat {{1}} is on!" Example: "Summer Sale" Body Text: "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise." Example: {{1}}: "the end of August" {{2}}: "25OFF" {{3}}: "25%" Footer Text: "Use the buttons below to manage your marketing subscriptions" Buttons Quick Reply: "Unsubscribe from Promos" Phone Number: "Call" (Number: 919526986676) Copy Code: "WRETTT" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Winter Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "45OFF", "35%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your Urwallet subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Components Header Text: "Our pingtochat {{1}} is on!" Example: "Summer Sale" Body Text: "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise." Example: {{1}}: "the end of August" {{2}}: "25OFF" {{3}}: "25%" Footer Text: "Use the buttons below to manage your marketing subscriptions" Buttons URL Button: Text: "Go to link" URL: "https://app.pingtochat.com" Response { "success": true, "id": "xxxxxx", "name": "edit_af", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. header-text to pdf Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_text_to_pdf", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: TEXT Text: "Our summer sale is on!" Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: MEDIA Format: PDF Example URL: https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "edit_s", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. header-text to image Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_text_to_img", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: TEXT Text: "Our summer sale is on!" Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png" } }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: MEDIA Format: Image Example URL: https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_text_to_img", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. header-text to video Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_text_to_video", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: TEXT Text: "Our summer sale is on!" Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://urwallet.pingtochat.com/template_media/1740161305.mp4" } }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: MEDIA Format: VIDEO Example URL: https://urwallet.pingtochat.com/template_media/1740161305.mp4 Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_text_to_video", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. header-pdf to text Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_pdf_to_text", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: MEDIA Format: PDF Example URL: https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: TEXT Text: "Our summer sale is on!" Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_pdf_to_text", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. header-image to text Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_image_to_text", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: MEDIA Format: IMAGE Example URL: https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: TEXT Text: "Our summer sale is on!" Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_image_to_text", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. header-video to text Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_video_to_text", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://urwallet.pingtochat.com/template_media/1740161305.mp4" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: MEDIA Format: VIDEO Example URL: https://urwallet.pingtochat.com/template_media/1740161305.mp4 Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: TEXT Text: "Our summer sale is on!" Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_video_to_text", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. header-pdf to image Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_pdf_to_image", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: MEDIA Format: PDF Example URL: https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png" } }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: MEDIA Format: IMAGE Example URL: https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_pdf_to_image", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. header-image to pdf Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_image_to_pdf", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: MEDIA Format: IMAGE Example URL: https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: MEDIA Format: PDF Example URL: https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_image_to_pdf", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. header-image to video Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_image_to_video_mar3", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: MEDIA Format: IMAGE Example URL: https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://urwallet.pingtochat.com/template_media/1740161305.mp4" } }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: MEDIA Format: VIDEO Example URL: https://urwallet.pingtochat.com/template_media/1740161305.mp4 Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_image_to_video", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with body Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_b", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are introducing our new product!" } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components(array, required) – List of components in the template. type (string, required) – Type of component (e.g., “BODY”). text (string, required) – The actual text content of the template. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "BODY", "text": "We are introducing our new product in Urwallet!" } ] } Parameters template_id (string, required) – The ID of the template to be updated. components(array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “BODY”). text (string, required) – The updated text content of the template. Response { "success": true, "id": "xxxxxx", "name": "edit_b", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_c", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components(array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required) – The actual text content of the template. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" } ] } Parameters template_id (string, required) – The ID of the template to be updated. components(array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required) – The updated text content of the template. Response { "success": true, "id": "xxxxxx", "name": "edit_c", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_d", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components(array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required) – The actual text content of the template. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Parameters template_id (string, required) – The ID of the template to be updated. components(array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required) – The updated text content of the template. Response { "success": true, "id": "xxxxxx", "name": "edit_b", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer button quick-replay Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_ee", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components(array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required for HEADER, BODY, FOOTER) – The actual text content of the component. buttons(array, optional) – List of buttons in the BUTTONS component. type (string, required) – Type of button (e.g., “QUICK_REPLY”). text (string, required) – The button label. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe" } ] } ] } Parameters template_id (string, required) – The ID of the template to be updated. components(array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required for HEADER, BODY, FOOTER) – The updated text content of the component. buttons(array, optional) – Updated list of buttons in the BUTTONS component. type (string, required) – Type of button (e.g., “QUICK_REPLY”). text (string, required) – The button label. Response { "success": true, "id": "xxxxxx", "name": "edit_b", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer button quick-replay and visit-website Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_f", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://urwallet.pingtochat.com" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components(array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required for HEADER, BODY, FOOTER) – The actual text content of the component. buttons(array, optional) – List of buttons in the BUTTONS component. type (string, required) – Type of button (e.g., “QUICK_REPLY”, “url”). text (string, required) – The button label. url (string, required for url button) – The link to redirect users. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe promo" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Parameters template_id (string, required) – The ID of the template to be updated. components(array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required for HEADER, BODY, FOOTER) – The updated text content of the component. buttons(array, optional) – Updated list of buttons in the BUTTONS component. type (string, required) – Type of button (e.g., “QUICK_REPLY”, “url”). text (string, required) – The button label. url (string, required for url button) – The link to redirect users. Response { "success": true, "id": "xxxxxx", "name": "edit_b", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer button quick-replay and visit-website and phone-number Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_g", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://urwallet.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components(array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required for HEADER, BODY, FOOTER) – The actual text content of the component. buttons(array, optional) – List of buttons in the BUTTONS component. type (string, required) – Type of button (e.g., “QUICK_REPLY”, “url”, “PHONE_NUMBER”). text (string, required) – The button label. url (string, required for url button) – The link to redirect users. phone_number (string, required for PHONE_NUMBER button) – The phone number for calling action. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe promo" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "911234567890" } ] } ] } Parameters template_id (string, required) – The ID of the template to be updated. components(array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required for HEADER, BODY, FOOTER) – The updated text content of the component. buttons(array, optional) – Updated list of buttons in the BUTTONS component. type (string, required) – Type of button (e.g., “QUICK_REPLY”, “url”, “PHONE_NUMBER”, “copy_code”). text (string, required) – The button label. url (string, required for url button) – The link to redirect users. phone_number (string, required for PHONE_NUMBER button) – The phone number for calling action. example (string, required for copy_code button) – Example code for the copy action. Response { "success": true, "id": "xxxxxx", "name": "edit_b", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer button quick-replay,visit-website, phone-number and copy-code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_h", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). text (string, required) – The actual text content of the template. buttons (array, optional) – List of buttons in the template. url (string, optional) – URL for “url” type buttons. phone_number (string, optional) – Phone number for “PHONE_NUMBER” type buttons. example (string, optional) – Example code for “copy_code” type buttons. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe promo" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "911234567890" }, { "type": "copy_code", "example": "ABCD" } ] } ] } Parameters template_id (string, required) – The ID of the template to be updated. components (array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). text (string, required) – The updated text content of the template. buttons (array, optional) – Updated list of buttons in the template. url (string, optional) – Updated URL for “url” type buttons. phone_number (string, optional) – Updated phone number for “PHONE_NUMBER” type buttons. example (string, optional) – Updated example code for “copy_code” type buttons. Response { "success": true, "id": "xxxxxx", "name": "edit_b", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer static without url button Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_i", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”). format (string, optional) – Format of the component, required for “HEADER” type. text (string, required) – The actual text content of the template. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type":"BUTTONS", "buttons": [ { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Parameters template_id (string, required) – The ID of the template to be updated. components (array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format of the component, required for “HEADER” type. text (string, required) – The updated text content of the template. buttons (array, optional) – List of buttons for “BUTTONS” type. type (string, required) – Type of button (e.g., “url”). text (string, required) – Button label. url (string, optional) – URL for “url” type buttons. Response { "success": true, "id": "xxxxxx", "name": "edit_b", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer static without url button and with quick-replay Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_j", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “BODY”). text (string, required) – The actual text content of the template. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Parameters template_id (string, required) – The ID of the template to be updated. components (array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “BODY”). text (string, required) – The updated text content of the template. Response { "success": true, "id": "xxxxxx", "name": "edit_j", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer static without url button and with quick-replay,phone-number Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_k", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Parameters name (string, required): The name of the template. language (string, required): Language code of the template (e.g., “en_US”). category (string, required): The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional): Determines whether the category can be changed. components (array, required): List of components in the template. type (string, required): Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional): Format of the header (e.g., “TEXT”). text (string, required): The actual text content of the template. buttons (array, optional): List of buttons if applicable. type (string, required): Type of button (e.g., “QUICK_REPLY”, “PHONE_NUMBER”). text (string, required): Button text. phone_number (string, optional): Phone number for “PHONE_NUMBER” button type. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxxx" } ] } ] } Parameters template_id (string, required): The ID of the template to be updated. components (array, required): Updated list of components in the template. type (string, required): Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional): Format of the header (e.g., “TEXT”). text (string, required): The updated text content of the template. buttons (array, optional): Updated list of buttons if applicable. type (string, required): Type of button (e.g., “QUICK_REPLY”, “PHONE_NUMBER”, “url”). text (string, required): Button text. url (string, optional): URL for “url” button type. phone_number (string, optional): Phone number for “PHONE_NUMBER” button type. Response { "success": true, "id": "xxxxxx", "name": "edit_k", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer static without url button and with quick-replay,phone-number,copy-code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_l", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format of the component if applicable (e.g., “TEXT”). text (string, required) – The actual text content of the template. buttons (array, optional) – List of buttons included in the template. type (string, required) – Type of button (e.g., “QUICK_REPLY”, “PHONE_NUMBER”, “copy_code”). text (string, required) – The display text of the button. phone_number (string, optional) – The phone number associated with a “PHONE_NUMBER” button. example (string, optional) – Example code for “copy_code” button Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "abcd" } ] } ] } Parameters template_id (string, required) – The ID of the template to be updated. components (array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format of the component if applicable (e.g., “TEXT”). text (string, required) – The updated text content of the template. buttons (array, optional) – List of updated buttons. type (string, required) – Type of button (e.g., “QUICK_REPLY”, “url”, “PHONE_NUMBER”, “copy_code”). text (string, required) – The display text of the button. url (string, optional) – The URL associated with a “url” button. phone_number (string, optional) – The phone number for a “PHONE_NUMBER” button. example (string, optional) – Example code for “copy_code” button. Response { "success": true, "id": "xxxxxx", "name": "edit_l", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer dynamic without url button Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_n", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Parameters HEADER: “Our summer sale is on!” BODY: “Shop now and use code CR7000 to get more offers” FOOTER: “Thank you for choosing us!” BUTTONS: Quick Reply: “Unsubscribe from Promos” Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] } ] } ] } Parameters HEADER: “Our summer sale is on in Urwallet!” BODY: “We are introducing our new product in Urwallet!” FOOTER: “Thank you for choosing Urwallet!” BUTTONS: Quick Reply: “Unsubscribe Urwallet” URL Button: “Go to link” (redirects to https://developers.pingtochat.com/{{1}} with example parameter ?docs=pingtochat/wp) Response { "success": true, "id": "xxxxxx", "name": "edit_n", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer edit without url button and with quick-replay,phone-number Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_o", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Parameters HEADER: “Our summer sale is on!” BODY: “Shop now and use code CR7000 to get more offers” FOOTER: “Thank you for choosing us!” BUTTONS: Quick Reply: “Unsubscribe from Promos” Phone Call Button: “Call” (Dialing 91xxxxxxxxxx) Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “BODY”). text (string, required) – The actual text content of the template. buttons (array, optional) – List of interactive buttons. type (string, required) – Type of button (e.g., “QUICK_REPLY”, “PHONE_NUMBER”). text (string, required) – Button label text. phone_number (string, optional) – Required if button type is “PHONE_NUMBER” (e.g., “91xxxxxxxxxx”). Response { "success": true, "id": "xxxxxx", "name": "edit_o", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer dynamic without url button and with quick-replay,phone-number,copy-code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_p", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “BODY”). text (string, required) – The actual text content of the template. buttons (array, optional) – List of interactive buttons. QUICK_REPLY (string, optional) – Quick reply button text. PHONE_NUMBER (string, optional) – Phone number button, including text (label) and phone_number (number to call). copy_code (string, optional) – Provides an example code that users can copy. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "abcd" } ] } ] } Parameters HEADER (object, required) – The header component, including: format (string, required) – Format of the header (e.g., “TEXT”). text (string, required) – Header content. BODY (object, required) – The body content. text (string, required) – The actual text content of the body. FOOTER (object, required) – The footer component. text (string, required) – Footer content. BUTTONS (array, required) – List of buttons in the template. QUICK_REPLY (string, optional) – Quick reply button text. url (object, optional) – A button that redirects users to a link. text (string, required) – The button label. url (string, required) – The URL for the button. example (array, optional) – Example URL parameters. PHONE_NUMBER (object, optional) – Phone button details. text (string, required) – The button label. phone_number (string, required) – The phone number. copy_code (object, optional) – Provides a code that users can copy. example (string, required) – Example code value. Response { "success": true, "id": "xxxxxx", "name": "edit_p", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer static with url button Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_q", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format of the header text (e.g., “TEXT”). text (string, required) – The actual text content of the component. buttons (array, required) – List of buttons used in the template. type (string, required) – Type of button (e.g., “url”). text (string, required) – Text displayed on the button. url (string, required for “url” buttons) – URL linked to the button. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type":"BUTTONS", "buttons": [ { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] } ] } ] } Parameters components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format of the header text (e.g., “TEXT”). text (string, required) – The actual text content of the component. buttons (array, required) – List of buttons used in the template. type (string, required) – Type of button (e.g., “url”). text (string, required) – Text displayed on the button. url (string, required for “url” buttons) – URL linked to the button. example (array, optional) – Example query parameters that can be appended to the URL. Response { "success": true, "id": "xxxxxx", "name": "edit_q", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer static with url button and with quick-replay Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_r", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Parameters name (string, required) – The unique name identifier for the template (“edit_r”). language (string, required) – The language code for the template (“en_US”). category (string, required) – The category of the template (“MARKETING”). allow_category_change (boolean, optional) – Whether the category can be changed (true). components (array, required) – The structural components of the template. Components Details HEADER type (string, required) – “HEADER” format (string, required) – “TEXT” text (string, required) – “Our summer sale is on!” BODY type (string, required) – “BODY” text (string, required) – “Shop now and use code CR7000 to get more offers” FOOTER type (string, required) – “FOOTER” text (string, required) – “Thank you for choosing us!” BUTTONS type (string, required) – “BUTTONS” buttons (array, required) – Contains interactive buttons. QUICK_REPLY type (string, required) – “QUICK_REPLY” text (string, required) – “Unsubscribe from Promos” URL Button type (string, required) – “url” text (string, required) – “Go to link” url (string, required) – “https://app.pingtochat.com“ Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet!" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] } ] } ] } Parameters name (string, required) – The unique name identifier for the template (“edit_r”). language (string, required) – The language code for the template (“en_US”). category (string, required) – The category of the template (“MARKETING”). allow_category_change (boolean, optional) – Whether the category can be changed (true). components (array, required) – The structural components of the template. Components Details HEADER type (string, required) – “HEADER” format (string, required) – “TEXT” text (string, required) – “Our summer sale is on!” BODY type (string, required) – “BODY” text (string, required) – “Shop now and use code CR7000 to get more offers” FOOTER type (string, required) – “FOOTER” text (string, required) – “Thank you for choosing us!” BUTTONS type (string, required) – “BUTTONS” buttons (array, required) – Contains interactive buttons. QUICK_REPLY type (string, required) – “QUICK_REPLY” text (string, required) – “Unsubscribe from Promos” URL Button type (string, required) – “url” text (string, required) – “Go to link” url (string, required) – “https://app.pingtochat.com“ Response { "success": true, "id": "xxxxxx", "name": "edit_r", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer static with url button and with quick-replay,phone-number Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_s", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Parameters name (string, required) – The unique name identifier for the template (“edit_s”). language (string, required) – The language code for the template (“en_US”). category (string, required) – The category of the template (“MARKETING”). allow_category_change (boolean, optional) – Whether the category can be changed (true). components (array, required) – The structural components of the template. Components Breakdown HEADER type (string, required) – “HEADER” format (string, required) – “TEXT” text (string, required) – “Our summer sale is on!” BODY type (string, required) – “BODY” text (string, required) – “Shop now and use code CR7000 to get more offers” FOOTER type (string, required) – “FOOTER” text (string, required) – “Thank you for choosing us!” BUTTONS type (string, required) – “BUTTONS” buttons (array, required) – Contains interactive buttons. QUICK_REPLY type (string, required) – “QUICK_REPLY” text (string, required) – “Unsubscribe from Promos” URL Button type (string, required) – “url” text (string, required) – “Go to link” url (string, required) – “https://app.pingtochat.com“ Phone Number Button type (string, required) – “PHONE_NUMBER” text (string, required) – “Call” phone_number (string, required) – “91xxxxxxxxxx” Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet!" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "911234567890" }, { "type": "copy_code", "example": "12345" } ] } ] } Components Breakdown HEADER – Text: “Our summer sale is on in Urwallet!” BODY – Text: “We are introducing our new product in Urwallet!” FOOTER – Text: “Thank you for choosing Urwallet!” BUTTONS Quick Reply Button – “Unsubscribe Urwallet!” URL Button – “Go to link” (Dynamic URL support with example values) Phone Number Button – “Call” (Calls a specified phone number) Copy Code Button – Provides a predefined code for easy copying Response { "success": true, "id": "xxxxxx", "name": "edit_s", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer static with url to dynamic url button and with quick-replay,phone-number,copy-code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_t", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Parameters name (string, required) – The unique name identifier for the template (“edit_s”). language (string, required) – The language code for the template (“en_US”). category (string, required) – The category of the template (“MARKETING”). allow_category_change (boolean, optional) – Whether the category can be changed (true). components (array, required) – The structural components of the template. Components Breakdown HEADER type (string, required) – “HEADER” format (string, required) – “TEXT” text (string, required) – “Our summer sale is on!” BODY type (string, required) – “BODY” text (string, required) – “Shop now and use code CR7000 to get more offers” FOOTER type (string, required) – “FOOTER” text (string, required) – “Thank you for choosing us!” BUTTONS type (string, required) – “BUTTONS” buttons (array, required) – Contains interactive buttons. QUICK_REPLY type (string, required) – “QUICK_REPLY” text (string, required) – “Unsubscribe from Promos” URL Button type (string, required) – “url” text (string, required) – “Go to link” url (string, required) – “https://app.pingtochat.com“ Phone Number Button type (string, required) – “PHONE_NUMBER” text (string, required) – “Call” phone_number (string, required) – “91xxxxxxxxxx” Copy code Button type (string, required) – “COPY CODE” text (string, required) – “copy code” copy_code (string, required) – “wrett” Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet!" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "911234567890" } ] } ] } Components Breakdown HEADER – Text: “Our summer sale is on in Urwallet!” BODY – Text: “We are introducing our new product in Urwallet!” FOOTER – Text: “Thank you for choosing Urwallet!” BUTTONS Quick Reply Button – “Unsubscribe Urwallet!” URL Button – “Go to link” (Dynamic URL support with example values) Phone Number Button – “Call” (Calls a specified phone number) Copy Code Button – Provides a predefined code for easy copying Response { "success": true, "id": "xxxxxx", "name": "edit_s", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer dynamic url to static url Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_u", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] } ] } ] } Components Breakdown HEADER Type: “HEADER” Format: “TEXT” Text: “Our summer sale is on!” BODY Type: “BODY” Text: “Shop now and use code CR7000 to get more offers” FOOTER Type: “FOOTER” Text: “Thank you for choosing us!” BUTTONS Type: “BUTTONS” Buttons: URL Button: “Go to link” (URL: “https://developers.pingtochat.com/{{1}}“, Example: “?docs=pingtochat/wp”) Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Components Breakdown HEADER – Text: “Our summer sale is on in Urwallet!” BODY – Text: “We are introducing our new product in Urwallet!” FOOTER – Text: “Thank you for choosing Urwallet!” BUTTONS URL Button – “Go to link” (URL: “https://app.pingtochat.com“) Response { "success": true, "id": "xxxxxx", "name": "edit_s", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. No parameter with header-text and body and footer dynamic url to static button quick-replay,phone-number,copy-code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_x", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Components Breakdown HEADER Type: “HEADER” Format: “TEXT” Text: “Our summer sale is on!” BODY Type: “BODY” Text: “Shop now and use code CR7000 to get more offers” FOOTER Type: “FOOTER” Text: “Thank you for choosing us!” BUTTONS Quick Reply Button: “Unsubscribe from Promos” URL Button: “Go to link” (URL: “https://developers.pingtochat.com/{{1}}“, Example: “?docs=pingtochat/wp”) Phone Number Button: “Call” (Phone Number: “91xxxxxxxxxx”) Copy Code Button: “WRETTT” Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "911234567890" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Components Breakdown HEADER – Text: “Our summer sale is on in Urwallet!” BODY – Text: “We are introducing our new product in Urwallet!” FOOTER – Text: “Thank you for choosing Urwallet!” BUTTONS Quick Reply Button – “Unsubscribe Urwallet” URL Button – “Go to link” (URL: “https://app.pingtochat.com“) Phone Number Button – “Call” (Phone Number: “911234567890”) Copy Code Button – “WRETTT” Response { "success": true, "id": "xxxxxx", "name": "edit_x", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Parameter with header body without static button url Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_y", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" } ] } Parameters name (string, required) – Unique identifier for the template (e.g., “edit_y”). language (string, required) – Language code for the template (e.g., “en_US”). category (string, required) – Category of the template (e.g., “UTILITY”). allow_category_change (boolean, optional) – Whether the category can be changed (true/false). components (array, required) – List of structural components of the template. Components Breakdown HEADER type (string, required) – “HEADER” format (string, required) – “TEXT” text (string, required) – “Our pingtochat {{1}} is on!” example (object, optional) – Example values for the header text. BODY type (string, required) – “BODY” text (string, required) – “Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.” example (object, optional) – Example values for the body text. FOOTER type (string, required) – “FOOTER” text (string, required) – “Use the buttons below to manage your marketing subscriptions.” Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Components Breakdown HEADER text: “Our pingtochat {{1}} is on!” example: Example header text values. BODY text: “Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.” example: Example body text values. FOOTER text: “Use the buttons below to manage your marketing subscriptions.” BUTTONS URL Button text: “Go to link” url: “https://app.pingtochat.com“ Response { "success": true, "id": "xxxxxx", "name": "edit_y", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
Send WhatsApp Message You can easily send WhatsApp messages through Pingtochat by following these steps: Steps to Send a WhatsApp Message: Navigate to the “Services” section in the dashboard. Click on “WhatsApp”. Select “Create Campaign”. You will be redirected to the Send Message form. Fill in the required details: Select Sender Number Choose a Template Add Recipients via: Manual Number Entry Selecting a Group Uploading a File Review the message preview, then click “Send” to initiate your WhatsApp campaign. image Once sent, you can monitor the campaign status and delivery reports are shown in delevery report page.
Delivery Report You can track the status and performance of your sent WhatsApp messages through the Delivery Report. Steps to View the Delivery Report: Navigate to the “Services” section in the dashboard. Click on “WhatsApp”. Select “Delivery Report”. You will be redirected to the Report Page, which displays your message activity in a calendar-like format. 🕒 Report Features: View message status and delivery details based on date and time. Filter reports by phone number or credit usage. Monitor the effectiveness of your campaigns in one place. image This section allows you to track message delivery, failures, and overall campaign performance. image when clicking the count you will be redirect to detailed devivery report page there you can find all details image When you click on the count, you will be redirected to the Detailed Delivery Report page, where you can view all message-specific details. detailed view image view image report image
Template Request In the Admin panel, go to the Template Request menu. This section lists all templates created by users. The admin can approve or reject each template request. The admin can also view each template in detail before making a decision. image
No parameter with body and button with quick-replay and visit-website PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL) For URL buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "markting_q", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "markting_q". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: `Array** Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: `Array** Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_q”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_q”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_q\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_q”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_q”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_q\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_q”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Edit Authentication Template API Articles Zero-Tap to Auto-Fill Zero-Tap to Copy-Code Auto-Fill to Zero-Tap Auto-Fill to Copy-Code Copy-Code to Zero-Tap Copy-Code to Auto-Fill Zero-Tap to Auto-Fill Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "zero_tap_chat", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "zero_tap", "text": "Copy Code", "autofill_text": "Autofill", "zero_tap_terms_accepted": true, "supported_apps": [ { "package_name": "app.pingtochat.com", "signature_hash": "K8a/AINcGX7" } ] } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: zero_tap Text: Copy Code Autofill Text: Autofill Zero Tap Terms Accepted: true Supported Apps: Package Name: app.pingtochat.com Signature Hash: K8a/AINcGX7 Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "AUTHENTICATION" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 10 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "one_tap", "text": "Copy Code", "autofill_text": "Autofill", "package_name": "com.example.luckyshrub", "signature_hash": "K8a/AINcGX7" } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 10 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: one_tap Text: Copy Code Autofill Text: Autofill Package Name: com.example.luckyshrub Signature Hash: K8a/AINcGX7 Success Response { "success": true, "id": "xxxxxx", "name": "edit_s", "category": "AUTHENTICATION" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Zero-Tap to Copy-Code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "zero_tap_chat", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "zero_tap", "text": "Copy Code", "autofill_text": "Autofill", "zero_tap_terms_accepted": true, "supported_apps": [ { "package_name": "app.pingtochat.com", "signature_hash": "K8a/AINcGX7" } ] } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: zero_tap Text: Copy Code Autofill Text: Autofill Zero Tap Terms Accepted: true Supported Apps: Package Name: app.pingtochat.com Signature Hash: K8a/AINcGX7 Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "copy_code", "text": "Copy Code" } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: copy_code Text: Copy Code Success Response Status Code: 201 APPROVED { "success": true, "id": "xxxxxx", "name": "zero_tap_chat", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Auto-Fill to Zero-Tap Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "autofill_to_zero_tab", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 10 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "one_tap", "text": "Copy Code", "autofill_text": "Autofill", "package_name": "app.pingtochat.com", "signature_hash": "K8a/AINcGX7" } ] } ] } Components Body: Includes security recommendations for authentication messages. Footer: Specifies the OTP code expiration time (5 minutes). Buttons: OTP Type: zero_tap Button Text: “Copy Code” Autofill Text: “Autofill” Zero Tap Terms Accepted: true Supported Apps: Defines package names and signature hashes for authentication. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "zero_tap", "text": "Copy Code", "autofill_text": "Autofill", "zero_tap_terms_accepted": true, "supported_apps": [ { "package_name": "com.example.luckyshrub", "signature_hash": "K8a/AINcGX7" } ] } ] } ] } Components Body: Includes security recommendations. Footer: OTP code expiration time (10 minutes for one-tap, 5 minutes for zero-tap). Buttons: One Tap Option: Provides a copy code button with autofill capability. Zero Tap Option: Supports direct authentication without manual entry. Success Response { "success": true, "id": "xxxxxx", "name": "autofill_to_zero_tab", "category": "marketing" } Notes Ensure that {{your_domain}}, {{phone_number_id}}, and {{key}} are correctly replaced with actual values. The zero_tap_terms_accepted field must be set to true for Zero Tap authentication. The supported applications must match the package name and signature hash used for authentication. This setup enables secure and seamless authentication experiences for users. Auto-Fill to Copy-Code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "autofill_to_copy_code", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 10 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "one_tap", "text": "Copy Code", "autofill_text": "Autofill", "package_name": "app.pingtochat.com", "signature_hash": "K8a/AINcGX7" } ] } ] } Components Body: Includes security recommendations for authentication messages. Footer: Specifies the OTP code expiration time (5 minutes). Buttons: OTP Type: zero_tap Button Text: “Copy Code” Autofill Text: “Autofill” Zero Tap Terms Accepted: true Supported Apps: Defines package names and signature hashes for authentication. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "copy_code", "text": "Copy Code" } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: copy_code Text: Copy Code Success Response Status Code: 201 APPROVED { "success": true, "id": "xxxxxx", "name": "autofill_to_copy_code", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Copy-Code to Zero-Tap Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "copy_code_to_zero_tap", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "copy_code", "text": "Copy Code" } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: copy_code Text: Copy Code Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "zero_tap", "text": "Copy Code", "autofill_text": "Autofill", "zero_tap_terms_accepted": true, "supported_apps": [ { "package_name": "com.example.luckyshrub", "signature_hash": "K8a/AINcGX7" } ] } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: zero_tap Text: Copy Code Autofill Text: Autofill Zero Tap Terms Accepted: true Supported Apps: Package Name: app.pingtochat.com Signature Hash: K8a/AINcGX7 Response { "success": true, "id": "xxxxxx", "name": "copy_code_to_zero_tap", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies. Copy-Code to Auto-Fill Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "copy_code_to_auto_fill", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "copy_code", "text": "Copy Code" } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: copy_code Text: Copy Code Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 10 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "one_tap", "text": "Copy Code", "autofill_text": "Autofill", "package_name": "com.example.luckyshrub", "signature_hash": "K8a/AINcGX7" } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: zero_tap Text: Copy Code Autofill Text: Autofill Zero Tap Terms Accepted: true Supported Apps: Package Name: app.pingtochat.com Signature Hash: K8a/AINcGX7 Response { "success": true, "id": "xxxxxx", "name": "copy_code_to_auto_fill", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
Delivery Report You can track the status and performance of your sent WhatsApp messages through the Delivery Report. Steps to View the Delivery Report: Navigate to the “Services” section in the dashboard. Click on “WhatsApp”. Select “Delivery Report”. You will be redirected to the Report Page, which displays your message activity in a calendar-like format. 🕒 Report Features: View message status and delivery details based on date and time. Filter reports by phone number or credit usage. Monitor the effectiveness of your campaigns in one place. image This section allows you to track message delivery, failures, and overall campaign performance. image when clicking the count you will be redirect to detailed devivery report page there you can find all details image When you click on the count, you will be redirected to the Detailed Delivery Report page, where you can view all message-specific details. detailed view image view image report image
WhatsApp Chat Pingtochat also provides a Chat feature. After a message is successfully sent, the conversation will appear on the Chat page, where you can view and continue the conversation directly with the recipient. Easily manage your WhatsApp conversations through the Pingtochat chat interface. How to Access WhatsApp Chat: Go to the “Services” section in the dashboard. Click on “WhatsApp”. Select “WhatsApp Chat” from the menu. You’ll be redirected to the Chat Page, where you can: View all active WhatsApp conversations Respond to messages in real time Continue ongoing chats or initiate new replies image
Theme Settings Color Settings 1.Navigate to the Admin in Dashboard. 2.Go to Theme Settings 3.Select Color Settings. 4.In the Color Settings section, the admin can customize the appearance of the admin panel, including: Theme Color: Choose a primary color for the panel’s theme to match your brand or preference. Dark Mode: Toggle between light mode and dark mode for better visual comfort. Menu Layout: Select from available menu layout styles (e.g., vertical, horizontal, collapsed). 5.Additionally, the admin can upload or update the panel logo to personalize the branding of the admin interface. image Default Menu Navigate to the Admin in Dashboard. Go to Theme Settings Click on Menu Settings. In this section, the admin can set the default home page that users will see after logging in. A list of available pages will be displayed. The admin can select any page from the list and set it as the default home page. Once set, users will be redirected to this selected page immediately after login. image
No parameter with body and button with quick-replay , visit-website , phone-number PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number) For URL and Phone Number buttons, they do not need to be included in the Example code. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "markting_r", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "markting_r". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: `Array** Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: `Array** Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_r\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Template Library Articles Utility Authentication Utility Finalize account set-up Hi John, Your new account has been created successfully. Please verify your email address to complete your profile. 🔗 Verify account Upcoming automatic payment Hi John, Your automatic payment for CS Mutual Checking is scheduled on Jan 1, 2024 for $12.34. Kindly ensure your balance is sufficient to avoid late fees. 🔗 View account Upcoming automatic payment Hi John, this is to remind you of your upcoming auto-pay: Date: Jan 1, 2024 Account: Market Credit Plus Amount: $12.34 Thank you and have a nice day. 🔗 View details Payment Reminder Reminder: Your scheduled payment for your CS Mutual Credit Plus card ending in 1234 is scheduled for Mar 22, 2024. Thank you. Order Delivered John, your order was successfully delivered! You can track your package and manage your order below. 🔗 Manage order Order Delivered John, great news! Your order #12345 was delivered. Need to return or replace an item? Click to manage your order. 🔗 Manage Order Order Delivered John, your order was successfully delivered! You can track your package and manage your order below. 🔗 Manage order Order Delivered John, great news! Your order #12345 was delivered. Need to return or replace an item? Click to manage your order. 🔗 Manage Order Order Delivered John, your order #12345 was delivered on Jan 1, 2024. If you need to return or replace item(s), please click below. 📌 Start Return Could Not Deliver Your Order Hi John, We attempted to deliver your order on Jan 1, 2024 but were not successful. Please contact us at 1800-555-1234 to arrange re-delivery. Thank you. 🚚 Manage Delivery 📞 Call Us We Were Unable to Deliver Your Order We were unable to deliver order #12345 today. Please try a redelivery to schedule another delivery attempt. 📦 Schedule Delivery We Were Unable to Deliver Your Order We were unable to deliver order #12345 today. Please try a redelivery to schedule another delivery attempt. 📦 Reschedule Your Order is On Its Way John, your order #12345 is on its way and should arrive soon. Estimated delivery is between 1pm and 4pm. We will provide an update when your order is delivered. An adult must be home to accept this package. 📦 Track Order Your Order is Out for Delivery! John, your order #12345 is out for delivery! It should be delivered at your doorstep between 1pm and 4pm. We hope you enjoy your item(s)! 📦 Track Order Out for Delivery Your order #12345 is out for delivery! It should arrive by Jan 1, 2024. Thank you for your business. 📦 Track Order You have an upcoming event Reminder: You RSVP’ed to John’s 30th birthday party by John and Jane. The event starts on January 1 at 7 pm at 123 Baker Street, Palo Alto, CA 91041. Reminder: John’s 30th birthday party is coming up and you have RSVP’ed yes. See you at 7 pm at Party Place. Thank you for RSVP’ing to John’s 30th birthday party by John and Jane. See you on January 1st at 7 pm! Your RSVP for John’s 30th birthday party by John and Jane is confirmed! Thanks! Reminder: John and Jane invited you to John’s 30th birthday party taking place on January 1st at 7 pm. Click below to RSVP. 🔗 RSVP Reminder: You’ve been invited to John’s 30th birthday party by John and Jane. Click below to RSVP. 🔗 RSVP Hi John, Thank you for your recent visit with us. We value your feedback and would appreciate you sharing more about your experience with us at the link below. This should only take 5 minutes. We appreciate your time. 🔗 Leave a Feedback How did we do? Thank you for visiting us at Jasper’s Market, 123 Baker street. Palo Alto CA, 91041 on Jan 1, 2024. We value your feedback. Please fill out this short survey to let us know how we can continue to improve. 🔗 Fill out survey How did we do? At Jasper’s Market, we value customer feedback and use it to continually improve our products. Please fill out a short survey, linked below, to let us know more about your recent purchase with us. Thank you in advance. 🔗 Provide feedback Rate your experience Your feedback is important to us. Please take a quick survey about your recent flight booking experience. 🔗 Take survey At Jasper’s Market, we value customer feedback and use it to continually improve our products. Please fill out a short survey, linked below, to let us know more about your recent purchase with us. Thank you in advance. 🔗 Take survey Hi John, We noticed a suspicious transaction on your CS Mutual debit card from Jasper’s Market for $12.34. If you didn’t make this transaction, please call us immediately at 1800-555-1234. You can also click below to freeze your card. Thank you! 📞 Call Us 🔗 Freeze card Hi John, This is CS Mutual. We identified a suspicious transaction on your CS Mutual debit card ending in 1234: Date: Jan 1, 2024 Merchant: Jasper’s Amount: $12.34 Did you make this purchase? ↩ Yes ↩ No Hi John, We noticed a suspicious charge on your credit card account. Please verify the details of this transaction. 🔗 Verify Transaction Suspicious transaction Hi John, We detected a suspicious transaction on your CS Mutual debit account card ending in 1234. Please verify if this was you. 🔗 Verify Transaction Low account balance Hi John, This is to notify you that your available funds in your CS Mutual checking plus account ending in 1234 is below your pre-set limit of $50.00. Click below to add funds or call us. 🔗 Make a deposit 📞 Call Us Hi John, Available funds in your CS Mutual checking plus account ending in 1234 are below your pre-set $50.00 limit. 🔗 Make a deposit 📞 Call Us John, before we can process your order #12345, we need to verify some information. Please contact us at your earliest convenience. Thank you. 📞 Call Us We were unable to process your order #12345. Please call us at 1800-555-1234 for next steps. 📞 Call Us Order canceled John, your order #12345 has been successfully canceled. Your refund will be processed in 7 business days. Thank you. 🔗 View order details John, per your request, we have canceled your order #12345. Your refund will be processed in 7 business days. You can track this below. 🔗 View order details Hi, this is to confirm we have successfully canceled your recent order #559032. Thank you. 🔗 View order details John, there is a delay in delivering your order #12345. We’re working to resolve it as soon as possible. We will follow up with an update. We apologize for any inconvenience. We’ll send you an updated delivery status when we can. 🔗 Track my order 🔗 View order details Item(s) out-of-stock Hi John, Item(s) from your recent order #12345 are out-of-stock. We will notify you as soon as your item(s) ship. If you prefer not to wait, please click below to cancel your order. We apologize for any inconvenience. 🔗 Manage Order Order confirmed Hi John, Thank you for your purchase! Your order number is #12345. We’ll start getting 2 12-pack of Jasper’s paper towels ready to ship. Estimated delivery: Jan 1, 2024 We will let you know when your order ships. 🔗 View order details Order confirmed John, your order is confirmed and your order number is #12345. Estimated delivery: Jan 1, 2024. We will follow up with more details as we prepare your order for shipment. 🔗 View order details Order confirmed John, we’ve received your order. Your order number is #12345. Click below to manage your order. 🔗 Manage Order Order confirmed Hi Pavan, Your order has been successfully placed and is being processed. Your order number is #12345. 🔗 View Order Ready for pick up! John, your order #12345 is ready for pick up at Jasper’s Market, 1234 Baker street. Palo Alto, CA 94301. Message us when you arrive and we will bring your order out to you. See you soon! 🔗 I’ve arrived Great news! Your order #12345 is now ready for pick up at Jasper’s Market, 1234 Baker street. Palo Alto, CA 94301. Click “I’m here” when you arrive and we will meet you with your products. See you soon! 🔗 I’m here Verify your payment info Hi John, Payment for your CS Mutual card card ending in 1234 is coming due. Verify your information to avoid overdue fees. Please ignore this message if you’ve already paid. 🔗 Verify Review a recent transaction Hi John, We encountered an issue with your recent transaction for $12.34 at Jasper’s Market. Please contact us at 1-800-555-1234 for assistance. 📞 Call us Could not process payment Your scheduled payment of $12.34 for CS Mutual debit plus could not be processed. Please contact us at 1-800-555-1234 for assistance. 📞 Call us Hi John, We have received your payment of $12.34 for CS Mutual debit card. Thank you for your payment. 🔗 View payment details Successful payment Your payment of $12.34 for CS Mutual credit card has been processed successfully. We appreciate your business. 🔗 View details Payment confirmation: Account: CS Mutual credit card Amount: $12.34 Date: Jan 1, 2024 Thank you and have a nice day. 🔗 View details Hi John, your recent payment of $12.34 for your CS Mutual Credit plus card account has failed. Please check your account and try again. 🔗 View Account Hi John, We were unable to process your payment of $12.34 for CS Mutual Credit plus card. Please update your payment method or contact us for assistance. 🔗 View Account 📞 Call Us Your payment was rejected. Account: CS Mutual debit plus Amount: $12.34 Date: Jan 1, 2024 Please check your account and try again. 🔗 View Account Your payment for $12.34 will be processed on Jan 1, 2024. Thank you! 🔗 View Account Thank you for scheduling your payment of $12.34. We will charge your card on Jan 1, 2024. 🔗 View Account This is to confirm your payment of $12.34 for your card will be processed on Jan 1, 2024. 🔗 View Account Payment overdue Your credit card payment of $12.34 is overdue by 3 days. Please pay now to avoid avoid late fees. Contact us if you need assistance. 🔗 Pay Now 📞 Contact Us Hi John, you have a payment overdue: Account: CS Mutual card Amount due: $12.34 Due date: Jan 1, 2024 Pay now to complete payment via our website. Please ignore this message if you’ve already paid. 🔗 Pay Now Payment is overdue for your CS Mutual card card ending in 1234 for $12.34. Please click to pay now and avoid late fees. 🔗 Pay Now Payment is overdue for your CS Mutual card card ending in 1234. Please click to pay now and avoid late fees. 🔗 Review and Pay {{Product name}} Quantity {{#}} Total ₹{{#}} Hi John, you have a payment overdue: Account: CS Mutual card Due date: Jan 1, 2024 Pay now to complete payment via our website. Please ignore this message if you’ve already paid. 🔗 Review and Pay {{Product name}} Quantity {{#}} Total ₹{{#}} Payment overdue Your credit card payment is overdue by 3 days. Please pay now to avoid late fees. Contact us if you need assistance. 🔗 Review and Pay Payment due soon Hello John, Your payment of $12.34 is due on Jan 1, 2024. Please ignore this message if you’ve already paid. 🔗 Pay Now Your payment of $12.34 is due on Jan 1, 2024. Pay now to avoid late fees. If you already paid, please ignore this message. 🔗 Pay Now Payment due Payment reminder: Account: CS Mutual card XXX-1234 Amount due: $12.34 Due date: Jan 1, 2024 Pay now to avoid late fees. Please ignore this if you have already paid. 🔗 Pay Now Payment of $12.34 due Hi John, Payment of $12.34 for your CS Mutual debit plus card ending in 1234 is due on Jan 1, 2024. Pay now to avoid late fees. Please ignore this if you have already paid. 🔗 Pay Now ORDER #{{Order number}} {{Product name}} Quantity {{#}} Total ₹{{#}} Payment due Hi John, Payment for your CS Mutual debit plus card ending in 1234 is due on Jan 1, 2024. Pay now to avoid late fees. Please ignore this message if you’ve already paid. 🔗 Review and Pay ORDER #{{Order number}} {{Product name}} Quantity {{#}} Total ₹{{#}} Payment due Payment reminder: Account: CS Mutual card XXX-1234 Due date: Jan 1, 2024 Pay now to avoid late fees. Please ignore this message if you’ve already paid. 🔗 Review and Pay ORDER #{{Order number}} {{Product name}} Quantity {{#}} Total ₹{{#}} Your payment is due on Jan 1, 2024. Pay now to avoid late fees. If you’ve already paid, please ignore this message. 🔗 Review and Pay ORDER #{{Order number}} {{Product name}} Quantity {{#}} Total ₹{{#}} Payment due soon Your payment is due on Jan 1, 2024. Please ignore this message if you’ve already paid. 🔗 Review and Pay Your payment of $12.34 for your CS Mutual Credit Plus account is scheduled for Jan 1, 2024. Please ensure you have sufficient funds to avoid generating any late fees. 🔗 Manage payment Upcoming scheduled payment Hi John, Thank you for scheduling your payment of $12.34 for your CS Mutual debit plus account on Jan 1, 2024. Please visit your account if you would like to make any changes ahead of this date. 🔗 Manage payment Hi John, this is to remind you of your upcoming scheduled payment: Date: Jan 1, 2024 Account: CS Mutual debit plus Amount: $12.34 Thank you and have a nice day. 🔗 Manage payment 📄 Thank you for your purchase of $12.34 from Jasper’s Market, 123 Baker street. Palo Alto CA, 91041. Your receipt PDF is attached. 📄 Thank you for using your credit card at CS Mutual. Your receipt is attached as a PDF. This message is to confirm your purchase for $12.34 from CS Mutual on Jan 1, 2024. You were refunded for $25 Hi John, Your refund for $25 has been processed for order #12345. You’ll be credited back to your original payment method in 3-5 business days. John, thank you for returning product(s) from your order #12345. We are currently processing your return and will notify you of your refund status. 🔗 Manage Order Return received We have received item(s) from your order #12345. Your return is complete, and we have processed your refund for $12.34. Thank you for your business. 🔗 Manage order Order shipped John, your order has shipped! Your tracking number is ZK12345KI999. Estimated delivery is Jan 1, 2024. We will continue to provide updates on this shipment until it is delivered. 🔗 Track shipment John, great news! Your order #12345 has shipped. Tracking #: ZK4539O2311J Estimated delivery: Jan 1, 2024 We will provide updates until delivery. 🔗 Track shipment John, your order #12345 has left our facility and is on its way to you! Your tracking ID is ZK12345KI999. Click below to track your package. 🔗 Track my order Statement available Hi John, Your January statement for your account ending in 1234 is now available. Click below to see your statement. 🔗 View statement Statement available This is to notify you that your latest statement for your Mankt checking plus account is now available. Please log into your account to view your statement. 🔗 View statement Authentication Your order is arriving soon. {{code}} is your verification code. Please show this to the delivery associate. 6:52 AM Your order is on its way and scheduled to arrive at {{date}}. Please show verification code {{code}} to receive your order. 6:52 AM Please share code {{code}} with the delivery agent after verifying the package. 6:52 AM Your order of {{number}} items (Order ID: {{text}}) is out for delivery today. Please provide the code {{code}} to the delivery agent to receive your order. 6:52 AM {{code}} is your verification code. 6:52 AM {{code}} is your password recovery code. 6:52 AM Use code {{code}} to authorize your transaction. 6:52 AM Use code {{code}} to verify your transaction of {{amount}}. 6:52 AM Use code {{code}} to verify your transaction of {{amount}} on your card ending in {{card number}}. 6:52 AM Use code {{code}} to verify your transaction of {{amount}} on your account ending in {{number}}. 6:52 AM {{code}} is your verification code for transfer of {{amount}}. 6:52 AM
WhatsApp Chat Pingtochat also provides a Chat feature. After a message is successfully sent, the conversation will appear on the Chat page, where you can view and continue the conversation directly with the recipient. Easily manage your WhatsApp conversations through the Pingtochat chat interface. How to Access WhatsApp Chat: Go to the “Services” section in the dashboard. Click on “WhatsApp”. Select “WhatsApp Chat” from the menu. You’ll be redirected to the Chat Page, where you can: View all active WhatsApp conversations Respond to messages in real time Continue ongoing chats or initiate new replies image
MIS Pingtochat provides a built-in MIS feature to help you monitor and analyze your platform usage effectively. How to Access MIS: Navigate to the “Services” section in the dashboard. Click on “WhatsApp”. Select “MIS” from the options. MIS Dashboard Features: Transaction Graphs – Visualize WhatsApp message activity over time. Credit Usage Graphs – Track how credits are consumed in campaigns. Advanced Filters – Analyze data by time range, sender ID, or template. Use the MIS section to monitor your message delivery trends, optimize credit usage, and improve overall performance. image
Payments User Payment Credits Navigate to the Admin panel. Go to the Payments section. In this section, you will find the User Payment Credits List. This list displays all users’ credit details, including: Credit amounts Payment status (e.g., Paid or Unpaid) If a user has already made a payment, the admin can manually update the payment status to reflect this. This feature allows the admin to correct or confirm payment records as needed. image User Wallet Logs Navigate to the Admin panel. Go to the Payments section. Click on the User Wallet Logs menu. This section displays detailed wallet transaction logs for each user. It includes information such as: Wallet balance updates Credit or debit history Usage details (e.g., credits used for sending messages) Timestamps and descriptions of each transaction This allows the admin to monitor and audit wallet activity for all users effectively. image
No parameter with header-text , body ,button quick-replay , visit-website and phone-number PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number) For URL and Phone Number buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "markting_j", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_j". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: `Array** Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: `Array** Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_j\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_j\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Template status check Overview The Template Status Check API allows users to retrieve the approval status of a specific WhatsApp Business API message template. This API is useful for monitoring template approvals and ensuring that a template is available for use in messaging. API End point http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_status Replace the placeholders with: {phone_number_id} → Your WhatsApp Business Account phone number ID. {key} → Your authentication key (API key or access token). {template_id} → The unique ID of the template whose status is being checked. Example Response Success Response (Template Found) { "success": true, "id": "353335", "name": "edit_al", "category": "marketing", "status": "APPROVED" } Explanation of Fields success Type: boolean Value: true or false Description: Indicates whether the API request was successful. id Type: string Example: "353335" Description: A unique identifier assigned to the template. name Type: string Example: "edit_al" Description: The name of the WhatsApp template. category Type: string Example: "marketing" Description: Specifies the category of the template (e.g., "marketing", "utility", "authentication"). status Type: string Values: "APPROVED", "PENDING", "REJECTED" Description: The current approval status of the template.
MIS Pingtochat provides a built-in MIS feature to help you monitor and analyze your platform usage effectively. How to Access MIS: Navigate to the “Services” section in the dashboard. Click on “WhatsApp”. Select “MIS” from the options. MIS Dashboard Features: Transaction Graphs – Visualize WhatsApp message activity over time. Credit Usage Graphs – Track how credits are consumed in campaigns. Advanced Filters – Analyze data by time range, sender ID, or template. Use the MIS section to monitor your message delivery trends, optimize credit usage, and improve overall performance. image
WhatsApp SandBox The Sandbox environment in Pingtochat allows you to test WhatsApp messaging features before going live. How to Access and Activate the Sandbox: Navigate to “Services” in the dashboard. Click on “WhatsApp”, then select “Sandbox”. Scan the QR Code displayed on the screen using your WhatsApp mobile app. A default message will be sent automatically to activate the sandbox. If you are not activated the sandbox you can raise a ticket for this option then our team will be activate your sandbox Once Activated: You can test sending and receiving messages in a safe environment. Sample code snippets in various programming languages are available, including: cURL PHP Python Java C# NodeJS Ruby This is ideal for developers to integrate and test the API before using the live environment.
Support Menu Manage Tickets Navigate to the Admin in Dashboard. Go to the Support menu Select Manage Tickets. This section displays all support tickets submitted by users. The admin can communicate with users by sending messages in a chat-like interface. The admin has the ability to: Cancel a ticket Close a ticket Reopen a ticket if it was previously canceled or closed If a ticket is canceled, the admin can still open it again to continue addressing the issue. image Sales Enquiry Navigate to the Admin in Dashboard. Go to Support Select Sales Enquiry menu. This section displays all sales-related issues submitted by users. The admin can assign each sales enquiry to a sales support user. A list of all sales support users associated with the admin is available for selection. The admin selects a sales support user and assigns the enquiry to them. The status of each assigned enquiry is also shown, such as Completed or Processing or Review image
No parameter with body and button with quick-replay , visit-website , phone-number and copy-code PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number, Copy Code) For URL and Phone Number buttons, they do not need to be included in the Example payload. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "markting_s", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "markting_s". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: `Array** Description: Defines the button text. text: "Unsubscribe from Promos" Copy Code Button Type: button Description: Adds a Copy Code button. sub_type Value: "copy_code" Description: Defines the button as a Copy Code button. "copy_code": Allows users to copy a predefined code. index Type: Integer Description: Position of the button in the template. "1": The second button. parameters Type: `Array** Description: Defines the text associated with the Copy Code button. text: "WRETTT" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_s\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_s\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
WhatsApp SandBox The Sandbox environment in Pingtochat allows you to test WhatsApp messaging features before going live. How to Access and Activate the Sandbox: Navigate to “Services” in the dashboard. Click on “WhatsApp”, then select “Sandbox”. Scan the QR Code displayed on the screen using your WhatsApp mobile app. A default message will be sent automatically to activate the sandbox. If you are not activated the sandbox you can raise a ticket for this option then our team will be activate your sandbox Once Activated: You can test sending and receiving messages in a safe environment. Sample code snippets in various programming languages are available, including: cURL PHP Python Java C# NodeJS Ruby This is ideal for developers to integrate and test the API before using the live environment.
Transaction Logs Pingtochat provides a comprehensive Transaction Log History, which is divided into two main sections: Credit Log and Wallet Log. The Credit Log records all credit purchases made by the user, displaying complete details such as the amount, date of purchase, and payment status. This helps users easily track their credit top-ups. On the other hand, the Wallet Log contains all transaction details related to WhatsApp payments and other associated activities within the platform. Together, these logs offer clear visibility into your financial activity and ensure better control over your account usage. Articles Credit Logs Wallet Logs Credit Logs This section displays all records related to credit purchases.Whenever you buy credits, the complete transaction details — including the amount, date, and status — will be shown here. How to Access Credit Logs: Go to the Dashboard Navigate to “Transaction Logs” Click on “Credit Logs” This helps you keep track of your credit top-ups with full transparency. image Wallet Logs How to Access Wallet Logs: Go to the Dashboard Navigate to “Transaction Logs” Click on “Wallet Logs” This section contains all transaction details related to WhatsApp usage, including: Message sending costs Template charges Other payment-related activities The Wallet Log helps you monitor how your credits are being used across various WhatsApp-related services. image
Report WhatsApp Report Navigate to the Admin panel. Go to the Reports section Click on WhatsApp Report. This section displays a calendar view. In the calendar, you will see the daily count of WhatsApp messages sent. When you click on a specific date, a detailed view opens showing: A breakdown of message activity for that day Data for all users, including message counts and relevant details This helps the admin monitor and analyze WhatsApp usage across all users in a calendar-based format. image
No parameter with header-text , body ,button quick-replay , visit-website , phone-number and copy-code PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number, Copy Code) For URL and Phone Number buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_k", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_k". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. 1. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" 2. Copy Code Button Type: button Description: Adds a Copy Code button, which allows users to copy a given promo code. sub_type Value: "copy_code" Description: Allows users to copy a promo code for future use. index Type: Integer Description: Position of the button in the template. "1": The second button. parameters Type: Array Description: Contains the promo code to be copied. text: "WRETTT" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_k”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_k”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_k\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_k”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_k”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_k\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_k”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Supported File Formats This document outlines the supported file types that can be sent as attachments in a session message. Attachments are categorized by media type: Image, Video, Audio, and Documents. 1. 📷 Image Attachments Image files can be shared to visually communicate content such as photos, screenshots, infographics, or promotional materials. FormatDescription.jpgJPEG image format. Widely used for photos and web graphics..pngPortable Network Graphics. Supports transparency, ideal for UI elements and screenshots. 2. 🎥 Video Attachments Video files allow for sending motion content, tutorials, clips, and marketing videos. FormatDescription.3gp3GPP multimedia format, optimized for mobile use..mp4MPEG-4 format. Commonly used for high-quality video and audio compression. 3. 📄 Document Attachments Documents can be shared to convey textual, tabular, or presentation-based information. FormatDescription.txtPlain text file. Lightweight format for notes or code..xlsMicrosoft Excel (Legacy). Spreadsheet format for tabular data..xlsxMicrosoft Excel (Modern). Supports advanced Excel features..docMicrosoft Word (Legacy). Used for formatted text documents..docxMicrosoft Word (Modern). Common word processing format..pptMicrosoft PowerPoint (Legacy). Used for slide presentations..pptxMicrosoft PowerPoint (Modern). Supports multimedia presentations..pdfPortable Document Format. Preserves layout and formatting across devices.
Transaction Logs Pingtochat provides a comprehensive Transaction Log History, which is divided into two main sections: Credit Log and Wallet Log. The Credit Log records all credit purchases made by the user, displaying complete details such as the amount, date of purchase, and payment status. This helps users easily track their credit top-ups. On the other hand, the Wallet Log contains all transaction details related to WhatsApp payments and other associated activities within the platform. Together, these logs offer clear visibility into your financial activity and ensure better control over your account usage. Articles Credit Logs Wallet Logs Credit Logs This section displays all records related to credit purchases.Whenever you buy credits, the complete transaction details — including the amount, date, and status — will be shown here. How to Access Credit Logs: Go to the Dashboard Navigate to “Transaction Logs” Click on “Credit Logs” This helps you keep track of your credit top-ups with full transparency. image Wallet Logs How to Access Wallet Logs: Go to the Dashboard Navigate to “Transaction Logs” Click on “Wallet Logs” This section contains all transaction details related to WhatsApp usage, including: Message sending costs Template charges Other payment-related activities The Wallet Log helps you monitor how your credits are being used across various WhatsApp-related services. image
Profile You can easily update your personal information through the profile settings in the dashboard. 👤 How to Edit Your Profile: Go to the Dashboard Navigate to “Settings” Click on “Profile Settings” Update your details such as: Name Email Address Designation Phone Number Password (if needed) After making the changes, click “Save” to update your profile. This section helps you keep your account information accurate and up to date. ⚙️ Available Settings Profile 🔒 Change Password 💳 Wallet Details 🛠️ Configuration Settings 📶 Service Status 🔔 Notifications 📧 Email Settings Each section allows you to customize and manage specific aspects of your Pingtochat account for better control and functionality.
Notification Add Notifications Navigate to the Admin in Dashboard. Go to the Notification section. Select Add Notifications In this section, the admin can create and send notifications to: Regular users Support users While creating a notification, the admin can: Set a title for the notification Choose a priority level (e.g., High, Medium, Low) Write a custom message The admin also has the option to send the notification via email to the selected users. This allows effective communication of important updates, alerts, or announcements. image List of Notifications Navigate to the Admin in Dashboard. Go to the Notification section. Select Notifications This section displays all notifications created by the admin. For each notification, the admin can view: The list of recipients The read/unread status for each user This allows the admin to track who has seen the notification and take further action if needed. image
Error Types Pingtochat uses conventional HTTP response codes to indicate the success or failure of an API request.Below, we provide some common error codes: API Verification Code Error code Description300Your token not valid.301Your key is Invalid.303Your current key phrase is expired. Please regenerate token.304User is not valid.305phone_number_id is incorrect.306waba sender id data not found.307WabaConfiguration not found.308SupplierConfiguration Token is Required.309Api Service Not Activated.310Domain not valid.311User Supplier Configuration Not Activated. Contact to Support.312WhatsApp API Setting URL and Token Required.313Supplier Operator not providing service.314missing whatsapp service packages table data Template Creation Code Error CodeDescription400Required whatsapp number or contact group or contact upload.401Creadits Not Sufficient to send message.403There is already content for this template. You can create a new template and try again.404Template Not Found for You. Default Rate Limits CategoryLimitTime WindowGeneral Requests1000 requestsPer HourHigh-Volume APIs200 requestsPer MinuteBulk Operations5000 requests (e.g., message sends)Per Day
Parameter with header and body Overview A header that dynamically personalizes the message with text. A body that provides additional message content with placeholders for dynamic text. This template is used for sending marketing-related messages to users. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_t", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Hi user" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_t". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "Hi user" – The actual content of the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "MTA0NDQ5" } ], "messages": [ { "id": "KrNLbzOCZb", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } } ‘ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } } ‘, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_t\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_t\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Profile You can easily update your personal information through the profile settings in the dashboard. 👤 How to Edit Your Profile: Go to the Dashboard Navigate to “Settings” Click on “Profile Settings” Update your details such as: Name Email Address Designation Phone Number Password (if needed) After making the changes, click “Save” to update your profile. This section helps you keep your account information accurate and up to date. ⚙️ Available Settings Profile 🔒 Change Password 💳 Wallet Details 🛠️ Configuration Settings 📶 Service Status 🔔 Notifications 📧 Email Settings Each section allows you to customize and manage specific aspects of your Pingtochat account for better control and functionality.
Admin In the Admin section, under Users, Pingtochat allows you to manage user accounts efficiently. As an admin, you can create new users, promote users to roles such as Support User or Sales User, and manage existing users. You can also view detailed user information and access user activity reports, giving you full control over user management within the platform. Articles Email Configuratoin SEO Configuration WhatsApp Package Create User Manage User Admin Settings Template Request Theme Settings Payments Support Menu Report Notification Email Configuratoin Admin SMTP Configuration? Admin SMTP Configuration refers to the setup process performed by system administrators to enable email sending from a server, web application, or platform. This configuration ensures the system can send essential emails reliably and securely. How to Set Up SMTP Go to Admin in dashboard Click on Email. Select SMTP. Click Create to add a new SMTP configuration. Fill in the required SMTP details (e.g., server, port, username, password, etc.). Save the configuration. Use the Send Test Email option to verify the setup. Confirm that the test email is received to ensure everything is working correctly. SMTP configuration is crucial for: 🔑 Sending password reset emails 📢 Delivering system notifications or alerts 💬 Facilitating communication with users or administrators We provide a user-friendly form to help you easily create an SMTP configuration. Additionally, you can use this form to test and verify that your email setup is working correctly by sending a test email. This ensures your email settings are properly configured before going live. image Email Templates You can manage and customize email templates in the Admin How to setup Navigate to Admin in dashboard Click to Email Select Email Template We provide built-in templates for the following email types: Welcome Email – Sent to users when they register or join. Forgot Password Email – Sent to users who request a password reset. Subscription Email – Sent to users for subscription confirmations or updates. You can edit these templates to match your brand and messaging style before they are used in live emails. SEO Configuration You can manage your site’s SEO settings from Admin How to setup Navigate to Admin in dashboard Go to SEO Click to Add SEO This section allows you to optimize your website for search engines by configuring the following: Meta Title – Set the title that appears in browser tabs and search engine results. Meta Description – Add a short summary that describes your page content for search engines. Keywords – Define relevant keywords to improve search visibility. Make sure to regularly update these settings to improve your website’s search engine ranking and visibility. WhatsApp Package An admin can create a package only if the main admin has already been assigned a package. Admins can create packages for sending WhatsApp messages. We also provide a default package for admins, where you can add a surcharge for each message category—such as Authentication, Utility, and Marketing—based on the country name and country code. How to create package Navigate to WhatsApp Package in dashboard Select Package Create image Set Package to User Admins need to assign a package to their users in order to enable message sending. To do this, select the user, choose a package, and assign it accordingly. How to assign package to user Navigate to WhatsApp Package in dashboard Select Set Package If the selected user already has a package assigned, it will be displayed in the list. Otherwise, no package will be shown. You can also assign or update a new package for the same user. Package Listing When selecting a package, the full details of that package will be displayed. Navigate to WhatsApp Package in dashboard Select Package List Create User In the admin section, the admin can directly create users, add services, and assign packages. How to create user Navigate to Admin in Dashboard Select Customer Click the Create User image While adding a user, the admin can promote the user to a support role, such as Sales Support or IT Support. Select one or more users from the user selection list, choose a user type (e.g., IT Support or Sales Support), and click ‘Update’ to apply the changes. Image Manage User How to Manage user Navigate to Admin in Dashboard Select Customer Click to Manage User 1. User Management View list of all users Add / Edit / users Activate / Deactivate user accounts Search and filter users Assign roles or permissions (if role-based access) 2. User Profile Management View and update user profile details Change user password View login history / security logs 3. Pre-Login User Actions Admin can login to their own users account 4. Service Management View list of all services Add new services Update service details Enable / Disable services 5. Wallet Management View all user wallets Add funds to a user’s wallet Deduct funds manually View wallet transaction history Image Admin Settings WhatsApp Configuration Navigate to the Admin in Dashboard. In the Admin panel, go to Admin Settings. Click on WhatsApp Configuration. You will see the default WhatsApp package displayed in the table. All available WhatsApp packages are listed below. You can select only one package from the list to set as the default. Once selected, click to set it as the default package. This will replace the existing default with the newly selected package. image Menu Settings Navigate to the Admin panel. In the Admin panel, go to Admin Settings. Click on Menu Settings. Here, the admin can add menus for their users. The admin can assign different menus or any combination of menus to each user. A reset menu option is also available to restore default menu settings. image Template Request In the Admin panel, go to the Template Request menu. This section lists all templates created by users. The admin can approve or reject each template request. The admin can also view each template in detail before making a decision. image Theme Settings Color Settings 1.Navigate to the Admin in Dashboard. 2.Go to Theme Settings 3.Select Color Settings. 4.In the Color Settings section, the admin can customize the appearance of the admin panel, including: Theme Color: Choose a primary color for the panel’s theme to match your brand or preference. Dark Mode: Toggle between light mode and dark mode for better visual comfort. Menu Layout: Select from available menu layout styles (e.g., vertical, horizontal, collapsed). 5.Additionally, the admin can upload or update the panel logo to personalize the branding of the admin interface. image Default Menu Navigate to the Admin in Dashboard. Go to Theme Settings Click on Menu Settings. In this section, the admin can set the default home page that users will see after logging in. A list of available pages will be displayed. The admin can select any page from the list and set it as the default home page. Once set, users will be redirected to this selected page immediately after login. image Payments User Payment Credits Navigate to the Admin panel. Go to the Payments section. In this section, you will find the User Payment Credits List. This list displays all users’ credit details, including: Credit amounts Payment status (e.g., Paid or Unpaid) If a user has already made a payment, the admin can manually update the payment status to reflect this. This feature allows the admin to correct or confirm payment records as needed. image User Wallet Logs Navigate to the Admin panel. Go to the Payments section. Click on the User Wallet Logs menu. This section displays detailed wallet transaction logs for each user. It includes information such as: Wallet balance updates Credit or debit history Usage details (e.g., credits used for sending messages) Timestamps and descriptions of each transaction This allows the admin to monitor and audit wallet activity for all users effectively. image Support Menu Manage Tickets Navigate to the Admin in Dashboard. Go to the Support menu Select Manage Tickets. This section displays all support tickets submitted by users. The admin can communicate with users by sending messages in a chat-like interface. The admin has the ability to: Cancel a ticket Close a ticket Reopen a ticket if it was previously canceled or closed If a ticket is canceled, the admin can still open it again to continue addressing the issue. image Sales Enquiry Navigate to the Admin in Dashboard. Go to Support Select Sales Enquiry menu. This section displays all sales-related issues submitted by users. The admin can assign each sales enquiry to a sales support user. A list of all sales support users associated with the admin is available for selection. The admin selects a sales support user and assigns the enquiry to them. The status of each assigned enquiry is also shown, such as Completed or Processing or Review image Report WhatsApp Report Navigate to the Admin panel. Go to the Reports section Click on WhatsApp Report. This section displays a calendar view. In the calendar, you will see the daily count of WhatsApp messages sent. When you click on a specific date, a detailed view opens showing: A breakdown of message activity for that day Data for all users, including message counts and relevant details This helps the admin monitor and analyze WhatsApp usage across all users in a calendar-based format. image Notification Add Notifications Navigate to the Admin in Dashboard. Go to the Notification section. Select Add Notifications In this section, the admin can create and send notifications to: Regular users Support users While creating a notification, the admin can: Set a title for the notification Choose a priority level (e.g., High, Medium, Low) Write a custom message The admin also has the option to send the notification via email to the selected users. This allows effective communication of important updates, alerts, or announcements. image List of Notifications Navigate to the Admin in Dashboard. Go to the Notification section. Select Notifications This section displays all notifications created by the admin. For each notification, the admin can view: The list of recipients The read/unread status for each user This allows the admin to track who has seen the notification and take further action if needed. image
No parameter with body , footer and button quick-replay PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply) For URL and Phone Number buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_l", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_l". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_l\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_l\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Flow Template Creation Articles Introduction Create template Introduction A flow template provides a structured, reusable framework for building automated processes—such as marketing journeys, or workflow systems. Instead of starting from scratch, teams can use a template to save time, ensure consistency, and reduce errors. By using a flow template, you benefit from: Faster setup and deployment Standardized logic and messaging Improved collaboration and scalability Easier testing and optimization Whether you’re designing customer interactions, automating tasks, or guiding users through a process, a flow template serves as a reliable starting point—helping you work smarter and deliver a consistent experience every time. Create template Overview The Flow Template Creation feature allows users to design and save custom flow templates consisting of interactive screens. These templates can be used in various workflows to guide users through a predefined sequence of content and actions. 🔘 Create Template – Main Sections When creating a flow template, the interface is divided into three main sections: 1. Screen Section This section allows users to add and manage up to 8 screens. Each screen represents a step or page in the flow. Users can add, remove, or navigate between screens using this section. The selected screen’s content will be editable in the Edit Content section. 2. Edit Content Section Displays the content of the currently selected screen. Users can edit text, images, inputs, or other interactive elements. All changes made here are reflected in the corresponding screen. 3. Preview Section Provides a real-time preview of the selected screen as it will appear in the final template. Allows users to visualize the layout and flow before saving. ✅ Save Template After editing all desired screens, the user can click the “Save” button. Upon clicking Save: All screen data and configurations are stored as a complete flow template. The template becomes available for use in other modules or workflows. 📌 Additional Notes A minimum of 1 screen and a maximum of 8 screens are allowed per flow template. Templates can be edited later if changes are needed. Ensure that all required fields in the Edit Content section are filled before saving. 🧩 Use Cases Onboarding flows Survey or feedback forms Guided tutorials or walkthroughs Lead generation sequences
Parameter with header body footer Overview A header that dynamically personalizes the message with text. A body that provides additional message content with placeholders for dynamic text. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is used for sending marketing-related messages. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_u", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Hi user" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_u". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "Hi user" – The actual content of the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_u”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } } ‘ ‘<'+'?'+'php'+ ` ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_u”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } } ‘, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_u\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_u”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_u”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_u\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_u”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Sandbox Articles Introduction WhatsApp Sandbox Introduction WhatsApp SandboxA WhatsApp Sandbox is a test environment that allows developers to simulate WhatsApp Business messaging without needing full approval or a live WhatsApp Business number. It enables sending and receiving messages, testing templates, configuring webhooks, and building conversational workflows in a controlled setting—ideal for development and early-stage prototyping. WhatsApp Sandbox A WhatsApp Sandbox is a testing environment that simulates real WhatsApp Business interactions without requiring a live or verified WhatsApp Business account. It is primarily used by developers and businesses to prototype, test, and validate WhatsApp messaging workflows, templates, webhooks, and integrations before going live. Core Features Safe Testing EnvironmentInteract with WhatsApp messaging APIs in a risk-free environment, without affecting real customers or production data. Message SimulationSend and receive messages (text, templates, media) between a test number and sandbox-enabled service. Webhook TestingSimulate callbacks for message delivery, read receipts, or inbound messages using public URLs (e.g., via ngrok or PostBin). Pre-Approved TemplatesMost sandboxes support a limited number of pre-approved message templates for testing transactional or marketing content. Limited AudienceOnly authorized test numbers can interact in the sandbox environment—often limited to the developer’s own phone number(s). Common Limitations Restricted RecipientsMessages can typically only be sent to registered test numbers (often just one or a few) to prevent abuse. Session TimeoutsTest sessions often expire after a few hours or days; users may need to re-authorize or re-join the sandbox. Rate LimitsMessage sending frequency is capped (e.g., 1 message every 3 seconds in some platforms). Limited Templates & FeaturesCustom templates may not be allowed; you may be limited to built-in examples for testing. No Production MessagingSandboxes do not support actual user communications—only for development or QA purposes. How to Access a WhatsApp Sandbox Register with a WhatsApp API provider (e.g., Pingtochat, 360dialog, Zoho, etc.). Obtain a test API key and/or sandbox number. Add your phone number as an authorized tester. Use API endpoints or dashboards to send/receive messages. Configure webhooks to receive events like inbound messages or delivery updates. Go to Service → SandboxThis will open the Sandbox configuration page. To access the Sandbox: Option 1: Scan the QR code using your WhatsApp app. Option 2: Manually copy the phone number and send the provided message code via WhatsApp to join the sandbox. After joining the sandbox: ➡️ You will be automatically redirected to the next page where you can test message sending. On this page, you can: Enter a phone number to send a test message. Select a template to use for the message. View the output of the message delivery in real time. Access sample code in multiple languages such as: PHP cURL Python Node.js, and more. This allows you to test message delivery and understand how to integrate the API into your application. The WhatsApp Sandbox environment provides a safe and efficient way to test message delivery, template functionality, and API integration—all without needing a live WhatsApp Business account. From joining via QR code or message code, to sending test messages and viewing sample code, the sandbox equips you with everything needed to build and validate your messaging flow before going live. Whether you’re testing authentication templates, marketing messages, or webhook responses, the sandbox is an essential step in your WhatsApp development journey. 🛠️ Need Help? If you encounter any issues or have questions: 📨 Contact Support at: support@texaavyinfotech.com 💬 Live Chat is available in the dashboard for real-time assistance.
Parameter header body,footer,buttons - quick-replay Overview A header that dynamically personalizes the message with text. A body that provides additional message content with placeholders for dynamic text. A Quick Reply Button that allows users to opt out of promotional messages. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is used for sending marketing-related messages with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_v", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Hi user" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_v". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "Hi user" – The actual content of the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_v\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_v\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Introduction Introduction to International APIs An International API (Application Programming Interface) enables software applications to interact across borders by providing access to global services, data, or platforms. These APIs are designed to support multi-language, multi-currency, and multi-regional operations, making them essential for businesses that operate in multiple countries or serve international users. International APIs can be found in various domains such as: Payments and Banking (e.g., Stripe, PayPal, Wise) Shipping and Logistics (e.g., FedEx, DHL, EasyPost) Travel and Booking (e.g., Skyscanner, Amadeus, Booking.com) Localization and Translation (e.g., Google Translate, Microsoft Translator) Social Media and Communication (e.g., WhatsApp Business API, Facebook Graph API) These APIs help developers: Standardize integration with international services. Handle global compliance and localization. Enable real-time communication and data exchange across countries. As globalization increases, international APIs play a key role in connecting businesses, services, and users worldwide.
No parameter with body , footer and button quick-replay and visit-website PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL) For URL buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_m", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_m". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_m\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_m\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Create Token First, you need to create an API key and token for WhatsApp configuration. To create these, click on the Pingtochat Register link to register, or the Pingtochat Login link to log in to Pingtochat. After successfully registering or logging in, you will find an option to add an API key and token on the left side of the dashboard. To Generate Token Navigate to: Settings ->API ->Internationak SMS Token. Select your WABA ID and Sender ID, then choose the version. Finally, click the “Generate Token” button to create your Token Generate the Whatsapp Sender If you don’t have a WhatsApp sender number, click the “Register” link for Sender ID to create one. Follow the steps provided to complete the registration process. Once registered, ensure the sender number is verified and linked to your account before proceeding with token generation.
No parameter with body , footer and button quick-replay , visit-website and phone-number PingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number, Copy Code) For URL and Phone Number buttons, they do not need to be included in the response. Description: A basic template message without dynamic parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxx", "type": "template", "template": { "name": "markting_n", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "markting_n". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the button as a Quick Reply. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘authToken: xxxxxxxxxxxxx………………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxx………………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_n\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxx………………….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxx………………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxx………………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”markting_n\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxxx………………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “markting_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Send SMS API Overview This API allows you to send international SMS messages via the Your Domain (pingtochat.com) service. It is useful for businesses looking to reach users across different countries with messages such as alerts, notifications, OTPs, or promotional content. URL https://{{your_domain}}/api/v1.0/{{key}}/Internationalsms Method POST Headers Content-Type: application/json Authorization: Bearer <your_access_token> Request PayloadsYour Domain (pingtochat.com) Sending a Text Message The payload for sending a plain text message via the WhatsApp API is structured as follows: Example : { "messaging_product": "sms", "to": "91 xxxxxxxxxx", "from": "PINGTOCHAT", "message": "test message", "templateId":6, "bulkId":1 } Field description FieldTypeDescriptionmessaging_productstringType of messaging product (must be "sms" for SMS sending).tostringRecipient’s mobile number in international format. E.g., "91xxxxxxxxxx".fromstringSender name or ID (e.g., "PINGTOCHAT").messagestringMessage content to be sent.templateIdintID of the predefined message template (if applicable).bulkIdintID for grouping multiple messages as a bulk operation. ✅ Success Response HTTP 200 OK { "status": "success", "messaging_product": "sms", "bulk_id": 1, "contacts": [ { "phone_number": "+91xxxxxxxxxx", "status": "sent" } ], "messages": [ { "transaction_id": "ABCDEFGHIJ" } ] } ❌ Error Responses HTTP StatusMeaningSample Error Message400Bad Request"Invalid phone number format"401Unauthorized"Invalid API key"403Forbidden"Access denied"500Internal Server Error"Unexpected error occurred. Try again later"
Parameter with header-body-footer , buttons - quick-replay,visit-website,phone-number Overview A header with dynamic text personalization. A body containing the main message text with placeholders for dynamic content. A Quick Reply Button that enables users to opt out of promotional messages. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for sending marketing messages while providing an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_x", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Hi user" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_x". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "Hi user" – The actual content of the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Expected API Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_x\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_x\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Parameter with header , body , footer and buttons - quick-replay ,visit website ingtoChat’s Marketing Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL) For URL buttons, they do not need to be included in the example payload request. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Headers Content-Type: Indicates that the request body is in JSON format. Authorization: A Bearer token for authentication. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_w", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Hi user" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_w". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. 1. Header Component Type: header Description: Displays dynamic text at the top of the message. parameters Type: Array Description: Holds the text parameter for the header. Example: "Hi user" 2. Body Component Type: body Description: Contains the main content of the message. parameters Type: Array Description: Holds dynamic values to personalize the message. Example: "Our" "whatsapp message app" 3. Button Component Type: button Description: Adds an interactive Quick Reply button. sub_type Value: "quick_reply" Description: Defines the type of button. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_w”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_w”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_w\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_w”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_w”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_w\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_w”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Parameter with header-body-footer , buttons - quick-replay,visit-website,phone-number,copy-code Overview A header with a personalized text greeting. A body containing the main message text. A Quick Reply Button that allows users to opt out of promotional messages. A Copy Code Button that enables users to copy a predefined code. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is ideal for marketing campaigns while giving users an easy way to opt out and use a promotional code. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_y", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "Hi user" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_y". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "Hi user" – The actual content of the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Copy Code Button Type: button Description: Adds a Copy Code button. sub_type: "copy_code" index: 1 (Second button in the list) parameters: type: "text" text: "WRETTT" – The predefined code for the user to copy. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_y\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_y\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Hi user\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “Hi user” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Basic Template Create Overview This API allows you to create a basic RCS template with a text type. A basic template is a simpler form of RCS message that contains text-based content only, making it ideal for simple notifications, greetings, or alerts. API Endpoint POST https://{{your_domain}}/api/v1.0/{{key}}/rcs_templates URL Parameters: {{key}}: The account key in the URL should be replaced with your actual account key. . HTTP Method POST: This method is used to send the data to create a new RCS template. Headers Content-Type: application/json Authorization: Bearer <your_access_token> Replace <your_access_token> with your actual Bearer token for authentication. Request Payload The request body should be a JSON object containing the RCS template details. Below is an example of the JSON payload for creating a new RCS template: Example Request Payload: { "name": "welcome_template", "type": "basic", "basic_types": "text", "components": [ { "message": "welcome to PINGTOCHAT" } ] } Field Descriptions: Field NameTypeDescriptionnamestringThe name of the template (e.g., "welcome_template"). This is used for identification.typestringThe type of template. For a basic template, this should be "basic".basic_typesstringThe type of basic template. For text content, this should be "text".componentsarrayAn array that contains the components of the template (e.g., messages).messagestringThe text content of the template (e.g., "welcome to PINGTOCHAT"). Success Response If the template is successfully created, you will receive a 200 OK HTTP status with the details of the newly created template. Example Response: { "id": "3232", "status": "PENDING", "type": "BASIC" }
Parameter with body footer button - quick replay Overview A body containing the main message text. A Quick Reply Button that allows users to opt out of promotional messages. For URL and Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is ideal for marketing campaigns while giving users an easy way to opt out. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_z", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_z". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_z\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_z\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Single Template Creation Overview This API allows you to create RCS templates for rich communication services. These templates can contain multiple cards, each with a title, description, media content, and buttons. The API is helpful for businesses that want to send rich, interactive messages to users via platforms that support RCS. API Endpoint POST https://{{your_domain}}/api/v1.0/{{key}}/rcs_templates URL Parameters: {{key}}: The account key in the URL should be replaced with your actual account key. . HTTP Method POST: This method is used to send the data to create a new RCS template. Headers Content-Type: application/json Authorization: Bearer <your_access_token> Replace <your_access_token> with your actual Bearer token for authentication. Request Payload The request body should be a JSON object containing the RCS template details. Below is an example of the JSON payload for creating a new RCS template: Example Request Payload: { "name": "template_name", "type": "advance", "advance_types": "single", "orientation": "vertical", "components": [ { "cards": [ { "title": "your_title", "description": "your_description", "media": { "height": "MEDIUM", "fileUrl": "https://your_file_path" }, "buttons": [ { "type": "url", "text": "link", "url": "https://example.com" }, { "type": "call", "text": "call now", "number": "9198xxxxxxxx" } ] } ] } ] } Field Descriptions: Field NameTypeDescriptionnamestringThe name of the template, typically used for identification. Example: "rcs_template_one".typestringThe type of template. It can be “advance” (for rich templates with media).advance_typesstringSpecifies the type of advance template. For example, “single”.orientationstringThe orientation of the template. Can be “vertical” or “horizontal”.componentsarrayAn array containing the template components (e.g., cards).cardsarrayAn array of cards in the template, each representing a message or content block.titlestringThe title of the card (e.g., "HI").descriptionstringA description or content for the card (e.g., "This is a sample rcs description").mediaobjectThe media object for the card, containing the height and fileUrl.heightstringSpecifies the height of the media. Example: “MEDIUM”.fileUrlstringThe URL to the media file to be included in the card. Example: image URL.buttonsarrayAn array of buttons for interaction in the card (e.g., link, call).typestringThe type of button, e.g., “url” (a link button) or “call” (a call button).textstringThe text displayed on the button (e.g., "link", "call now").urlstringThe URL to be opened when the user clicks the button (for “url” type buttons).numberstringThe phone number to be called when the “call” button is clicked. Success Response If the template is created successfully, the server will return a 200 OK status with details of the created template. Example Response: { "id": "3232", "status": "PENDING", "type": "ADVANCE" }
Parameter with body footer button - quick-replay ,visit-website and phone-number Overview The marketing_aa template is a WhatsApp Business API message template that includes: A body containing the main message text. A Quick Reply Button that allows users to opt out of promotional messages. Phone Number Used for contact information For URL and Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is useful for marketing messages while providing users with an easy way to opt out. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxxx", "type": "template", "template": { "name": "marketing_aa", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_aa". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxxx", "wa_id": "91xxxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_aa\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_aa\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Multicard Template Creation Overview This API allows you to create multiple RCS templates with a slider configuration. The slider type template lets you add multiple cards to the message, where each card can contain different content such as images, text, and interactive buttons. These types of templates are ideal for promotional offers, product galleries, or multiple steps in an onboarding process. API Endpoint POST https://{{your_domain}}/api/v1.0/{{key}}/rcs_templates URL Parameters: {{key}}: The account key in the URL should be replaced with your actual account key. . HTTP Method POST: This method is used to send the data to create a new RCS template. Headers Content-Type: application/json Authorization: Bearer <your_access_token> Replace <your_access_token> with your actual Bearer token for authentication. Request Payload The request body should be a JSON object containing the RCS template details. Below is an example of the JSON payload for creating a new RCS template: Example Request Payload: { "name": "template_name", "type": "advance", "advance_types": "slider", "thumbnail_alignment": "left", "card_width": "small", "components": [ { "cards": [ { "title": "title_one", "description": "description_one", "media": { "height": "MEDIUM", "fileUrl": "https://example.com/image.png" }, "buttons": [ { "type": "url", "text": "link", "url": "https://example.com" }, { "type": "call", "text": "call now", "number": "9198xxxxxxxx" } ] }, { "title": "title_two", "description": "description_two", "media": { "height": "MEDIUM", "fileUrl": "https://example.com/image.png" }, "buttons": [ { "type": "url", "text": "link", "url": "https://example.com" }, { "type": "call", "text": "call now", "number": "9198xxxxxxxx" } ] } ] } ] } Field Descriptions: Field NameTypeDescriptionnamestringThe name of the template (e.g., "template_one"). This is used for identification.typestringThe type of template. For an advance template, this should be "advance".advance_typesstringThe type of advance template. For a slider template, this should be "slider".thumbnail_alignmentstringThe alignment of the thumbnail for the media. Can be “left” or “right”.card_widthstringThe width of each card in the template. Options could include “small”, “medium”, or “large”.componentsarrayAn array that contains the template components (e.g., cards).cardsarrayA list of cards in the template, each representing a different content block.titlestringThe title of the card (e.g., "title_one").descriptionstringA description or content for the card (e.g., "description_one").mediaobjectThe media object for the card, containing the height and fileUrl.heightstringThe height of the media. This can be “SMALL”, “MEDIUM”, or “LARGE”.fileUrlstringThe URL of the image or media file. Example: "https://example.com/image.png".buttonsarrayA list of buttons to be included on the card. Each button can have a different type (e.g., “url” or “call”).typestringThe type of button. Can be “url” for a link button or “call” for a call button.textstringThe text displayed on the button (e.g., "link", "call now").urlstringThe URL to open when the “url” button is clicked. Example: "https://example.com".numberstringThe phone number to be called when the “call” button is clicked. Example: "9198xxxxxxxx". Success Response If the template is successfully created, you will receive a 200 OK HTTP status, along with the details of the newly created template. Example Response: { "id": "3232", "status": "PENDING", "type": "ADVANCE" }
Parameter with body footer button - quick-replay ,visit-website, phone-number and copy-code Overview A body containing the main message text. A Quick Reply Button that allows users to opt out of promotional messages. A Phone Number Used for contact information A Copy Code Button that enables users to copy a predefined code (WRETTT). For URL and Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is useful for marketing messages while providing users with interactive options. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_ab", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_ab". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Copy Code Button Type: button Description: Adds a Copy Code button. sub_type: "copy_code" index: 1 (Second button in the list) parameters: type: "text" text: "WRETTT" – The predefined code to be copied. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ab\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ab\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Send Single Card Message Overview This API allows you to send an RCS message to an individual recipient, using an advance card template. The message can contain a single card with media, buttons, title, and description. It’s ideal for sending rich content, such as promotional offers, product updates, or alerts, to a user’s device. API Endpoint POST https://{{your_domain}}/api/v1.0/{{key}}/rcs_message {{your_domain}}: Replace this with your actual domain (e.g., pingtochat.com). {{key}}: Replace this with your API key. HTTP Method POST: Used to send a message using the provided template. Headers Content-Type: application/json Authorization: Bearer <your_access_token> Replace <your_access_token> with your actual Bearer token for authentication. Request Payload This is the JSON structure used to send the RCS message with a single card template: Example Request Payload: { "messaging_product": "rcs", "recipient_type": "individual", "to": "9198xxxxxxxx", "type": "advance", "template": { "name": "basicmessgage", "components": [ { "cards": [ { "title": "your_title", "description": "your_description", "media": { "height": "MEDIUM", "fileUrl": "https://your_image_path" }, "buttons": [ { "type": "url", "text": "link", "url": "https://example.com" }, { "type": "call", "text": "call now", "number": "9198xxxxxxxx" } ] } ] } ] } } Field Description Field NameTypeDescriptionExamplemessaging_productStringSpecifies the messaging product. Set to "rcs" for RCS messaging."rcs"recipient_typeStringDefines the recipient type. Set to "individual" for sending messages to an individual user."individual"toStringThe phone number of the recipient. This is where the message will be sent."9198xxxxxxxx"typeStringDefines the type of the template. For an advanced template, this should be "advance"."advance"templateObjectContains the template details for the message. Includes the template name and components (e.g., cards).N/Atemplate.nameStringThe name of the template, used for identification."basicmessage"template.componentsArrayAn array containing the components of the message (e.g., cards, media, buttons).N/Atemplate.components.cardsArrayAn array of cards that make up the template. Each card can have a title, description, media, and buttons.N/Atemplate.components.cards.titleStringThe title of the card, typically a headline or product name."your_title"template.components.cards.descriptionStringA short description of the card content (e.g., product details, promotional text)."your_description"template.components.cards.mediaObjectContains media details like image URL and height.N/Atemplate.components.cards.media.heightStringSpecifies the height of the media. Can be "SMALL", "MEDIUM", or "LARGE"."MEDIUM"template.components.cards.media.fileUrlStringThe URL of the image or media file that will be displayed in the card."https://your_image_path"template.components.cards.buttonsArrayAn array of buttons to be included in the card. Each button can be either a URL button or a call button.N/Atemplate.components.cards.buttons.typeStringThe type of button. It can be "url" (to open a link) or "call" (to initiate a call)."url" or "call"template.components.cards.buttons.textStringThe text displayed on the button (e.g., “link”, “call now”)."link" or "call now"template.components.cards.buttons.urlStringThe URL to open when the button type is "url"."https://example.com"template.components.cards.buttons.numberStringThe phone number to call when the button type is "call"."9198xxxxxxxx" Success Response If the message is successfully sent, you will receive a 200 OK HTTP status, along with details about the sent message. Example Response: { "status": "success", "message": "Message send successfully", "transaction_id": "abvXXXXXXXXX" }
Parameter with body , button - quick-replay Overview Body with dynamic text placeholders. Quick Reply Button for unsubscribing from promotions. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_ac", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_ac". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ac\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ac\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Send Basic Message Overview This API allows you to send a basic RCS message to an individual recipient. In this case, no media, buttons, or advanced components are included, just a simple text message using a basic template. API Endpoint POST https://{{your_domain}}/api/v1.0/{{key}}/rcs_message {{your_domain}}: Replace this with your actual domain (e.g., pingtochat.com). {{key}}: Replace this with your API key. HTTP Method POST: Used to send the basic message. Headers Content-Type: application/json Authorization: Bearer <your_access_token> Replace <your_access_token> with your actual Bearer token for authentication. Request Payload This is the JSON structure used to send the basic RCS message with no advanced components: Example Request Payload: { "messaging_product": "rcs", "recipient_type": "individual", "to": "9198xxxxxxxx", "type": "basic", "template": { "name": "basicmessgage", "components": [ { "message": "Hello! Welcome to P2C." } ] } } Field description Field NameTypeDescriptionExamplemessaging_productStringSpecifies the messaging product. Set to "rcs" for RCS messaging."rcs"recipient_typeStringDefines the recipient type. Set to "individual" for sending messages to an individual user."individual"toStringThe phone number of the recipient. This is where the message will be sent."9198xxxxxxxx"typeStringDefines the type of the template. For a basic template, this should be "basic"."basic"templateObjectContains the template details for the message. Includes the template name and components (e.g., message body).N/Atemplate.nameStringThe name of the template, used for identification."basicmessage"template.componentsArrayAn array containing the components of the message. In this case, it contains a single message.N/Atemplate.components.messageStringThe actual message content that will be displayed in the message body."Hello! Welcome to P2C." Success Response If the message is successfully sent, you will receive a 200 OK HTTP status, along with details about the sent message. Example Response: { "status": "success", "message": "Message send successfully", "transaction_id": "abcxxxxxxxx" }
Parameter with body , button - quick-replay, visit-website Overview A body containing the main marketing message text. A Quick Reply Button that allows users to unsubscribe from promotional messages. For URL and Phone Number buttons, they do not need to be included in the Example payload. This template is ideal for marketing campaigns that also provide users with an easy way to opt out. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_ad", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_ad". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ad\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ad\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Send Carousel Message Overview This API allows you to create and send advanced RCS templates with carousel configuration. The carousel template enables you to display multiple cards that users can swipe through. Each card can contain different content such as images, text, and interactive buttons. This template is ideal for showcasing multiple products, offers, or steps in a process. API Endpoint POST https://{{your_domain}}/api/v1.0/{{key}}/rcs_message {{your_domain}}: Replace this with your actual domain (e.g., pingtochat.com). {{key}}: Replace this with your API key. HTTP Method POST: Used to send the basic message. Headers Content-Type: application/json Authorization: Bearer <your_access_token> Replace <your_access_token> with your actual Bearer token for authentication. Request Payload This is the JSON structure used to send the basic RCS message with no advanced components: Example Request Payload: { "messaging_product": "rcs", "recipient_type": "individual", "to": "9198xxxxxxxx", "type": "advance", "template": { "name": "basicmessage", "components": [ { "cards": [ { "title": "title_one", "description": "description_one", "media": { "height": "MEDIUM", "fileUrl": "https://example.com/image.png" }, "buttons": [ { "type": "url", "text": "link", "url": "https://example.com" }, { "type": "call", "text": "call now", "number": "9198xxxxxxxx" } ] }, { "title": "title_two", "description": "description_two", "media": { "height": "MEDIUM", "fileUrl": "https://example.com/image.png" }, "buttons": [ { "type": "url", "text": "link", "url": "https://example.com" }, { "type": "call", "text": "call now", "number": "9198xxxxxxxx" } ] } ] } ] } } Field Descriptions: Field NameTypeDescriptionExamplemessaging_productStringSpecifies the messaging product. Set to "rcs" for RCS messaging."rcs"recipient_typeStringDefines the recipient type. Set to "individual" for sending messages to an individual user."individual"toStringThe phone number of the recipient. This is where the message will be sent."9198xxxxxxxx"typeStringDefines the type of template. For an advanced carousel template, this should be "advance"."advance"templateObjectContains the template details for the message. Includes the template name and components (e.g., cards).N/Atemplate.nameStringThe name of the template, used for identification."basicmessage"template.componentsArrayAn array containing the components of the message. In this case, it contains an array of cards.N/Atemplate.components.cardsArrayContains an array of cards, each representing a different part of the message (e.g., image, text, buttons).N/Atemplate.components.cards.titleStringThe title for the card, typically a heading or the name of the product/offer."title_one"template.components.cards.descriptionStringA short description or content for the card (e.g., product details, promo description)."description_one"template.components.cards.mediaObjectContains media details like the image URL and height.N/Atemplate.components.cards.media.heightStringSpecifies the height of the media (e.g., "SMALL", "MEDIUM", or "LARGE")."MEDIUM"template.components.cards.media.fileUrlStringThe URL to the image or media content displayed on the card."https://example.com/image.png"template.components.cards.buttonsArrayA list of buttons that are interactive on the card. Buttons can be of types "url" or "call".N/Atemplate.components.cards.buttons.typeStringThe type of button. This can either be "url" (to open a link) or "call" (to make a call)."url", "call"template.components.cards.buttons.textStringThe label text displayed on the button (e.g., "link", "call now")"link", "call now"template.components.cards.buttons.urlStringThe URL to open when the button type is "url"."https://example.com"template.components.cards.buttons.numberStringThe phone number to dial when the button type is "call"."9198xxxxxxxx" Success Response If the template is successfully created, you will receive a 200 OK HTTP status, along with the details of the newly created template. Example Response: { "status": "success", "message": "Message send successfully", "transaction_id": "abcxxxxxxxx" }
Parameter with body , button - quick-replay, visit-website, phone-number Overview A body containing the main marketing message text. A Quick Reply Button that allows users to unsubscribe from promotional messages. A Phone Number Used for contact information For URL and Phone Number buttons, they do not need to be included in the Example payload. This template is ideal for marketing campaigns that also provide users with an easy way to opt out. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_ae", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_ae". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ae”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ae”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ae\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ae”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ae”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ae\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ae”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Parameter with body , button - quick-replay, visit-website, phone-number, copy-code Overview The marketing_af template is a WhatsApp Business API message template used for marketing purposes. It includes: A body containing the main marketing message text. A Quick Reply Button that allows users to unsubscribe from promotional messages. A Phone Number Used for contact information A Copy Code Button that enables users to copy a predefined code (WRETTT). For URL and Phone Number buttons, they do not need to be included in the Example payload. This template is ideal for marketing campaigns that provide users with an interactive experience. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_af", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_af". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Copy Code Button Type: button Description: Adds a Copy Code button. sub_type: "copy_code" index: 1 (Second button in the list) parameters: type: "text" text: "WRETTT" – The predefined code to be copied. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_af\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_af\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Parameter with body ,footer, button - quick-replay, visit-website Overview A body containing the main marketing message text. A Quick Reply Button that allows users to unsubscribe from promotional messages. A Copy Code Button that enables users to copy a predefined code (WRETTT). For URL and Phone Number buttons, they do not need to be included in the Example payload. This template is ideal for marketing and promotional messages that provide an interactive experience. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_ag", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_ag". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Copy Code Button Type: button Description: Adds a Copy Code button. sub_type: "copy_code" index: 1 (Second button in the list) parameters: type: "text" text: "WRETTT" – The predefined code to be copied. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ag”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ag”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ag\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ag”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ag”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ag\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ag”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Parameter with body , button - quick replay - visit website Overview A body containing the main marketing message text. A Quick Reply Button that allows users to opt out of promotional messages. This template helps engage users while providing them with an easy way to unsubscribe if they choose. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_ai", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_ai". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ai\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ai\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Parameter with body , button - phone number - copy code Overview A body containing the main marketing message text. A Copy Code Button, allowing users to copy a promotional code directly. For URL and Phone Number buttons, they do not need to be included in the Example payload. This template is ideal for marketing campaigns where users can quickly receive and use a promotional code. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_aj", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "copy_code", "index": 1, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_aj". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Copy Code Button Type: button Description: Adds a Copy Code button for users to copy a promotional code. sub_type: "copy_code" index: 0 parameters: type: "text" text: "WRETTT" – The promotional code displayed. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_aj\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_aj\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 1,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 1, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
No parameter body ,footer, button - quick replay - visit website Overview A body containing the main marketing message text. A Quick Reply Button that allows users to opt out of promotional messages. This template helps engage users while providing them with an easy way to unsubscribe if they choose. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_ak", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_ak". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ak\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_ak\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
No parameter body ,footer, button - phone number - copy code Overview A body containing the main marketing message text. A Copy Code Button that allows users to copy a promotional code. For URL and Phone Number buttons, they do not need to be included in the Example payload. This template helps engage users while providing them with an easy way to copy promotional codes for offers or discounts. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "marketing_al", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "Our" }, { "type": "text", "text": "whatsapp message app" } ] }, { "type": "button", "sub_type": "copy_code", "index": 0, "parameters": [ { "type": "text", "text": "WRETTT" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "marketing_al". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "Our" – First part of the message. text: "whatsapp message app" – Second part of the message. Copy Code Button Type: button Description: Adds an interactive Copy Code button. sub_type: "copy_code" index: 0 parameters: type: "text" text: "WRETTT" – The code that users can copy. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_al\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”marketing_al\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Our\”\r\n },\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”whatsapp message app\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”copy_code\”, \r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”WRETTT\” \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “marketing_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “Our” }, { “type”: “text”, “text”: “whatsapp message app” } ] }, { “type”: “button”, “sub_type”: “copy_code”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “WRETTT” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Message without parameter Description: Send a basic template message without any parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace the placeholders: {{your_domain}}: Your API domain. {{phone_number_id}}: The ID linked to your WhatsApp Business API number. {{key}}: Your API key for authentication.How to create key Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example : { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_templates", "language": { "code": "en" }, "components": [ ] } } Field Descriptions: messaging_product: Always "whatsapp" for WhatsApp messaging. recipient_type: "individual" for single-user messages. to: Recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx for an Indian number). type: "template" for template messages. template: Contains details about the template: name: Name of the pre-approved template (utility_templates in this case). language: Specifies the language code. code: Language code for the template (e.g., en for English). components: An array for dynamic content or interactive elements (leave empty for simple messages). Example Response When the API processes the request successfully, it returns a response similar to this: CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxx…….’ \ –data ‘{ “messaging_product”: “whatsapp”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_a”, “language”: { “code”: “en_us” }, “components”: [ ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://${domain}/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS => ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “whatsapp:+${toNumber}”, “type”: “template”, “template”: { “name”: “${selectedTemplateName}”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: ${JSON.stringify(parameters)} } ] } }’, CURLOPT_HTTPHEADER => array( ‘authToken: ${userToken}’, ‘Content-Type: application/json’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\n \”messaging_product\”: \”whatsapp\”,\n \”to\”: \”919946371505\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”utility_a\”,\n \”language\”: {\n \”code\”: \”en_us\”\n },\n \”components\”: [\n ]\n }\n}”); Request request = new Request.Builder() .url(“https://app.pingtochat.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://app.pingtochat.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_a”, “language”: { “code”: “en_us” }, “components”: [] } }) response = https.request(request) puts response.read_body import http.client import json conn = http.client.HTTPSConnection(“app.pingtochat.com”) payload = json.dumps({ “messaging_product”: “whatsapp”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_a”, “language”: { “code”: “en_us” }, “components”: [] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ } conn.request(“POST”, “/api/v1.0/phone_number_id/key/messages”, payload, headers) res = conn.getresponse() data = res.read() print(data.decode(“utf-8”)) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://app.pingtochat.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”); var content = new StringContent(“{\n \”messaging_product\”: \”whatsapp\”,\n \”to\”: \”919946371505\”,\n \”type\”: \”template\”,\n \”template\”: {\n \”name\”: \”utility_a\”,\n \”language\”: {\n \”code\”: \”en_us\”\n },\n \”components\”: [\n ]\n }\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://app.pingtochat.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_a”, “language”: { “code”: “en_us” }, “components”: [] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "ODIxMTg=" } ], "messages": [ { "id": "4gmNEgkX7r", "message_status": "accepted" } ] } Response Details: contacts: input: The phone number you provided in the to field. wa_id: WhatsApp ID of the recipient. status_id: A unique identifier for the status of this contact. messages: id: A unique ID for the message. message_status: Status of the message (e.g., "accepted").
Message with parameter Description: Send a template message that includes dynamic text parameters. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace the placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your API domain. {{phone_number_id}}: The ID linked to your WhatsApp Business API number. Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_template_variable", "language": { "code": "en" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "User_Name" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "adv45667" } ] } ] } } Field Breakdown: messaging_product: Specifies the messaging product, always "whatsapp". recipient_type: "individual" for single-user messages. to: The recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx). type: "template" for sending a template message. template: name: The name of the pre-approved template (marketing_newyear_va in this case). language: code: The language code of the template (e.g., en for English). components: type: Specifies the part of the template being populated. Use "body" for main content placeholders. parameters: Contains dynamic data to replace placeholders in the template: type: The type of data (e.g., "text"). text: The value that replaces the placeholder in the template. Dynamic Parameters and Placeholders Templates can include dynamic placeholders represented as variables like {{1}}, {{2}}, etc. Each placeholder is replaced by the corresponding value in the parameters array. Template Example: Template name: utility_template_variableTemplate content: Hi {{1}}, Your Order number {{2}} is 24-oct-2024 delevered Example: "parameters": [ { "type": "text", "text": "user_name" // Replaces {{1}} }, { "type": "text", "text": "adv45667" // Replaces {{2}} } ] Resulting message: Hi user_name, Your Order number adv45667 is 24-oct-2024 delevered. Response Structure A successful API call returns a 200 OK response with details about the sent message. Example Response: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "ODIxMTc=" } ], "messages": [ { "id": "SD7mtgA4PH", "message_status": "accepted" } ] } Response Details: contacts: input: The phone number from the to field. wa_id: WhatsApp ID of the recipient. status_id: Identifier for the delivery status. messages: id: A unique identifier for the message. message_status: Status of the message, e.g., "accepted". Notes and Best Practices Pre-approved Templates: Templates must be created and approved in the WhatsApp Business Manager. Ensure placeholders ({{1}}, {{2}}, etc.) align with the payload. Dynamic Content: Use the parameters array to customize messages. Include text, media, or buttons as required by your template. Language Codes: Match the language code with the template’s approved language. Full list of ISO 639-1 codes. Testing: Use a sandbox environment to test integrations. Validate payloads and monitor logs for issues. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxx……’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_b”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } } ‘ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_b”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } } ‘, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxx…..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_b\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxx……….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxx………” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_b”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_b”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxx…………’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/keymessages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxx………”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_b\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxx………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_b”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Message without parameter with attachment Description: Send a template message without dynamic text parameters and with an image attachment in the header. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Example: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_attachment", "language": { "code": "en" }, "components": [ { "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://developers.pingtochat.com/template_media/1736424548.png" } } ] } ] } } Field Descriptions General Fields messaging_product: (string) Always whatsapp. recipient_type: (string) Set to individual for one-to-one messages. to: (string) The recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx). type: (string) Always template. Template Object name: (string) The name of the pre-approved template (e.g., utility_attachment). language: (object) Specifies the language for the template. code: (string) The language code (e.g., en for English). Components Array Header: type: (string) Always header for attachments. parameters: (array) Holds the media or placeholders for the header. type: (string) Always image for images. image: (object) Contains the image details. link: (string) URL of the image (e.g., https://chat.pingtochat.com/template_media/1736424548.png). Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc="marketing_newyear_va_images } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the sent message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘authToken: xxxxxxxxxxx…….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxx……’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } } ‘ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } } ‘, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxxxxx………’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxx………’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_variables_attachment\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n \r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”image\”,\r\n \”image\”: {\r\n \”link\”: \”https://example.com/template_media/1736424548.png\”\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“authToken”, “xxxxxxxxxxxxxx……….”) .addHeader(“”, “”) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxxxxx…………” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxx…………” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxxx………..’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx…………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxxxxxx………..”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxxxxx……………”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_variables_attachment\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n \r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”image\”,\r\n \”image\”: {\r\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxx………………’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx………………’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Message with parameter and attachment Description: Send a template message with dynamic text parameters and an image attachment in the header. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Example: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_variables_attachment", "language": { "code": "en" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12345" } ] }, { "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://chat.pingtochat.com/template_media/1736424548.png" } } ] } ] } } Field Descriptions General Fields messaging_product: (string) Always whatsapp. recipient_type: (string) Set to individual for one-to-one messages. to: (string) The recipient’s phone number in E.164 format (e.g., 91xxxxxxxxxx). type: (string) Always template. Template Object name: (string) The name of the pre-approved template (e.g., utility_variables_attachment). language: (object) Specifies the language for the template. code: (string) The language code (e.g., en for English). Components Array Header: type: (string) Always header for attachments. parameters: (array) Holds the media or placeholders for the header. type: (string) Always image for images. image: (object) Contains the image details. link: (string) URL of the image (e.g., https://chat.pingtochat.com/template_media/1736424548.png). Body: type: (string) Always body for the main text content. parameters: (array) Holds the placeholders to populate the template. type: (string) Always text. text: (string) The value to replace placeholders (e.g.,"12345"). Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the sent message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘authToken: xxxxxxxxxxxx…………….’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxx…………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } } ‘ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } } ‘, CURLOPT_HTTPHEADER => array( ‘authToken: xxxxxxxxxxxx…………….’, ‘: ‘, ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxx…………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_b\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxx……….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“authToken”] = “xxxxxxxxxxxx…………….” request[“”] = “” request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxx…………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) headers = { ‘authToken’: ‘xxxxxxxxxxxx…………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx…………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“authToken”, “xxxxxxxxxxxx…………….”); request.Headers.Add(“”, “”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxx…………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_variables_attachment\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12345\”\r\n }\r\n \r\n ]\r\n },\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”image\”,\r\n \”image\”: {\r\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘authToken’: ‘xxxxxxxxxxxx…………….’, ”: ”, ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx…………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_variables_attachment”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Message without parameters and with buttons Description: Send a template message without dynamic text parameters attachment with buttons message . Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Example: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_button", "language": { "code": "en" }, "components": [ { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://chat.pingtochat.com/" } ] } ] } } Field Descriptions messaging_product Description: Indicates the messaging platform being used. Value: "whatsapp" (signifies this is a WhatsApp message). recipient_type Description: Defines the type of recipient. Value: "individual" (the message is sent to an individual user). to Description: The recipient’s phone number in international format. Value: "91xxxxxxxxxx" (replace with the intended recipient’s phone number). type Description: Specifies the type of message being sent. Value: "template" (indicates this is a pre-approved template message). template Description: The container for the template message configuration. Fields within template name Description: The unique name of the pre-approved template on WhatsApp. Value: "utility_button". language Description: Specifies the language in which the template message is sent. Fields: code: Description: The language code for the message. Value: "en" (English). components Description: Contains the dynamic parts of the template, such as text variables or buttons. Fields within components type Description: The type of dynamic component being used. Value: "BUTTONS" (indicates that this template contains buttons). buttons Description: An array of button configurations for the message. Fields within buttons Each button object in the buttons array has the following fields: For Button 1: Quick Reply type: Description: The type of button. Value: "QUICK_REPLY" (a button that sends a predefined reply when clicked). text: Description: The text displayed on the button. Value: "Unsubscribe from Promos". For Button 2: URL type: Description: The type of button. Value: "url" (a button that redirects to an external link when clicked). text: Description: The text displayed on the button. Value: "Go to link". url: Description: The URL the button opens when clicked. Value: "https://chat.pingtochat.com/". Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the sent message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxx………..’ \ –header ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx………..’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_d”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_d”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxx………..’, ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx………..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”919946371505\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_d\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n },\r\n {\r\n \”type\”: \”url\”,\r\n \”text\”: \”Go to link\”,\r\n \”url\”: \”https://chat.pingtochat.com/\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxx………..”) .addHeader(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxx………..” request[“Cookie”] = “XSRF-TOKEN=xxxxxxxxxxx………..” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_d”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_d”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxx………..”); request.Headers.Add(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx………..”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”919946371505\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_d\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n },\r\n {\r\n \”type\”: \”url\”,\r\n \”text\”: \”Go to link\”,\r\n \”url\”: \”https://chat.pingtochat.com/\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_d”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Message with parameters, attachments, and with buttons Description: Send a template message with dynamic text parameters attachment with buttons message . Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Example: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_full_template", "language": { "code": "en" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12345" } ] }, { "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://chat.pingtochat.com/template_media/1736424548.png" } } ] }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://chat.pingtochat.com/" } ] } ] } } Field Descriptions messaging_product Description: Indicates the messaging platform being used. Value: "whatsapp" (specific to WhatsApp). recipient_type Description: Defines the type of recipient. Value: "individual" (indicates the message is for an individual). to Description: The recipient’s WhatsApp phone number in international format. Value: "919946371505" (replace with the intended recipient’s phone number). type Description: Specifies the type of message being sent. Value: "template" (indicates this is a template message). template Description: Contains the details of the template message. Fields within template name Description: The unique name of the pre-approved template. Value: "utility_full_template". language Description: Specifies the language in which the template is sent. Fields: code: Description: The language code. Value: "en" (English). components Description: Defines the dynamic parts of the template, such as text, images, and buttons. Fields within components type: body Description: Defines the message body. Fields: parameters: Description: Contains dynamic values to populate the body text. Subfields: type: Description: Type of the parameter. Value: "text" (indicates this is text content). text: Description: The dynamic text content to include in the message. Value: "12345" (can be replaced with relevant dynamic content). type: header Description: Defines the message header, which can contain media (images, videos, or documents) or text. Fields: parameters: Description: Contains the dynamic media or text for the header. Subfields: type: Description: Type of the parameter. Value: "image" (indicates the header contains an image). image: Description: Contains details about the image. Subfield: link: Description: The URL of the image to include in the header. Value: "https://chat.pingtochat.com/template_media/1736424548.png". type: BUTTONS Description: Defines interactive buttons in the message. Fields: buttons: Description: An array of buttons to include in the message. Subfields: For Button 1: Quick Reply type: Description: The type of button. Value: "QUICK_REPLY" (sends a predefined response when clicked). text: Description: The text displayed on the button. Value: "Unsubscribe from Promos". For Button 2: URL type: Description: The type of button. Value: "url" (redirects to a URL when clicked). text: Description: The text displayed on the button. Value: "Go to link". url: Description: The URL the button redirects to. Value: "https://chat.pingtochat.com/". Response A successful request will return an HTTP status code of 200 OK along with the following response structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Field Descriptions messaging_product: Type: String Description: Indicates the messaging platform. Always returns whatsapp for messages sent via the WhatsApp Business API. contacts: Type: Array Description: Contains information about the message recipient(s). Fields: input: Type: String Description: The phone number input used in the API request (e.g., 91xxxxxxxxxx). wa_id: Type: String Description: The WhatsApp ID associated with the input phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages: Type: Array Description: Contains details about the sent message. Fields: id: Type: String Description: A unique identifier for the message sent (e.g., M2s4da2y4P). message_status: Type: String Description: The status of the message at the time of the response. Example values include: accepted: The message was successfully accepted by the system. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxx…………..’ \ –header ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx…………..’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_full_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”:”BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_full_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”:”BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxx…………..’, ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx…………..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_full_template\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12345\”\r\n }\r\n \r\n ]\r\n },\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”image\”,\r\n \”image\”: {\r\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”:\”BUTTONS\”,\r\n \”buttons\”: [\r\n {\r\n \”type\”: \”QUICK_REPLY\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n },\r\n \r\n {\r\n \”type\”: \”url\”,\r\n \”text\”: \”Go to link\”,\r\n \”url\”: \”https://chat.pingtochat.com/\”\r\n \r\n }\r\n ]\r\n } \r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxx…………..”) .addHeader(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx…………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxx…………..” request[“Cookie”] = “XSRF-TOKEN=xxxxxxxxxxx…………..” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_full_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_full_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx…………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx…………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxx…………..”); request.Headers.Add(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx…………..”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_full_template\”,\r\n \”language\”: {\r\n \”code\”: \”en\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12345\”\r\n }\r\n \r\n ]\r\n },\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”image\”,\r\n \”image\”: {\r\n \”link\”: \”https://chat.pingtochat.com/template_media/1736424548.png\”\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”:\”BUTTONS\”,\r\n \”buttons\”: [\r\n {\r\n \”type\”: \”QUICK_REPLY\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n },\r\n \r\n {\r\n \”type\”: \”url\”,\r\n \”text\”: \”Go to link\”,\r\n \”url\”: \”https://chat.pingtochat.com/\”\r\n \r\n }\r\n ]\r\n } \r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx…………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx…………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_full_template”, “language”: { “code”: “en” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12345” } ] }, { “type”: “header”, “parameters”: [ { “type”: “image”, “image”: { “link”: “https://chat.pingtochat.com/template_media/1736424548.png” } } ] }, { “type”: “BUTTONS”, “buttons”: [ { “type”: “QUICK_REPLY”, “text”: “Unsubscribe from Promos” }, { “type”: “url”, “text”: “Go to link”, “url”: “https://chat.pingtochat.com/” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
No parameter with header , body , footer and buttons - quick replay Request URL POST http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace the placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your API domain. {{phone_number_id}}: The ID linked to your WhatsApp Business API number. Headers Content-Type: Specifies that the request body is in JSON format. Authorization: A Bearer token is required for authentication. Example Payload { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_h", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } 6. Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_h". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Button Component Type: button Description: This component allows interactive Quick Replies. sub_type Value: "quick_reply" Description: Defines the type of button. "quick_reply": Provides a predefined response option. index Type: Integer Description: Position of the button in the template. "0": The first button. parameters Type: Array Description: Defines the button text. text: "Unsubscribe from Promos" Response { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxx…………..’ \ –header ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx…………..’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxx…………..’, ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx…………..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_h\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxx…………..”) .addHeader(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx…………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxx…………..” request[“Cookie”] = “XSRF-TOKEN=xxxxxxxxxxx…………..” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx…………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx…………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxx…………..”); request.Headers.Add(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx…………..”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_h\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx…………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx…………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_h”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
No parameter with header-text and body and footer Endpoint: POST http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace the placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your API domain. {{phone_number_id}}: The ID linked to your WhatsApp Business API number. Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_g", "language": { "code": "en_us" }, "components": [ ] } } 6. Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_g". template.language.code Type: String Description: Language code for the template. The value should match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: This field is empty ([]) since the utility_g template does not include any dynamic content. 7. Expected API Response When the request is successful, the API will return an HTTP 200 OK status along with the following JSON response: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp" to indicate the platform. contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier representing the status of the message. messages Type: Array Description: Contains information about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the status of the message processing. "accepted" – The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxx……….’ \ –header ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx……….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_g”, “language”: { “code”: “en_us” }, “components”: [ ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_g”, “language”: { “code”: “en_us” }, “components”: [ ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxx……….’, ‘Cookie: XSRF-TOKEN=xxxxxxxxxxx……….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_g\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxx……….”) .addHeader(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx……….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxx……….” request[“Cookie”] = “XSRF-TOKEN=xxxxxxxxxxx……….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_g”, “language”: { “code”: “en_us” }, “components”: [] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_g”, “language”: { “code”: “en_us” }, “components”: [] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx……….’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx……….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxx……….”); request.Headers.Add(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxx……….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_g\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx……….’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxx……….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_g”, “language”: { “code”: “en_us” }, “components”: [] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Message with parameters header body footer and with buttons PingtoChat’s Utility Category enables businesses to send pre-approved WhatsApp template messages through the WhatsApp Business API. The supported message types include: Messages Without Parameters Messages With Parameters Messages With Parameters and Attachments Messages With Buttons (Quick Reply, URL, Phone Number) For URL and Phone Number buttons, they do not need to be included in the response. Endpoint: POST http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_ab", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "p2c" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components 1. Header Type: Text Content: "p2c" Purpose: Displays a short heading or key identifier. 2. Body Type: Text Content: "12CR007" Purpose: Contains the main message content. 3. Buttons Type: Quick Reply Text: "Unsubscribe from Promos" Purpose: Allows users to quickly opt out of promotional messages. Response Structure A successful request will return an HTTP status code of 200 OK along with the following response: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "MTA0NDI4" } ], "messages": [ { "id": "8Eb8pQg0Xl", "message_status": "accepted" } ] } Field Descriptions messaging_product Type: String Description: Indicates the messaging platform. Always returns "whatsapp". contacts Type: Array Description: Contains information about the message recipient. Fields: input: Type: String Description: The phone number used in the API request. wa_id: Type: String Description: The WhatsApp ID associated with the phone number. status_id: Type: String Description: A unique identifier for the status of the message. messages Type: Array Description: Contains details about the sent message. Fields: id: Type: String Description: A unique identifier for the message sent. message_status: Type: String Description: The status of the message at the time of the response. Example values include: "accepted" – The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxx…………..’ \ –header ‘Cookie: XSRF-TOKEN=xxxxxxxxxxxx…………..’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxx…………..’, ‘Cookie: XSRF-TOKEN=xxxxxxxxxxxx…………..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ab\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxx…………..”) .addHeader(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxxx…………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxx…………..” request[“Cookie”] = “XSRF-TOKEN=xxxxxxxxxxxx…………..” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx…………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxxx…………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxx…………..”); request.Headers.Add(“Cookie”, “XSRF-TOKEN=xxxxxxxxxxxx…………..”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ab\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx…………..’, ‘Cookie’: ‘XSRF-TOKEN=xxxxxxxxxxxx…………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
No parameter header , body , footer and buttons - quick-replay ,visit website Overview A Quick Reply Button This ensures a seamless user experience by giving them control over their messaging preferences. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_i", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_i". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 parameters: type: "text" text: "Unsubscribe" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "MTA0NDUw" } ], "messages": [ { "id": "ILHxFrzvI0", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe ” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe ” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_b\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxx……….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe ” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe ” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_i\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe \”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_i”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe ” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
No parameter header , body , footer and buttons - quick-replay ,visit-website,phone-number Overview A Quick Reply Button A URL A Phone Number For URL and Phone Number buttons, they do not need to be included in the Example payload. This template provides a user-friendly way to manage marketing preferences. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_j", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_j". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx" } ], "messages": [ { "id": "wamid.HBgLMjAyNTAyMT..." } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxx……….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxx……….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_j\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxx……….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxx……….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxx……….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxx……….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_j\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxx……….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_j”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
No parameter body,footer and buttons - quick-replay Overview A Quick Reply Button that allows users to unsubscribe from promotional messages. This template enhances user interaction by providing a simple opt-out option for promotional content. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_l", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_l". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "MTA0NDUw" } ], "messages": [ { "id": "ILHxFrzvI0", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxx…………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxx…………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_l\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxx…………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxx…………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx…………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxx…………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_l\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxx…………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_l”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
No parameter body,footer and buttons - quick-replay,visit-website Overview A Quick Reply Button that allows users to unsubscribe from promotional messages. A URL for visiting their website For URL buttons, they do not need to be included in the Example payload. This template enhances user engagement by giving users a quick and easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_m", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_m". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "MTA0NDUw" } ], "messages": [ { "id": "ILHxFrzvI0", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxxxx…………..’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxxxx…………..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_m\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxxxx…………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxxxx…………..” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxxx…………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxxxx…………..”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_m\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxxx…………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_m”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
No parameter body,footer and buttons - quick-replay,visit-website,phone-number Overview The utility_n template is a WhatsApp Business API message template designed for utility-based messaging. It includes: A Quick Reply Button that allows users to unsubscribe from promotional messages. A URL Button A Phone Number Button For URL and Phone Number buttons, they do not need to be included in the Example payload. This template enhances user engagement by providing an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_n", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_n". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "MTA0NDUw" } ], "messages": [ { "id": "ILHxFrzvI0", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_n\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_n\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_n”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Template without parameter body,footer and buttons - quick-replay,visit-website Overview A Quick Reply Button that enables users to opt out of promotional messages easily. A URL for visiting their website For URL buttons, they do not need to be included in the Example payload. This template is ideal for sending service-related updates while providing a simple opt-out mechanism. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_p", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_p". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_id_key/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_id_key/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_p\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_id_key/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_id_key/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_id_key/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_id_key/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_p\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_id_key/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_p”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
No parameter body,footer and buttons - phone number Overview A Phone Number For calling For Phone Number buttons, they do not need to be included in the Example payload. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_qqq", "language": { "code": "en_us" }, "components": [ ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_qqq". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. In this case, the array is empty ([]), meaning there are no additional components such as headers, body text, or buttons. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx…………’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_qqq”, “language”: { “code”: “en_us” }, “components”: [ ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_qqq”, “language”: { “code”: “en_us” }, “components”: [ ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx…………’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_qqq\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx…………”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx…………” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_qqq”, “language”: { “code”: “en_us” }, “components”: [] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_qqq”, “language”: { “code”: “en_us” }, “components”: [] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx…………’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx…………”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_qqq\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n \r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx…………’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_qqq”, “language”: { “code”: “en_us” }, “components”: [] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
No parameter body,buttons - quick-replay Overview A Quick Reply Button that enables users to opt out of promotional messages. This template is suitable for sending service notifications while providing an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_r", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_r". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx…………’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx…………’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_r\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx…………”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx…………” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx…………’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx…………”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_r\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx…………’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_r”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
No parameter body,buttons - quick-replay,visit-website Overview A Quick Reply Button that enables users to opt out of promotional messages. A URL for visiting their website For URL buttons, they do not need to be included in the Example payload. This template is suitable for sending service notifications while providing an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_s", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_s". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxxxxxxx………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxxxxxxx………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_s\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxxxxxxx………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxxxxxxx………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxxxxxx………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxxxxxxx………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_s\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxxxxxx………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_s”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
No parameter body,buttons - quick-replay,visit-website,phone-number The utility_t template is a WhatsApp Business API message template designed for utility and service-related notifications. It includes: A Quick Reply Button that allows users to opt out of promotional messages. A URL for visiting their website A Phone Number For calling For URL and Phone Number buttons, they do not need to be included in the Example payload. This template is suitable for sending important service messages while providing an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_t", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_t". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxxx…………..’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxxx…………..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_t\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxxx…………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxxx…………..” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxx…………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxxx…………..”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_t\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxx…………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_t”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
No parameter body,buttons - quick-replay,visit-website Overview A Quick Reply Button that allows users to opt out of promotional messages. A URL for visiting their website For URL buttons, they do not need to be included in the Example payload. This template is suitable for sending important service messages while providing an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_v", "language": { "code": "en_us" }, "components": [ { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_v". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxxx…………..’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxxx…………..’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_v\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxxx…………..”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxxx…………..” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxx…………..’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxxx…………..”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_v\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxxx…………..’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_v”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Parameter with header and body Overview A header with dynamic text personalization. A body containing key details with placeholders for dynamic content. This template is ideal for transactional messages, customer updates, and service notifications. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_x", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "p2c" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_x". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "p2c" – Dynamic text used in the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }’ ‘<'+'?'+'php'+ ` ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_x\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_x\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_x”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Parameter with header,body,footer Overview A header with dynamic text. A body containing the main message text with placeholders for dynamic content. A Footer The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for transactional messages, order confirmations, or customer updates. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_y", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "p2c" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_y". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "p2c" – Dynamic text used in the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_y\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_y\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_y”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Parameter with header,body,footer buttons - quick-replay Overview A header with dynamic text. A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_z", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "p2c" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_z". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "p2c" – Dynamic text used in the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: Array Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: Array Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_z\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_z\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_z”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Parameter with header,body,footer buttons - quick-replay,visit-website Overview A header with dynamic text. A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. A URL for visiting their website For URL and Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_aa", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "p2c" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_aa". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "p2c" – Dynamic text used in the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_aa\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_aa\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aa”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Parameter with header,body,footer buttons - quick-replay,visit-website,phone-number Overview A header with dynamic text. A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. A URL for visiting their website A Phone Number For URL and Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_ab", "language": { "code": "en_us" }, "components": [ { "type": "header", "parameters": [ { "type": "text", "text": "p2c" } ] }, { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_ab". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Header Type: header Description: The header section of the template message. parameters: type: "text" – Specifies that the header contains text. text: "p2c" – Dynamic text used in the header. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”919946371505\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ab\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages”); request.Headers.Add(“Authorization”, “Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”919946371505\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ab\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”header\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”p2c\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://app.pingtochat.com/api/v1.0/313137333231393/315f70696e67746f63686174/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer eyJpdiI6IndwTkFXZUdiY3BNdWUwMnhDem04eGc9PSIsInZhbHVlIjoiQ3c2aDYxYWxBQmtRSkVGNllRRGpOUT09IiwibWFjIjoiMzk4ODRlMmY4ZDEzODAyODFjNThlYmQwMzEyMzYyYjUwNjk0NzE3YWU5NzRkOGE4ODE5NWZmYTg3ZDBmNjk0MCIsInRhZyI6IiJ9’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “919946371505”, “type”: “template”, “template”: { “name”: “utility_ab”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “header”, “parameters”: [ { “type”: “text”, “text”: “p2c” } ] }, { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Parameter with body,footer buttons - quick-replay Overview A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_ac", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_ac". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. 7. Expected API Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ac\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ac\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ac”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Parameter with body,footer buttons - quick-replay,visit-website Overview A header with dynamic text. A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. A URL for visiting their website For URL and Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxxx", "type": "template", "template": { "name": "utility_ad", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_ad". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ad\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ad\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ad”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Parameter with body,footer buttons - quick-replay,visit-website,phone-number Overview A header with dynamic text. A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. A URL for visiting their website A Phone Number for calling For URL and Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_af", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_af". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_af\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_af\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_af”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Parameter with body,footer buttons - phone-number Overview A body containing the main message text with placeholders for dynamic content. A URL for visiting their website For Phone Number buttons, they do not need to be included in the Example payload. The footer example payload does not need to be included in the example payload, as it is already in the template; it will function correctly on its own. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_ai", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] } ] } } Key Components in the Payload ✅ messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". ✅ recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. ✅ to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). ✅ type Type: String Description: Defines the type of message. Always set to "template". ✅ template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_ai". ✅ template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). ✅ components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ai\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ai\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ai”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Parameter with body buttons - quick-replay Overview A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_aj", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_aj". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_aj\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_aj\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_aj”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Parameter with body buttons - quick-replay,visit-website Overview A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. A URL for visiting their website For URL buttons, they do not need to be included in the Example payload. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_ak", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_ak". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ak\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ak\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ak”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Parameter with body buttons - quick-replay,visit-website,phone-number Overview A body containing the main message text with placeholders for dynamic content. A Quick Reply Button allowing users to opt out of promotional messages. A URL for visiting their website A Phone Number for calling For URL and Phone Number buttons, they do not need to be included in the Example payload. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method: POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_al", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] }, { "type": "button", "sub_type": "quick_reply", "index": 0, "parameters": [ { "type": "text", "text": "Unsubscribe from Promos" } ] } ] } } Key Components in the Payload messaging_product Type: String Description: Specifies the messaging platform. Always set to "whatsapp". recipient_type Type: String Description: Defines the recipient type. Use "individual" for one-on-one messaging. to Type: String Description: The recipient’s WhatsApp number in international format (e.g., "91xxxxxxxxxx"). type Type: String Description: Defines the type of message. Always set to "template". template.name Type: String Description: Specifies the pre-approved WhatsApp template name. In this case, it is "utility_al". template.language.code Type: String Description: Language code for the template. Must match the approved template settings. Example: "en_us" for English (United States). components Type: Array Description: Defines the interactive elements in the template. Body Type: body Description: The main content of the template message. parameters: type: "text" text: "12CR007" – Dynamic text used in the body. Quick Reply Button Type: button Description: Adds an interactive Quick Reply button. sub_type: "quick_reply" index: 0 (First button in the list) parameters: type: "text" text: "Unsubscribe from Promos" – The text displayed on the button. Response If the request is successful, the API returns a 200 OK response with the following JSON structure: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_al\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_al\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n },\r\n {\r\n \”type\”: \”button\”,\r\n \”sub_type\”: \”quick_reply\”,\r\n \”index\”: 0,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”Unsubscribe from Promos\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_al”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] }, { “type”: “button”, “sub_type”: “quick_reply”, “index”: 0, “parameters”: [ { “type”: “text”, “text”: “Unsubscribe from Promos” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Parameter with body buttons - phone-number Overview A body containing the main message text with placeholders for dynamic content. A Phone Number for calling For Phone Number buttons, they do not need to be included in the Example payload. This template is suitable for transactional updates with an easy opt-out option. Endpoint: http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/messages Replace placeholders: {{key}}: Your API key for authentication.How to create key {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. Method:s POST Headers: Content-Type: application/json Authorization: Bearer <your_access_token> Example Payload: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "template", "template": { "name": "utility_ah", "language": { "code": "en_us" }, "components": [ { "type": "body", "parameters": [ { "type": "text", "text": "12CR007" } ] } ] } } Explanation of Fields messaging_product Type: string Value: "whatsapp" Description: Defines the messaging platform. recipient_type Type: string Value: "individual" Description: Indicates a one-on-one message. to Type: string Example: "91xxxxxxxxxx" Description: The recipient’s WhatsApp number in international format. type Type: string Value: "template" Description: Defines this as a template message. template.name Type: string Value: "utility_ah" Description: Name of the pre-approved WhatsApp template. template.language.code Type: string Value: "en_us" Description: Language of the template. components Type: array Description: Contains message elements. Body Component Type: "body" Description: Contains the main message text. Parameters: Type: "text" Value: "12CR007" – Dynamic text inserted into the message. Expected API Response On success, WhatsApp returns a 200 OK response: { "messaging_product": "whatsapp", "contacts": [ { "input": "91xxxxxxxxxx", "wa_id": "91xxxxxxxxxx", "status_id": "NTg0MTc=" } ], "messages": [ { "id": "M2s4da2y4P", "message_status": "accepted" } ] } Response Field Descriptions messaging_product Type: String Description: Always returns "whatsapp". contacts Type: `Array** Description: Contains recipient details. Fields within contacts: input: The phone number used in the API request. wa_id: WhatsApp ID linked to the phone number. status_id: A unique identifier for message status. messages Type: `Array** Description: Contains details about the sent message. Fields within messages: id: A unique message identifier. message_status: Indicates the message processing status. "accepted": The message was successfully processed. Sample codes CURL PHP Java Ruby Python C# Node JS curl –location ‘https://example.com/api/v1.0/phone_number_id/key/messages’ \ –header ‘Content-Type: application/json’ \ –header ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ \ –data ‘{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ah”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }’ ‘<'+'?'+'php'+ ` $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => ‘https://example.com/api/v1.0/phone_number_id/key/messages’, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => ‘POST’, CURLOPT_POSTFIELDS =>'{ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ah”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }’, CURLOPT_HTTPHEADER => array( ‘Content-Type: application/json’, ‘Authorization: Bearer xxxxxxxxxxxxx………………….’ ), )); $response = curl_exec($curl); curl_close($curl); echo $response; ?>;`; OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse(“application/json”); RequestBody body = RequestBody.create(mediaType, “{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ah\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”); Request request = new Request.Builder() .url(“https://example.com/api/v1.0/phone_number_id/key/messages”) .method(“POST”, body) .addHeader(“Content-Type”, “application/json”) .addHeader(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”) .build(); Response response = client.newCall(request).execute(); require “uri” require “json” require “net/http” url = URI(“https://example.com/api/v1.0/phone_number_id/key/messages”) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request[“Content-Type”] = “application/json” request[“Authorization”] = “Bearer xxxxxxxxxxxxx………………….” request.body = JSON.dump({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ah”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) response = https.request(request) puts response.read_body import requests import json url = “https://example.com/api/v1.0/phone_number_id/key/messages” payload = json.dumps({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ah”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) headers = { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ } response = requests.request(“POST”, url, headers=headers, data=payload) print(response.text) var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, “https://example.com/api/v1.0/phone_number_id/key/messages”); request.Headers.Add(“Authorization”, “Bearer xxxxxxxxxxxxx………………….”); var content = new StringContent(“{\r\n \”messaging_product\”: \”whatsapp\”,\r\n \”recipient_type\”: \”individual\”,\r\n \”to\”: \”91xxxxxxxxxx\”,\r\n \”type\”: \”template\”,\r\n \”template\”: {\r\n \”name\”: \”utility_ah\”,\r\n \”language\”: {\r\n \”code\”: \”en_us\”\r\n },\r\n \”components\”: [\r\n {\r\n \”type\”: \”body\”,\r\n \”parameters\”: [\r\n {\r\n \”type\”: \”text\”,\r\n \”text\”: \”12CR007\”\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}”, null, “application/json”); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); var request = require(‘request’); var options = { ‘method’: ‘POST’, ‘url’: ‘https://example.com/api/v1.0/phone_number_id/key/messages’, ‘headers’: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer xxxxxxxxxxxxx………………….’ }, body: JSON.stringify({ “messaging_product”: “whatsapp”, “recipient_type”: “individual”, “to”: “91xxxxxxxxxx”, “type”: “template”, “template”: { “name”: “utility_ah”, “language”: { “code”: “en_us” }, “components”: [ { “type”: “body”, “parameters”: [ { “type”: “text”, “text”: “12CR007” } ] } ] } }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });
Zero-Tap Template This document provides detailed information about the Authentication Template used for secure verification purposes. These templates allow businesses to send structured messages to users for authentication via one-time passcodes (OTPs). Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: zero_tap_auth_template_one Language: en_US (English – United States) Category: AUTHENTICATION Message Send TTL: 60 seconds Allow Category Change: No Components The zero_tap_auth_template_one consists of a Body, Footer, and Buttons component. Body Type: BODY Security Recommendation: true Purpose: Includes an OTP and a security recommendation advising users to keep their verification code confidential. Footer Type: FOOTER Code Expiration: 5 minutes Purpose: Informs the user of the OTP validity period. Buttons Type: BUTTONS Buttons: Type: otp OTP Type: zero_tap Text: Copy Code Autofill Text: Autofill Zero-Tap Terms Accepted: true Supported Apps: Package Name: app.pingtochat.com Signature Hash: K8a/AINcGX7 Sample Request { "name": "zero_tap_auth_template_one", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "zero_tap", "text": "Copy Code", "autofill_text": "Autofill", "zero_tap_terms_accepted": true, "supported_apps": [ { "package_name": "app.pingtochat.com", "signature_hash": "K8a/AINcGX7" } ] } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "AUTHENTICATION" } Notes This template is designed specifically for authentication purposes, including account verification and secure access. The Zero-Tap Autofill feature enhances user experience by reducing manual entry. The Copy Code button provides an alternative for users who need to manually enter their OTP. The message format supports variable placeholders, making it adaptable for multiple authentication scenarios.
Auto-Fill Template This document provides detailed information about the Authentication Template used for secure verification purposes. These templates allow businesses to send structured messages to users for authentication via one-time passcodes (OTPs). Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: authentication_code_autofill_button_one Language: en_US (English – United States) Category: AUTHENTICATION Message Send TTL: 60 seconds Allow Category Change: No Components The authentication_code_autofill_button_one consists of a Body, Footer, and Buttons component. Body Type: BODY Security Recommendation: true Purpose: Includes an OTP and a security recommendation advising users to keep their verification code confidential. Footer Type: FOOTER Code Expiration: 10 minutes Purpose: Informs the user of the OTP validity period. Buttons Type: BUTTONS Buttons: Type: otp OTP Type: one_tap Text: Copy Code Autofill Text: Autofill Package Name: app.pingtochat.com Signature Hash: K8a/AINcGX7 Sample Request { "name": "authentication_code_autofill_button_one", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 10 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "one_tap", "text": "Copy Code", "autofill_text": "Autofill", "package_name": "app.pingtochat.com", "signature_hash": "K8a/AINcGX7" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "AUTHENTICATION" } Notes This template is designed specifically for authentication purposes, including account verification and secure access. The One-Tap Autofill feature enhances user experience by allowing quick OTP entry. The Copy Code button provides an alternative for users who need to manually enter their OTP. The message format supports variable placeholders, making it adaptable for multiple authentication scenarios.
Copy-Code Template This document provides detailed information about the Authentication Template used for secure verification purposes. These templates allow businesses to send structured messages to users for authentication via one-time passcodes (OTPs). Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: authentication_copy_code_button_one Language: en_US (English – United States) Category: AUTHENTICATION Message Send TTL: 60 seconds Allow Category Change: No Components The authentication_copy_code_button_one consists of a Body, Footer, and Buttons component. Body Type: BODY Security Recommendation: true Purpose: Includes an OTP and a security recommendation advising users to keep their verification code confidential. Footer Type: FOOTER Code Expiration: 5 minutes Purpose: Informs the user of the OTP validity period. Buttons Type: BUTTONS Buttons: Type: otp OTP Type: copy_code Text: Copy Code Sample Request { "name": "authentication_copy_code_button_one", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "copy_code", "text": "Copy Code" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "AUTHENTICATION" } Notes This template is designed specifically for authentication purposes, including account verification and secure access. The Copy Code button provides an easy way for users to manually copy and paste the OTP. The message format supports variable placeholders, making it adaptable for multiple authentication scenarios.
No parameter The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., BODY). text (string, required): The actual content of the template component. Request Body { "name": "marketing_a", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are introducing our new product!" } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later.
No parameter with header-text and body The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the header and body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Content-Type: Should be set to application/json. Authorization: Bearer token for authentication. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required): The actual content of the template component. Request Body { "name": "markting_f", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component requires a format field (e.g., TEXT).
No parameter with header-text and body and footer The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required): The actual content of the template component. Request Body { "name": "markting_g", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component requires a format field (e.g., TEXT). The FOOTER component is an optional text field that typically contains closing remarks.
No parameter with header-text and body and button quick-replay The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY). text (string, required): The label displayed on the button. Request Body { "name": "markting_h", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component requires a format field (e.g., TEXT). The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY options.
No parameter with header-text and body and button quick-replay,visit-website The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY). text (string, required): The label displayed on the button. Sample Request { "name": "markting_i", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component requires a format field (e.g., TEXT). The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY options.
No parameter with header-text and body and button quick-replay,visit-website, phone number The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER). text (string, required): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The contact number for the call button. Sample Request { "name": "markting_j", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component requires a format field (e.g., TEXT). The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY options, URL buttons for external links, and PHONE_NUMBER buttons for direct calling.
No parameter with header-text and body and button quick-replay,visit-website, phone number and copy-code The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The contact number for the call button. example (string, required for COPY_CODE type): The example code to be copied when the button is clicked. Sample Request { "name": "markting_k", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component requires a format field (e.g., TEXT). The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY options, URL buttons for external links, PHONE_NUMBER buttons for direct calling, and COPY_CODE buttons for copying promo codes.
No parameter body , footer and button quick-replay The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The contact number for the call button. example (string, required for COPY_CODE type): The example code to be copied when the button is clicked. Sample Request { "name": "markting_l", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY options for user interaction.
No parameter body , footer and button quick-replay and visit-website The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL). text (string, required for QUICK_REPLY, URL types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. Sample Request { "name": "markting_m", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY options for user interaction.
No parameter body , footer and button quick-replay , visit-website and phone-number The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The phone number associated with the button. Sample Request { "name": "markting_n", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY, URL, and PHONE_NUMBER buttons for user interaction.
No parameter body , footer and button quick-replay , visit-website , phone-number and copy-code The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The phone number associated with the button. example (string, required for COPY_CODE type): The example code to be copied when the button is pressed. Sample Request { "name": "markting_o", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY, URL, PHONE_NUMBER, and COPY_CODE buttons for user interaction.
No parameter with body , button quick-replay The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The phone number associated with the button. example (string, required for COPY_CODE type): The example code to be copied when the button is pressed. Sample Request { "name": "markting_p", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY.
No parameter body , button quick-replay and visit-website The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. Sample Request { "name": "markting_q", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY and URL.
No parameter body , button quick-replay , visit-website , phone-number The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The phone number associated with the button. Sample Request { "name": "markting_r", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY, URL, and PHONE_NUMBER.
No parameter body , button quick-replay , visit-website , phone-number and copy-code The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER type): Specifies the format of the header (e.g., TEXT). text (string, required for HEADER, BODY, FOOTER): The actual content of the template component. buttons (array, required for BUTTONS type): List of interactive buttons. Buttons Each button in the buttons array should have the following properties: type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER types): The label displayed on the button. url (string, required for URL type): The destination URL when the button is clicked. phone_number (string, required for PHONE_NUMBER type): The phone number associated with the button. example (string, required for COPY_CODE type): The example code to be copied when the button is pressed. Sample Request { "name": "markting_s", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Hi Greetings from P2C!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The BODY component contains the main message text. The FOOTER component is an optional text field that typically contains closing remarks. The BUTTONS component allows adding interactive buttons, such as QUICK_REPLY, URL, PHONE_NUMBER, and COPY_CODE buttons for user interaction.
Parameter with header and body This document provides detailed information about the Marketing Template (marketing_t). It is designed for marketing purposes, allowing businesses to send customizable messages to users. The template supports placeholders for dynamic content, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_t Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components This template consists of two primary components: Header and Body. 1. Header Component Type: HEADER Format: TEXT Text: Our {{1}} is on! Example Usage: Example Header Text: Our Summer Sale is on! Here, {{1}} is dynamically replaced with Summer Sale or any other promotional event. 2. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}} in Header: Represents the name of the promotional event (e.g., Summer Sale, Winter Discount). {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Header) = Holiday Sale {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Header: Our Holiday Sale is on! Body: We are introducing our new product about new chat feature. Example request { "name": "marketing_t", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility.
Parameter with header , body and footer This document provides detailed information about the Marketing Template (marketing_u). It is designed for marketing purposes, allowing businesses to send customizable messages to users. The template supports placeholders for dynamic content, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_u Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components This template consists of three primary components: Header, Body, and Footer. 1. Header Component Type: HEADER Format: TEXT Text: Our {{1}} is on! Example Usage: Example Header Text: Our Summer Sale is on! Here, {{1}} is dynamically replaced with Summer Sale or any other promotional event. 2. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 3. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}} in Header: Represents the name of the promotional event (e.g., Summer Sale, Winter Discount). {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Header) = Holiday Sale {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Header: Our Holiday Sale is on! Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Sample Request { "name": "marketing_u", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility.
Parameter with header-body-footer , buttons - quick-replay This document provides detailed information about the Marketing Template (marketing_v). It is designed for marketing purposes, allowing businesses to send customizable messages to users. The template supports placeholders for dynamic content, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_v Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components This template consists of four primary components: Header, Body, Footer, and Buttons. 1. Header Component Type: HEADER Format: TEXT Text: Our {{1}} is on! Example Usage: Example Header Text: Our Summer Sale is on! Here, {{1}} is dynamically replaced with Summer Sale or any other promotional event. 2. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 3. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. 4. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button allowing users to quickly opt out of promotional messages. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}} in Header: Represents the name of the promotional event (e.g., Summer Sale, Winter Discount). {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Header) = Holiday Sale {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Header: Our Holiday Sale is on! Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Button: Unsubscribe from Promos Sample Request { "name": "marketing_v", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations.
Parameter with header-body-footer , buttons - quick-replay,visit website This document provides detailed information about the Marketing Template (marketing_w). It is designed for marketing purposes, allowing businesses to send customizable messages to users. The template supports placeholders for dynamic content, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_w Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components This template consists of four primary components: Header, Body, Footer, and Buttons. 1. Header Component Type: HEADER Format: TEXT Text: Our {{1}} is on! Example Usage: Example Header Text: Our Summer Sale is on! Here, {{1}} is dynamically replaced with Summer Sale or any other promotional event. 2. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 3. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. 4. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button allowing users to quickly opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs users to an external link for additional information or actions. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}} in Header: Represents the name of the promotional event (e.g., Summer Sale, Winter Discount). {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Header) = Holiday Sale {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Header: Our Holiday Sale is on! Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (Redirects to https://app.pingtochat.com/) Sample Request { "name": "marketing_w", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations. The Go to link button enables users to navigate to external pages for more details or additional actions.
Parameter with header-body-footer , buttons - quick-replay,visit-website,phone-number This document provides detailed information about the Marketing Template (marketing_x). It is designed for marketing purposes, allowing businesses to send customizable messages to users. The template supports placeholders for dynamic content, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_x Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components This template consists of four primary components: Header, Body, Footer, and Buttons. 1. Header Component Type: HEADER Format: TEXT Text: Our {{1}} is on! Example Usage: Example Header Text: Our Summer Sale is on! Here, {{1}} is dynamically replaced with Summer Sale or any other promotional event. 2. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 3. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. 4. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button allowing users to quickly opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs users to an external link for additional information or actions. Type: PHONE_NUMBER Text: Call Phone Number: +91xxxxxxxxxx Purpose: Allows users to directly call a specified phone number for further assistance. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}} in Header: Represents the name of the promotional event (e.g., Summer Sale, Winter Discount). {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Header) = Holiday Sale {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Header: Our Holiday Sale is on! Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (Redirects to https://app.pingtochat.com/) Call (Dials +91xxxxxxxxxx) Sample Request { "name": "marketing_x", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations. The Go to link button enables users to navigate to external pages for more details or additional actions. The Call button provides direct contact with customer support or sales teams, improving customer engagement.
Parameter with header-body-footer , buttons - quick-replay,visit-website,phone-number,copy-code This document provides detailed information about the Marketing Template (marketing_y). It is designed for marketing purposes, allowing businesses to send customizable messages to users. The template supports placeholders for dynamic content, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_y Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components This template consists of four primary components: Header, Body, Footer, and Buttons. 1. Header Component Type: HEADER Format: TEXT Text: Our {{1}} is on! Example Usage: Example Header Text: Our Summer Sale is on! Here, {{1}} is dynamically replaced with Summer Sale or any other promotional event. 2. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 3. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. 4. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button allowing users to quickly opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs users to an external link for additional information or actions. Type: PHONE_NUMBER Text: Call Phone Number: +91xxxxxxxxxx Purpose: Allows users to directly call a specified phone number for further assistance. Type: COPY_CODE Example: WRETTT Purpose: Provides users with a code that can be copied for promotional use, discounts, or verification. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}} in Header: Represents the name of the promotional event (e.g., Summer Sale, Winter Discount). {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Header) = Holiday Sale {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Header: Our Holiday Sale is on! Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (Redirects to https://app.pingtochat.com/) Call (Dials +91xxxxxxxxxx) Copy Code (WRETTT – Users can copy this code for later use) Sample Request { "name": "marketing_y", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations. The Go to link button enables users to navigate to external pages for more details or additional actions. The Call button provides direct contact with customer support or sales teams, improving customer engagement. The Copy Code button allows users to easily copy a promotional or discount code for later use.
Parameter with body footer button - quick replay This document provides detailed information about the Marketing Template (marketing_z). It is designed for marketing purposes, allowing businesses to send customizable messages to users. The template supports placeholders for dynamic content, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_z Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components This template consists of three primary components: Body, Footer, and Buttons. 1. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 2. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. 3. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button allowing users to quickly opt out of promotional messages. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Sample Request { "name": "marketing_z", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations.
Parameter with body footer button - quick-replay ,visit-website and phone-number This document provides detailed information about the Marketing Templates used for marketing purposes. These templates allow businesses to send customizable messages to users with dynamic placeholders, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Marketing Template AA Name: marketing_aa Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components The marketing_aa template consists of multiple components: Body, Footer, and Buttons. 1. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 2. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. 3. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button for opting out of promotions. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs users to an external link for further engagement. Type: PHONE_NUMBER Text: Call Phone Number: 91xxxxxxxxxx Purpose: Provides a direct call option for customer support or inquiries. Dynamic Placeholders The templates include placeholders for dynamic content: {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (redirects to https://app.pingtochat.com/) Call (dials 91xxxxxxxxxx) Sample Request { "name": "marketing_aa", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations. The Go to link button helps direct users to external resources, while the Call button facilitates direct communication.
Parameter with body footer button - quick-replay ,visit-website, phone-number and copy-code This document provides detailed information about the Marketing Templates used for marketing purposes. These templates allow businesses to send customizable messages to users with dynamic placeholders, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Marketing Template AB Name: marketing_ab Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components The marketing_ab template consists of multiple components: Body, Footer, and Buttons. 1. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 2. Footer Component Type: FOOTER Text: Thank you for choosing us! Purpose: This provides a polite closing message, enhancing customer engagement and gratitude. 3. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button for opting out of promotions. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs users to an external link for further engagement. Type: PHONE_NUMBER Text: Call Phone Number: 91xxxxxxxxxx Purpose: Provides a direct call option for customer support or inquiries. Type: COPY_CODE Example: WRETTT Purpose: Allows users to copy a promotional or discount code for use. Dynamic Placeholders The templates include placeholders for dynamic content: {{1}} in Body: Represents an introductory phrase (e.g., our, the latest). {{2}} in Body: Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Body: We are introducing our new product about new chat feature. Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (redirects to https://app.pingtochat.com/) Call (dials 91xxxxxxxxxx) Copy Code: WRETTT Sample Request { "name": "marketing_ab", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations. The Go to link button helps direct users to external resources, while the Call button facilitates direct communication. The Copy Code button allows users to quickly copy promotional or discount codes for convenience.
Parameter with body , button - quick-replay This document provides detailed information about the Marketing Templates used for marketing purposes. These templates allow businesses to send customizable messages to users with dynamic placeholders, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Marketing Template AC Name: marketing_ac Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components The marketing_ac template consists of Body and Buttons components. 1. Body Component Type: BODY Text: We are intraducing {{1}} new product about {{2}} Example Usage: Example Body Text: We are introducing our new product about WhatsApp message app. Here, {{1}} is dynamically replaced with our, and {{2}} is replaced with WhatsApp message app. 2. Buttons Component Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button for opting out of promotions. Dynamic Placeholders The template includes placeholders for dynamic content: {{1}}** in Body:** Represents an introductory phrase (e.g., our, the latest). {{2}}** in Body:** Represents the product or service being introduced (e.g., WhatsApp message app). Example Message Generation Given the following placeholder values: {{1}} (Body) = our {{2}} (Body) = new chat feature The generated message will be: Body: We are introducing our new product about new chat feature. Buttons: Unsubscribe from Promos Sample Request { "name": "marketing_ac", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. Proper spelling and grammar should be maintained in the placeholders to ensure a professional message. Avoid hardcoding values and always use dynamic placeholders for flexibility. The Unsubscribe from Promos button helps provide an easy opt-out option for users, ensuring compliance with marketing regulations.
Parameter with body , button - quick-replay, visit-website This document provides detailed information about the Marketing Templates used for marketing purposes. These templates allow businesses to send customizable messages to users with dynamic placeholders, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_ad Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components The marketing_ad template consists of a Body and a Buttons component. Body: Type: BODY Text: "We are introducing {{1}} new product about {{2}}" Example: "We are introducing our new product about WhatsApp message app" Purpose: Used for marketing campaigns to introduce new products or services dynamically. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows users to opt out of future marketing messages. Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Redirects the recipient to an external site for more details or purchase options. Example Message Generation: "We are introducing our new product about WhatsApp message app" Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) Sample Request { "name": "marketing_ad", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes: This is a Marketing Template, meaning it is designed to promote and advertise new products. Dynamic placeholders ({{1}} and {{2}}) allow customization for different products and topics. Quick Reply Button enables users to opt out of promotional messages. URL Button provides direct access to the product or promotional landing page. There is no header or footer, keeping the message concise and action-oriented.
Parameter with body , button - quick-replay, visit-website, phone-number This document provides detailed information about the Marketing Templates used for marketing purposes. These templates allow businesses to send customizable messages to users with dynamic placeholders, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_ae Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components The marketing_ae template consists of a Body and Buttons component. Body: Type: BODY Text: "We are introducing {{1}} new product about {{2}}" Example: "We are introducing our new product about WhatsApp message app" Purpose: Used for marketing campaigns to introduce new products or services dynamically. Buttons: Type: BUTTONS Buttons: Quick Reply Button Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows users to opt out of promotional messages. URL Button Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Redirects the recipient to an external site for more details or purchase options. Phone Number Button Type: PHONE_NUMBER Text: "Call" Phone Number: +91xxxxxxxxxx Purpose: Allows users to directly call a support or sales representative. Example Message Generation: 📢 "We are introducing our new product about WhatsApp message app" Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) "Call" (Phone Number: +91xxxxxxxxxx) Sample Request { "name": "marketing_ae", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes: This is a Marketing Template, meaning it is designed to promote and advertise new products. Dynamic placeholders ({{1}} and {{2}}) allow customization for different products and topics. Quick Reply Button enables users to opt out of promotional messages. URL Button provides direct access to the product or promotional landing page. Phone Number Button allows users to contact support/sales directly. There is no header or footer, keeping the message concise and action-oriented.
Parameter with body , button - quick-replay, visit-website, phone-number, copy-code This document provides detailed information about the Marketing Templates used for marketing purposes. These templates allow businesses to send customizable messages to users with dynamic placeholders, enabling personalized communication. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: marketing_af Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components The marketing_af template consists of a Body and Buttons component. Body: Type: BODY Text: “We are introducing {{1}} new product about {{2}}” Example: “We are introducing our new product about WhatsApp message app” Purpose: Used for marketing campaigns to introduce new products or services dynamically. Buttons: Type: BUTTONS Buttons: Quick Reply Button Type: QUICK_REPLY Text: “Unsubscribe from Promos” Purpose: Allows users to opt out of promotional messages. URL Button Type: URL Text: “Go to link” URL: “https://app.pingtochat.com/“ Purpose: Redirects the recipient to an external site for more details or purchase options. Phone Number Button Type: PHONE_NUMBER Text: “Call” Phone Number: “+91xxxxxxxxxx” Purpose: Allows users to directly call a support or sales representative. Copy Code Button Type: COPY_CODE Example: “WRETTT” Purpose: Provides a code that users can copy for discounts or promotions. Example Message Generation: “We are introducing our new product about WhatsApp message app” Buttons: “Unsubscribe from Promos” “Go to link” (URL: “https://app.pingtochat.com/“) “Call” (Phone Number: “+91xxxxxxxxxx”) “Copy Code” (Example: “WRETTT”) Sample Request { "name": "marketing_af", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes: This is a Marketing Template, meaning it is designed to promote and advertise new products. Dynamic placeholders ({{1}} and {{2}}) allow customization for different products and topics. Quick Reply Button enables users to opt out of promotional messages. URL Button provides direct access to the product or promotional landing page. Phone Number Button allows users to contact support/sales directly. Copy Code Button is useful for sharing discount codes, promo codes, or reference codes. There is no header or footer, keeping the message concise and action-oriented.
Template with header-image body and button quick replay The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as the body text. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., Header). type (string, required): Type of component (e.g., BODY). text (string, required): The actual content of the template component. file (string, required): Request Body { "name": "marketing_attachment_one", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "header", "parameters": [ { "type": "image", "image": { "link": "https://app.pingtochat.com/template_media/1736424548.png" } } ] }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our","whatsapp message app" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later.
No parameter with header-image body and button quick replay phone number and copy code The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as body text, headers, footers, and interactive buttons. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). text (string, required for BODY and FOOTER): The actual content of the template component. format (string, required for HEADER when media is used): The format type (e.g., MEDIA). example (object, required for HEADER with media and copy_code button): Example data such as media URL or promo code. buttons (array, required for BUTTONS component): List of interactive buttons. type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER): The button label text. url (string, required for URL button): The destination link. phone_number (string, required for PHONE_NUMBER button): Contact number. example (string, required for COPY_CODE button): Example promo code. Request Body Example { "name": "markting_attachment_no_parameter", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the template name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component supports media attachments via a valid media URL. The BUTTONS component provides interactive elements such as quick replies, URLs, phone numbers, and copy codes for user engagement.
No Parameter with header-video body footer and buttons - quick-replay,visit-website,phone-number,copy-code Template Creation API Documentation The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as body text, headers, footers, and interactive buttons. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER when media is used): The format type (e.g., MEDIA). text (string, required for BODY and FOOTER): The actual content of the template component. example (object, required for HEADER with media and COPY_CODE button): Example data such as media URL or promo code. buttons (array, required for BUTTONS component): List of interactive buttons. type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER): The button label text. url (string, required for URL button): The destination link. phone_number (string, required for PHONE_NUMBER button): Contact number. example (string, required for COPY_CODE button): Example promo code. Request Body Example { "name": "markting_attachment_no_parameter_1", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://file-examples.com/storage/fe21422a6d67aa28993b797/2017/04/file_example_MP4_480_1_5MG.mp4" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "URL", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" }, { "type": "COPY_CODE", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the template name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component supports media attachments via a valid media URL. The BUTTONS component provides interactive elements such as quick replies, URLs, phone numbers, and copy codes for user engagement.
No parameter with header-pdf body footer and buttons - quick-replay,visit-website,phone-number,copy-code Template Creation API Documentation The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as body text, headers, footers, and interactive buttons. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER when media is used): The format type (e.g., MEDIA). text (string, required for BODY and FOOTER): The actual content of the template component. example (object, required for HEADER with media and COPY_CODE button): Example data such as media URL or promo code. buttons (array, required for BUTTONS component): List of interactive buttons. type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER): The button label text. url (string, required for URL button): The destination link. phone_number (string, required for PHONE_NUMBER button): Contact number. example (string, required for COPY_CODE button): Example promo code. Request Body Example { "name": "markting_attachment_no_parameter_2", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "URL", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "COPY_CODE", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the template name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component supports media attachments via a valid media URL. The BUTTONS component provides interactive elements such as quick replies, URLs, phone numbers, and copy codes for user engagement.
Parameter with header-image body footer and buttons - quick-replay,visit-website,phone-number,copy-code The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as body text, headers, footers, and interactive buttons. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). text (string, required for BODY and FOOTER): The actual content of the template component. format (string, required for HEADER when media is used): The format type (e.g., MEDIA). example (object, required for HEADER with media, BODY with placeholders, and copy_code button): Example data such as media URL, placeholder values, or promo code. buttons (array, required for BUTTONS component): List of interactive buttons. type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER): The button label text. url (string, required for URL button): The destination link. phone_number (string, required for PHONE_NUMBER button): Contact number. example (string, required for COPY_CODE button): Example promo code. Request Body Examples { "name": "marketing_parameter_attachment", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our", "whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "333137", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the template name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component supports media attachments via a valid media URL. The BODY component supports placeholders for dynamic content. The BUTTONS component provides interactive elements such as quick replies, URLs, phone numbers, and copy codes for user engagement.
Parameter with header-video body footer and buttons - quick-replay,visit-website,phone-number,copy-code The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as body text, headers, footers, and interactive buttons. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER when media is used): The format type (e.g., MEDIA). text (string, required for BODY and FOOTER): The actual content of the template component. example (object, required for HEADER with media and COPY_CODE button): Example data such as media URL or promo code. buttons (array, required for BUTTONS component): List of interactive buttons. type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER): The button label text. url (string, required for URL button): The destination link. phone_number (string, required for PHONE_NUMBER button): Contact number. example (string, required for COPY_CODE button): Example promo code. Request Body Example { "name": "marketing_parameter_attachment_1", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": https://file-examples.com/storage/fe21422a6d67aa28993b797/2017/04/file_example_MP4_480_1_5MG.mp4" } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our", "whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "URL", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "COPY_CODE", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the template name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component supports media attachments via a valid media URL. The BODY component supports parameters for dynamic content insertion. The BUTTONS component provides interactive elements such as quick replies, URLs, phone numbers, and copy codes for user engagement.
Parameter with header-pdf body footer and buttons - quick-replay,visit-website,phone-number,copy-code The Template Creation API allows users to create marketing templates that can be used for various communication purposes. Each template consists of a name, language, category, and content components, such as body text, headers, footers, and interactive buttons. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body Parameters name (string, required): Unique identifier for the template. language (string, required): Language code in ISO 639-1 format (e.g., en_US). category (string, required): Template category, such as MARKETING. allow_category_change (boolean, required): Determines if the category can be changed after creation. components (array, required): List of template components. Components Each component in the components array should have the following properties: type (string, required): Type of component (e.g., HEADER, BODY, FOOTER, BUTTONS). format (string, required for HEADER when media is used): The format type (e.g., MEDIA). text (string, required for BODY and FOOTER): The actual content of the template component. example (object, required for HEADER with media and COPY_CODE button): Example data such as media URL or promo code. buttons (array, required for BUTTONS component): List of interactive buttons. type (string, required): Type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, COPY_CODE). text (string, required for QUICK_REPLY, URL, PHONE_NUMBER): The button label text. url (string, required for URL button): The destination link. phone_number (string, required for PHONE_NUMBER button): Contact number. example (string, required for COPY_CODE button): Example promo code. Request Body Example { "name": "marketing_parameter_attachment_1", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "We are intraducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our", "whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "URL", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "COPY_CODE", "example": "WRETTT" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes Ensure that the template name is unique across all templates. The language field must follow ISO 639-1 format (e.g., en_US). The API requires an authorization token for security. If allow_category_change is set to false, the category cannot be modified later. The HEADER component supports media attachments via a valid media URL. The BODY component supports parameters for dynamic content insertion. The BUTTONS component provides interactive elements such as quick replies, URLs, phone numbers, and copy codes for user engagement.
No parameter This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template A Name: utility_a Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_a template consists of a Body component. 1. Body Component Type: BODY Text: Item no 12CR007 is confirmed! Purpose: This message serves as a confirmation notification for an item, order, or transaction. Example Message Generation The generated message will be: Body: Item no 12CR007 is confirmed! Sample Request { "name": "utility_a", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no 12CR007 is confirmed!" } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The message format is fixed and does not include dynamic placeholders, making it suitable for standard notifications.
No parameter head and body This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template F Name: utility_f Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components 1. Utility Template F Components The utility_f template consists of a Header and a Body component. Header: Type: HEADER Format: TEXT Text: Order Infermation Purpose: Provides a title for the message, indicating that it contains order-related details. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Example Message Generation Utility Template F Header: Order Infermation Body: Item no CR7000 is confirmed! Sample Request { "name": "utility_f", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Order Infermation" }, { "type": "BODY", "text": "Item no CR7000 is confirmed!" } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications.
No parameter head , body and footer This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template G Name: utility_g Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template G Components The utility_g template consists of a Header, a Body, and a Footer component. Header: Type: HEADER Format: TEXT Text: Order Infermation Purpose: Provides a title for the message, indicating that it contains order-related details. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Example Message Generation Utility Template G Header: Order Infermation Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Sample Request { "name": "utility_g", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Order Infermation" }, { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications.
No parameter header , body , footer and buttons - quick replay This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template H Name: utility_h Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template H Components The utility_h template consists of a Header, a Body, a Footer, and a Buttons component. Header: Type: HEADER Format: TEXT Text: Order Infermation Purpose: Provides a title for the message, indicating that it contains order-related details. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Provides an interactive button for the recipient to opt out of promotional messages. Example Message Generation Utility Template H Header: Order Infermation Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Button: Unsubscribe from Promos Sample Request { "name": "utility_h", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Order Infermation" }, { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The inclusion of a Quick Reply Button allows recipients to opt out of promotional content easily. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications.
No parameter header , body , footer and buttons - quick-replay visit website This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template I Name: utility_i Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template I Components The utility_i template consists of a Header, a Body, a Footer, and a Buttons component. Header: Type: HEADER Format: TEXT Text: Order Infermation Purpose: Provides a title for the message, indicating that it contains order-related details. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Provides a link for the recipient to access additional resources or actions. Example Message Generation Utility Template I Header: Order Infermation Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_i", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Order Infermation" }, { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The inclusion of Quick Reply and URL Buttons allows recipients to opt out of promotions or take further actions easily. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications.
No parameter body,footer and buttons - quick-replay This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template L Name: utility_l Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template L Components The utility_l template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages. Example Message Generation Utility Template L Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Sample Request { "name": "utility_l", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The inclusion of a Quick Reply Button allows recipients to opt out of promotions easily. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications.
No parameter body,footer and buttons - quick-replay,visit-website This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template M Name: utility_m Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template M Components The utility_m template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Provides a link for the recipient to access additional resources or actions. Example Message Generation Utility Template M Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_m", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The inclusion of Quick Reply and URL Button allows recipients to opt out of promotions or access additional resources easily. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications.
No parameter body,footer and buttons - quick-replay,visit-website,phone-number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template N Name: utility_n Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template N Components The utility_n template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Provides a link for the recipient to access additional resources or actions. Type: PHONE_NUMBER Text: Call Phone Number: 91xxxxxxxxxx Purpose: Allows the recipient to directly call a designated phone number for support or inquiries. Example Message Generation Utility Template N Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (URL: https://app.pingtochat.com/) Call (Phone: 91xxxxxxxxxx) Sample Request { "name": "utility_n", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The inclusion of Quick Reply, URL Button, and Phone Number Button allows recipients to opt out of promotions, access resources, or make direct calls conveniently. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications.
No parameter body,footer and buttons - quick-replay,visit-website This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template P Name: utility_p Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template P Components The utility_p template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Provides a link for the recipient to access additional resources or actions. Example Message Generation Utility Template P Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_p", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The inclusion of Quick Reply and URL Button allows recipients to opt out of promotions or access additional resources conveniently. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications.
No parameter body,footer and buttons - phone number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template QQQ Name: utility_qqq Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template QQQ Components The utility_qqq template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: PHONE_NUMBER Text: Call Phone Number: 91xxxxxxxxxx Purpose: Allows the recipient to initiate a call directly for further assistance. Example Message Generation Utility Template QQQ Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Buttons: Call (Phone Number: 91xxxxxxxxxx) Sample Request { "name": "utility_qqq", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The Phone Number Button allows recipients to directly contact the sender for support or inquiries. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications.
No parameter body,buttons - quick-replay This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template R Name: utility_r Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template R Components The utility_r template consists of a Body and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages quickly. Example Message Generation Utility Template R Body: Item no CR7000 is confirmed!Buttons: Unsubscribe from Promos Sample Request { "name": "utility_r", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The Quick Reply Button allows recipients to quickly opt out of promotions. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications.
No parameter body,buttons - quick-replay,visit-website This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template S Name: utility_s Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template S Components The utility_s template consists of a Body and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages quickly. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Example Message Generation Utility Template S Body: Item no CR7000 is confirmed!Buttons: Unsubscribe from Promos Go to link (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_s", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The Quick Reply Button allows recipients to quickly opt out of promotions. The URL Button provides direct access to an external link for additional actions. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications.
No parameter body,buttons - quick-replay,visit-website,phone-number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_t Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_t template consists of a Body and a Buttons component. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages quickly. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Type: PHONE_NUMBER Text: Call Phone Number: 91xxxxxxxxxx Purpose: Allows the recipient to initiate a call directly for further assistance. Example Message Generation Body: Item no CR7000 is confirmed!Buttons: Call (Phone Number: 91xxxxxxxxxx) Unsubscribe from Promos Go to link (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_t", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Quick Reply Button enables recipients to opt out of promotions. The URL Button directs users to an external link for further actions. The Phone Number Button allows recipients to initiate a call for assistance. The message format is fixed and does not include dynamic placeholders, making it suitable for standard notifications.
Parameter with header and body This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_x Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_x template consists of a Header and a Body component. Header: Type: HEADER Format: TEXT Text: Hi confirmation from {{1}}! Example: "Hi confirmation from P2C!" Purpose: Provides a personalized greeting that includes a dynamic value (e.g., company name or sender). Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Example Message Generation Header: "Hi confirmation from P2C!"Body: "Item no 12CR007 is confirmed!" Sample Request { "name": "utility_x", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Hi confirmation from {{1}}!", "example": { "header_text": [ "P2C" ] } }, { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Header is dynamic, allowing customization of the sender name or company. The Body is also dynamic, enabling personalization of item numbers for better clarity. The message format supports variable placeholders, making it adaptable for multiple use cases.
Parameter with header,body,footer This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_y Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_y template consists of a Header, a Body, and a Footer component. Header: Type: HEADER Format: TEXT Text: Hi confirmation from {{1}}! Example: "Hi confirmation from P2C!" Purpose: Provides a personalized greeting that includes a dynamic value (e.g., company name or sender). Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Footer: Type: FOOTER Text: "Thank you for choosing us!" Purpose: Adds a closing remark to appreciate the recipient. Example Message Generation Header: "Hi confirmation from P2C!"Body: "Item no 12CR007 is confirmed!"Footer: "Thank you for choosing us!" Sample Request { "name": "utility_y", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Hi confirmation from {{1}}!", "example": { "header_text": [ "P2C" ] } }, { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Header is dynamic, allowing customization of the sender name or company. The Body is also dynamic, enabling personalization of item numbers for better clarity. The Footer provides a standard thank-you message, enhancing user engagement. The message format supports variable placeholders, making it adaptable for multiple use cases.
Parameter with header,body,footer buttons - quick-replay This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_z Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_z template consists of a Header, a Body, a Footer, and a Buttons component. Header: Type: HEADER Format: TEXT Text: Hi confirmation from {{1}}! Example: "Hi confirmation from P2C!" Purpose: Provides a personalized greeting that includes a dynamic value (e.g., company name or sender). Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Footer: Type: FOOTER Text: "Thank you for choosing us!" Purpose: Adds a closing remark to appreciate the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Example Message Generation Header: "Hi confirmation from P2C!"Body: "Item no 12CR007 is confirmed!"Footer: "Thank you for choosing us!"Buttons: "Unsubscribe from Promos" Sample Request { "name": "utility_z", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Hi confirmation from {{1}}!", "example": { "header_text": [ "P2C" ] } }, { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Header and Body are dynamic, allowing personalization for a more user-specific experience. The Footer provides a thank-you message to improve customer engagement. The Quick Reply Button enables users to opt out of promotional messages easily.
Parameter with header,body,footer buttons - quick-replay,visit-website This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_aa Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_aa template consists of a Header, a Body, a Footer, and a Buttons component. Header: Type: HEADER Format: TEXT Text: Hi confirmation from {{1}}! Example: "Hi confirmation from P2C!" Purpose: Provides a personalized greeting that includes a dynamic value (e.g., company name or sender). Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Footer: Type: FOOTER Text: "Thank you for choosing us!" Purpose: Adds a closing remark to appreciate the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Example Message Generation Header: "Hi confirmation from P2C!"Body: "Item no 12CR007 is confirmed!"Footer: "Thank you for choosing us!"Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_aa", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Hi confirmation from {{1}}!", "example": { "header_text": [ "P2C" ] } }, { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Header and Body are dynamic, allowing personalization for a more user-specific experience. The Footer provides a thank-you message to improve customer engagement. The Quick Reply Button enables users to opt out of promotional messages easily. The URL Button provides direct access to an external link for additional actions.
No parameter header , body , footer and buttons - quick-replay ,visit-website,phone-number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Utility Template J Name: utility_j Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components Utility Template J Components The utility_j template consists of a Header, a Body, a Footer, and a Buttons component. Header: Type: HEADER Format: TEXT Text: Order Infermation Purpose: Provides a title for the message, indicating that it contains order-related details. Body: Type: BODY Text: Item no CR7000 is confirmed! Purpose: Serves as a confirmation notification for an item, order, or transaction. Footer: Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a closing remark to thank the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: Unsubscribe from Promos Purpose: Allows the recipient to opt out of promotional messages. Type: URL Text: Go to link URL: https://app.pingtochat.com/ Purpose: Provides a link for the recipient to access additional resources or actions. Type: PHONE_NUMBER Text: Call Phone Number: 91xxxxxxxxxx Purpose: Provides a direct call option for customer support or further assistance. Example Message Generation Utility Template J Header: Order Infermation Body: Item no CR7000 is confirmed! Footer: Thank you for choosing us! Buttons: Unsubscribe from Promos Go to link (URL: https://app.pingtochat.com/) Call (Phone: 91xxxxxxxxxx) Sample Request { "name": "utility_j", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Order Infermation" }, { "type": "BODY", "text": "Item no CR7000 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. This template is intended for utility purposes, such as order confirmations, service updates, or other transactional messages. The inclusion of Quick Reply, URL, and Phone Number Buttons allows recipients to opt out of promotions, access additional resources, or directly call for support. The message format is mostly fixed and does not include dynamic placeholders, making it suitable for standard notifications.
arameter with header,body,footer buttons - quick-replay,visit-website,phone-number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_ab Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_ab template consists of a Header, a Body, a Footer, and a Buttons component. Header: Type: HEADER Format: TEXT Text: Hi confirmation from {{1}}! Example: "Hi confirmation from P2C!" Purpose: Provides a personalized greeting that includes a dynamic value (e.g., company name or sender). Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Footer: Type: FOOTER Text: "Thank you for choosing us!" Purpose: Adds a closing remark to appreciate the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Type: PHONE_NUMBER Text: "Call" Phone Number: 91xxxxxxxxxx Purpose: Allows the recipient to initiate a call directly for further assistance. Example Message Generation Header: "Hi confirmation from P2C!"Body: "Item no 12CR007 is confirmed!"Footer: "Thank you for choosing us!"Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) "Call" (Phone Number: 91xxxxxxxxxx) Sample Request { "name": "utility_ab", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Hi confirmation from {{1}}!", "example": { "header_text": [ "P2C" ] } }, { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Header and Body are dynamic, allowing personalization for a more user-specific experience. The Footer provides a thank-you message to improve customer engagement. The Quick Reply Button enables users to opt out of promotional messages easily. The URL Button provides direct access to an external link for additional actions. The Phone Number Button allows recipients to initiate a call for further assistance.
Parameter with body,footer buttons - quick-replay This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_ac Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_ac template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Footer: Type: FOOTER Text: "Thank you for choosing us!" Purpose: Adds a closing remark to appreciate the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Example Message Generation Body: "Item no 12CR007 is confirmed!"Footer: "Thank you for choosing us!"Buttons: "Unsubscribe from Promos" Sample Request { "name": "utility_ac", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Footer provides a thank-you message to improve customer engagement. The Quick Reply Button enables users to opt out of promotional messages easily.
Parameter with body,footer buttons - quick-replay,visit-website This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_ad Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_ad template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Footer: Type: FOOTER Text: "Thank you for choosing us!" Purpose: Adds a closing remark to appreciate the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Example Message Generation Body: "Item no 12CR007 is confirmed!"Footer: "Thank you for choosing us!"Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_ad", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Footer provides a thank-you message to improve customer engagement. The Quick Reply Button enables users to opt out of promotional messages easily. The URL Button allows users to access an external link for additional actions.
Parameter with body,footer buttons - quick-replay,visit-website,phone-number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_af Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_af template consists of a Body, a Footer, and a Buttons component. Body: Type: BODY Text: Item no {{1}} is confirmed! Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Footer: Type: FOOTER Text: "Thank you for choosing us!" Purpose: Adds a closing remark to appreciate the recipient. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Type: PHONE_NUMBER Text: "Call" Phone Number: 91xxxxxxxxxx Purpose: Allows the recipient to initiate a call for further assistance. Example Message Generation Body: "Item no 12CR007 is confirmed!"Footer: "Thank you for choosing us!"Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) "Call" (Phone Number: 91xxxxxxxxxx) Sample Request { "name": "utility_af", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for utility purposes, such as order confirmations, service updates, or other transactional messages. The Footer provides a thank-you message to enhance customer experience. The Quick Reply Button enables users to opt out of promotional messages easily. The URL Button allows users to access an external link for additional actions. The Phone Number Button lets users directly call customer support for assistance.
Parameter with body buttons - quick-replay This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_aj Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_aj template consists of a Body and a Buttons component. Body: Type: BODY Text: "Item no {{1}} is confirmed!" Example: "Item no 12CR007 is confirmed!" Purpose: Serves as a confirmation notification for an item, order, or transaction with a dynamic item number. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Example Message Generation Body: "Item no 12CR007 is confirmed!"Buttons: "Unsubscribe from Promos" Sample Request { "name": "utility_aj", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for transactional confirmation messages with a simple opt-out feature. The Quick Reply Button enables users to opt out of promotional messages easily. There is no Footer or Header in this template, keeping it minimal and focused.
Parameter with body buttons - quick-replay,visit-website This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_ak Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_ak template consists of a Body and a Buttons component. Body: Type: BODY Text: "Item no {{1}} is confirmed!" Example: "Item no 12CR007 is confirmed!" Purpose: Provides a confirmation message for an item, order, or transaction with a dynamic item number. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Example Message Generation Body: "Item no 12CR007 is confirmed!"Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) Sample Request { "name": "utility_ak", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for transactional confirmation messages with options for opting out of promotions and redirecting users to an external link. The Quick Reply Button enables users to opt out of promotional messages easily. The URL Button provides direct access to an external link for additional actions. There is no Footer or Header, keeping the template minimal and functional.
Parameter with body buttons - quick-replay,visit-website,phone-number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_al Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_al template consists of a Body and a Buttons component. Body: Type: BODY Text: "Item no {{1}} is confirmed!" Example: "Item no 12CR007 is confirmed!" Purpose: Provides a confirmation message for an item, order, or transaction with a dynamic item number. Buttons: Type: BUTTONS Buttons: Type: QUICK_REPLY Text: "Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. Type: URL Text: "Go to link" URL: https://app.pingtochat.com/ Purpose: Directs the recipient to an external link for further actions. Type: PHONE_NUMBER Text: "Call" Phone Number: 91xxxxxxxxxx Purpose: Allows the recipient to initiate a call directly for further assistance. Example Message Generation Body: "Item no 12CR007 is confirmed!"Buttons: "Unsubscribe from Promos" "Go to link" (URL: https://app.pingtochat.com/) "Call" (Phone Number: 91xxxxxxxxxx) Sample Request { "name": "utility_al", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [ [ "12CR007" ] ] } }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for transactional confirmation messages with options for opting out of promotions, redirecting users to an external link, and calling a support number. The Quick Reply Button enables users to opt out of promotional messages easily. The URL Button provides direct access to an external link for additional actions. The Phone Number Button allows recipients to call customer support instantly. There is no Footer or Header, keeping the template minimal and functional.
No parameter with header-image and body and button quick-replay,visit-website, phone number The utility_attachment_no_parameter template is a Utility Template designed for transactional or informational messaging. This template includes an image attachment, a confirmation message, and interactive buttons to engage users. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Details Name: utility_attachment_no_parameter Language: en_US (English – United States) Category: UTILITY Allow Category Change: true Components Header Type: HEADER Format: MEDIA Example Media URL: https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png Body Type: BODY Text: Item no 12CR007 is confirmed! Footer Type: FOOTER Text: Thank you for choosing us! Buttons Type: BUTTONS Buttons: Quick Reply: Unsubscribe from Promos URL Button: Text: Go to link URL: https://app.pingtochat.com/ Phone Number Button: Text: Call Phone Number: +91xxxxxxxxxx Example Request { "name": "utility_attachment_no_parameter", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" } }, { "type": "BODY", "text": "Item no 12CR007 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response { "id": "xxxxxx", "status": "APPROVED", "category": "UTILITY" } Notes This template is intended for transactional confirmations. The Quick Reply button allows users to opt out of promotional messages. The URL button directs users to an external website for further actions. The Phone Number button lets users call support directly. The image attachment enhances engagement by providing a visual confirmation.
No parameter with header-pdf and body and button quick-replay,visit-website, phone number The Utility Attachment (No Parameter) Template allows businesses to send structured messages containing a PDF attachment for transactional or informational purposes. This template ensures clear communication with users regarding confirmed items or transactions. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_attachment_no_parameter Language: en_US (English – United States) Category: UTILITY Allow Category Change: true Components Header Type: HEADER Format: MEDIA Example: { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } Purpose: Attaches a PDF file to provide relevant documents or receipts. Body Type: BODY Text: Item no 12CR007 is confirmed! Purpose: Notifies the user about a confirmed transaction or order. Footer Type: FOOTER Text: Thank you for choosing us! Purpose: Provides a courteous closing statement. Buttons Type: BUTTONS Buttons: Quick Reply Text: Unsubscribe from Promos Purpose: Allows users to opt-out of promotional messages. URL Button Text: Go to link URL: https://app.pingtochat.com/ Purpose: Directs users to an external link for more details. Phone Number Button Text: Call Phone Number: +91xxxxxxxxxx Purpose: Enables users to directly call customer support. Sample API Request { "name": "utility_attachment_no_parameter", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "Item no 12CR007 is confirmed!" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response { "id": "xxxxxx", "status": "APPROVED", "category": "UTILITY" } Notes The template is designed for sending confirmation messages with an attached PDF document. The allow_category_change flag is set to true, enabling flexibility in category selection. The Quick Reply button helps users opt out of promotional messages. The URL button allows users to access additional details via an external link. The Phone Number button provides quick access to customer support.
No parameter with header-video and body and button quick-replay,visit-website, phone number This document provides detailed information about the Utility Templates used for communication purposes. These templates allow businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_attachment_no_parameter Language: en_US (English – United States) Category: UTILITY Allow Category Change: Yes Components The utility_attachment_no_parameter template consists of a Header, Body, and Buttons component. Header: Type: HEADER Format: MEDIA Example Media URL: https://urwallet.pingtochat.com/template_media/1740161305.mp4 Purpose: Provides a media attachment such as a video to enhance the message. Body: Type: BODY Text: "Item no 12CR007 is confirmed!" Purpose: Provides a confirmation message for an item, order, or transaction. Buttons: Type: BUTTONS Buttons List: Quick Reply:"Unsubscribe from Promos" Purpose: Allows the recipient to quickly opt out of promotional messages. URL Button:"Go to link" → Pingtochat Purpose: Directs the recipient to an external link for further actions. Phone Number Button:"Call" → +91xxxxxxxxxx Purpose: Allows the recipient to initiate a call directly for further assistance. Buttons: “Unsubscribe from Promos” “Go to link” (URL: https://app.pingtochat.com/) “Call” (Phone Number: +91xxxxxxxxxx) Sample Request { "name": "utility_attachment_no_parameter", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://pingtochat.com/template_media/1740161305.mp4" } }, { "type": "BODY", "text": "Item no 12CR007 is confirmed!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 CREATED { "id": "xxxxxx", "status": "APPROVED", "category": "UTILITY" } Notes The template allows changes to the category since allow_category_change is set to true. It is designed for transactional confirmation messages with options for: Opting out of promotions Redirecting users to an external link Calling a support number The Quick Reply Button enables users to opt out of promotional messages easily. The URL Button provides direct access to an external link for additional actions. The Phone Number Button allows recipients to call customer support instantly. The Header includes a video attachment, making it a rich media template.
Parameter with header-video and body and button quick-replay,visit-website, phone number This document provides detailed information about the Utility Parameter Attachment template, which is used for marketing communications that include media attachments and dynamic parameters. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_parameter_attachment Language: en_US (English – United States) Category: MARKETING Allow Category Change: true Components Header Type: HEADER Format: MEDIA Example Media URL: Google Logo Purpose: Displays an image attachment in the message. Body Type: BODY Text: We are introducing {{1}} new product about {{2}} Example: our whatsapp message app Purpose: Provides dynamic placeholders to introduce a new product. Footer Type: FOOTER Text: Thank you for choosing us! Purpose: Adds a closing remark to the message. Buttons Type: BUTTONS Buttons: Quick Reply Text: Unsubscribe from Promos Purpose: Allows users to opt out of marketing messages. URL Button Text: Go to link URL: PingToChat Purpose: Redirects users to an external link. Phone Number Button Text: Call Phone Number: +91xxxxxxxxxx Purpose: Allows users to initiate a call for inquiries. Example Request { "name": "utility_parameter_attachment", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" } }, { "type": "BODY", "text": "We are introducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our", "whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response Status Code: 201 APPROVED Example Response: { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes This template is designed for marketing communications involving product introductions. The Body section allows dynamic placeholders for product customization. The Quick Reply button lets users opt out of future promotional messages. The URL Button provides a direct link to additional information or a product page. The Phone Number Button facilitates instant customer support.
Parameter with header-pdf and body and button quick-replay,visit-website, phone number This document provides detailed information about the Utility Template with Parameter used for communication purposes. This template allows businesses to send structured messages to users for transactional or informational purposes. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_parameter_attachment Language: en_US (English – United States) Category: MARKETING Allow Category Change: Yes Components The utility_parameter_attachment template consists of the following components: 1. Header Type: HEADER Format: MEDIA Example: jsonCopyEdit{ "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } Purpose: Displays a media file (in this case, a PDF file). 2. Body Type: BODY Text: “We are introducing {{1}} new product about {{2}}” Purpose: This component allows dynamic insertion of values through parameters ({{1}} and {{2}}), which will be replaced with actual data at runtime. Example: jsonCopyEdit{ "body_text": [ [ "our", "whatsapp message app" ] ] } 3. Footer Type: FOOTER Text: “Thank you for choosing us!” Purpose: Displays a closing message at the bottom of the template. 4. Buttons Type: BUTTONS Buttons: Type: QUICK_REPLY Text: “Unsubscribe from Promos” Purpose: A quick reply button to allow the recipient to opt out of promotions. Type: URL Text: “Go to link” URL: “https://app.pingtochat.com/“ Purpose: Provides a clickable link to direct the user to a URL. Type: PHONE_NUMBER Text: “Call” Phone Number: “91xxxxxxxxxx” Purpose: Initiates a call to the given phone number. Sample Request { "name": "utility_parameter_attachment", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "We are introducing {{1}} new product about {{2}}", "example": { "body_text": [ [ "our", "whatsapp message app" ] ] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" } ] } ] } Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Notes The template allows changes to the category, as allow_category_change is set to true. The template is designed for marketing messages, introducing new products and providing a call-to-action with multiple buttons for user interaction (Unsubscribe, Go to Link, and Call). The Quick Reply Button allows recipients to easily opt out of promotional messages. The URL Button redirects users to an external link. The Phone Number Button enables direct calling to customer support.
Parameter with header-image and body and button quick-replay,visit-website, phone number The Utility Attachment (Parameter) Template is designed for sending structured messages with media attachments. This template allows businesses to send confirmation messages with dynamic item numbers, along with interactive buttons for user actions. Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Template Information Name: utility_attachment_no_parameter Language: en_US Category: UTILITY Allow Category Change: true Components: Header: Type: HEADER Format: MEDIA Example Media URL: https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png Body: Type: BODY Text: Item no {{1}} is confirmed! Example: { "body_text": [["12CR007"]] } Footer: Type: FOOTER Text: Thank you for choosing us! Buttons: Type: BUTTONS Buttons: Quick Reply: { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } URL Button: { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" } Phone Number Button: { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" } Example API Request { "name": "utility_attachment_parameter", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" } }, { "type": "BODY", "text": "Item no {{1}} is confirmed!", "example": { "body_text": [["12CR007"]] } }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Success Response { "id": "xxxxxx", "status": "APPROVED", "category": "UTILITY" } Notes This template is designed for transactional confirmation messages. The Quick Reply Button allows users to opt out of promotional messages easily. The URL Button provides direct access to an external link for additional actions. The Phone Number Button allows recipients to call customer support instantly. Since allow_category_change is true, the template can be used for multiple categories as needed.
Parameter with header body without static button url and quick-replay Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_z", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Parameters name (string, required) – Unique identifier for the template (e.g., “edit_s”). language (string, required) – Language code for the template (e.g., “en_US”). category (string, required) – Category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Whether the category can be changed (true/false). components (array, required) – List of structural components of the template. Components Breakdown HEADER type (string, required) – “HEADER” format (string, required) – “TEXT” text (string, required) – “Our summer sale is on!” BODY type (string, required) – “BODY” text (string, required) – “Shop now and use code CR7000 to get more offers” FOOTER type (string, required) – “FOOTER” text (string, required) – “Thank you for choosing us!” BUTTONS type (string, required) – “BUTTONS” buttons (array, required) – Contains interactive buttons. QUICK_REPLY type (string, required) – “QUICK_REPLY” text (string, required) – “Unsubscribe from Promos” URL Button type (string, required) – “url” text (string, required) – “Go to link” url (string, required) – “https://app.pingtochat.com“ Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Winter Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "45OFF", "35%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your Urwallet subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Components Breakdown HEADER text: “Our pingtochat {{1}} is on!” example: “Winter Sale” BODY text: “Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.” example: “the end of August”, “45OFF”, “35%” FOOTER text: “Use the buttons below to manage your Urwallet subscriptions” BUTTONS Quick Reply Button text: “Unsubscribe Urwallet” URL Button text: “Go to link” url: “https://app.pingtochat.com“ Response { "success": true, "id": "xxxxxx", "name": "edit_z", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
Parameter with header body without static button url and quick-replay, phone-number Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_aa", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Parameters name (string, required) – Unique identifier for the template (e.g., “edit_aa”). language (string, required) – Language code for the template (e.g., “en_US”). category (string, required) – Category of the template (e.g., “UTILITY”). allow_category_change (boolean, optional) – Whether the category can be changed (true/false). components (array, required) – List of structural components of the template. Components Breakdown HEADER type (string, required) – “HEADER” format (string, required) – “TEXT” text (string, required) – “Our pingtochat {{1}} is on!” BODY type (string, required) – “BODY” text (string, required) – “Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.” FOOTER type (string, required) – “FOOTER” text (string, required) – “Use the buttons below to manage your marketing subscriptions” BUTTONS type (string, required) – “BUTTONS” buttons (array, required) – Contains interactive buttons. QUICK_REPLY type (string, required) – “QUICK_REPLY” text (string, required) – “Unsubscribe from Promos” PHONE_NUMBER Button type (string, required) – “PHONE_NUMBER” text (string, required) – “Call” phone_number (string, required) – “91xxxxxxxxxx” Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Winter Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "45OFF", "35%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your Urwallet subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Components Breakdown HEADER – Text: “Our summer sale is on in Urwallet!” BODY – Text: “We are introducing our new product in Urwallet!” FOOTER – Text: “Thank you for choosing Urwallet!” BUTTONS Quick Reply Button – “Unsubscribe Urwallet!” URL Button – “Go to link” (Dynamic URL support with example values) Phone Number Button – “Call” (Calls a specified phone number) Response { "success": true, "id": "xxxxxx", "name": "edit_s", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
Parameter with header body without static button url and quick-replay, phone-number and copy-code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_ab", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Components Header Text: "Our pingtochat {{1}} is on!" Example: "Summer Sale" Body Text: "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise." Example: {{1}}: "the end of August" {{2}}: "25OFF" {{3}}: "25%" Footer Text: "Use the buttons below to manage your marketing subscriptions" Buttons Quick Reply Button Text: "Unsubscribe from Promos" Phone Number Button Text: "Call" Phone Number: "919526986676" Copy Code Button Example Code: "WRETTT" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Winter Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "45OFF", "35%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your Urwallet subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Components Breakdown HEADER – Text: “Our summer sale is on in Urwallet!” BODY – Text: “We are introducing our new product in Urwallet!” FOOTER – Text: “Thank you for choosing Urwallet!” BUTTONS Quick Reply Button – “Unsubscribe Urwallet!” URL Button – “Go to link” (Dynamic URL support with example values) Phone Number Button – “Call” (Calls a specified phone number) Copy Code Button – Provides a predefined code for easy copying Response { "success": true, "id": "xxxxxx", "name": "edit_ab", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
Parameter with header body dynamic button url to static url Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_ac", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" } ] } Parameters Name: edit_ac Language: en_US Category: UTILITY Allow Category Change: true Components Header Text: "Our pingtochat {{1}} is on!" Example: "Summer Sale" Body Text: "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise." Example: {{1}}: "the end of August" {{2}}: "25OFF" {{3}}: "25%" Footer Text: "Use the buttons below to manage your marketing subscriptions" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Winter Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "45OFF", "35%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your Urwallet subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] } ] } ] } Component Header Example: "Winter Sale" Body Example: {{1}}: "the end of August" {{2}}: "45OFF" {{3}}: "35%" Footer Text: "Use the buttons below to manage your Urwallet subscriptions" Buttons URL Button Text: "Go to link" URL: "https://developers.pingtochat.com/{{1}}" Example: "?docs=pingtochat/wp" Response { "success": true, "id": "xxxxxx", "name": "edit_s", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
Parameter with header body without dynamic button url to static url and quick-replay Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_ad", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Components Header Text: "Our pingtochat {{1}} is on!" Example: "Summer Sale" Body Text: "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise." Example: {{1}}: "the end of August" {{2}}: "25OFF" {{3}}: "25%" Footer Text: "Use the buttons below to manage your marketing subscriptions" Buttons Quick Reply: "Unsubscribe from Promos" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Winter Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "45OFF", "35%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your Urwallet subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] } ] } ] } Components Breakdown Header Example: "Winter Sale" Body Example: {{1}}: "the end of August" {{2}}: "45OFF" {{3}}: "35%" Footer Text: "Use the buttons below to manage your Urwallet subscriptions" Buttons Quick Reply: "Unsubscribe from Promos" URL Button Text: "Go to link" URL: "https://developers.pingtochat.com/{{1}}" Example: "?docs=pingtochat/wp" Response { "success": true, "id": "xxxxxx", "name": "edit_ad", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
Parameter with header body without dynamic button url to static url and quick-replay,phone-number Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_ae", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Components Header Text: "Our pingtochat {{1}} is on!" Example: "Summer Sale" Body Text: "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise." Example: {{1}}: "the end of August" {{2}}: "25OFF" {{3}}: "25%" Footer Text: "Use the buttons below to manage your marketing subscriptions" Buttons Quick Reply: "Unsubscribe from Promos" Phone Number: "Call" (Number: 91xxxxxxxxxx) Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Winter Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "45OFF", "35%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your Urwallet subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Components Breakdown Header Example: "Winter Sale" Body Example: {{1}}: "the end of August" {{2}}: "45OFF" {{3}}: "35%" Footer Text: "Use the buttons below to manage your Urwallet subscriptions" Buttons Quick Reply: "Unsubscribe from Promos" URL Button Text: "Go to link" URL: "https://developers.pingtochat.com/{{1}}" Example: "?docs=pingtochat/wp" Phone Number: "Call" (Number: 91xxxxxxxxxx) Response { "success": true, "id": "xxxxxx", "name": "edit_ae", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
Parameter wit header body without dynamic button url to static url and quick-replay,phone-number and copy-code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_af", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Components Header Text: "Our pingtochat {{1}} is on!" Example: "Summer Sale" Body Text: "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise." Example: {{1}}: "the end of August" {{2}}: "25OFF" {{3}}: "25%" Footer Text: "Use the buttons below to manage your marketing subscriptions" Buttons Quick Reply: "Unsubscribe from Promos" Phone Number: "Call" (Number: 919526986676) Copy Code: "WRETTT" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Winter Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "45OFF", "35%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your Urwallet subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Components Header Text: "Our pingtochat {{1}} is on!" Example: "Summer Sale" Body Text: "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise." Example: {{1}}: "the end of August" {{2}}: "25OFF" {{3}}: "25%" Footer Text: "Use the buttons below to manage your marketing subscriptions" Buttons URL Button: Text: "Go to link" URL: "https://app.pingtochat.com" Response { "success": true, "id": "xxxxxx", "name": "edit_af", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
header-text to pdf Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_text_to_pdf", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: TEXT Text: "Our summer sale is on!" Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: MEDIA Format: PDF Example URL: https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "edit_s", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
header-text to image Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_text_to_img", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: TEXT Text: "Our summer sale is on!" Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png" } }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: MEDIA Format: Image Example URL: https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_text_to_img", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
header-text to video Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_text_to_video", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: TEXT Text: "Our summer sale is on!" Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://urwallet.pingtochat.com/template_media/1740161305.mp4" } }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: MEDIA Format: VIDEO Example URL: https://urwallet.pingtochat.com/template_media/1740161305.mp4 Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_text_to_video", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
header-pdf to text Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_pdf_to_text", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: MEDIA Format: PDF Example URL: https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: TEXT Text: "Our summer sale is on!" Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_pdf_to_text", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
header-image to text Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_image_to_text", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: MEDIA Format: IMAGE Example URL: https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: TEXT Text: "Our summer sale is on!" Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_image_to_text", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
header-video to text Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_video_to_text", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://urwallet.pingtochat.com/template_media/1740161305.mp4" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: MEDIA Format: VIDEO Example URL: https://urwallet.pingtochat.com/template_media/1740161305.mp4 Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: TEXT Text: "Our summer sale is on!" Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_video_to_text", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
header-pdf to image Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_pdf_to_image", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: MEDIA Format: PDF Example URL: https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png" } }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: MEDIA Format: IMAGE Example URL: https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_pdf_to_image", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
header-image to pdf Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_image_to_pdf", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: MEDIA Format: IMAGE Example URL: https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" } }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: MEDIA Format: PDF Example URL: https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_image_to_pdf", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
header-image to video Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "header_image_to_video_mar3", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png" } }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Components Header Type: MEDIA Format: IMAGE Example URL: https://file-examples.com/wp-content/storage/2017/10/file_example_PNG_500kB.png Body Text: "Shop now and use code CR7000 to get more offer" Footer Text: "Thank you for choosing us!" Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "MEDIA", "example": { "media_url": "https://urwallet.pingtochat.com/template_media/1740161305.mp4" } }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Components Header Type: MEDIA Format: VIDEO Example URL: https://urwallet.pingtochat.com/template_media/1740161305.mp4 Body Text: "We are introducing our new product in Urwallet!" Footer Text: "Thank you for choosing Urwallet!" Response { "success": true, "id": "xxxxxx", "name": "header_image_to_video", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
No parameter with body Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_b", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "BODY", "text": "We are introducing our new product!" } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components(array, required) – List of components in the template. type (string, required) – Type of component (e.g., “BODY”). text (string, required) – The actual text content of the template. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "BODY", "text": "We are introducing our new product in Urwallet!" } ] } Parameters template_id (string, required) – The ID of the template to be updated. components(array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “BODY”). text (string, required) – The updated text content of the template. Response { "success": true, "id": "xxxxxx", "name": "edit_b", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
No parameter with header-text and body Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_c", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components(array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required) – The actual text content of the template. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" } ] } Parameters template_id (string, required) – The ID of the template to be updated. components(array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required) – The updated text content of the template. Response { "success": true, "id": "xxxxxx", "name": "edit_c", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
No parameter with header-text and body and footer Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_d", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components(array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required) – The actual text content of the template. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" } ] } Parameters template_id (string, required) – The ID of the template to be updated. components(array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required) – The updated text content of the template. Response { "success": true, "id": "xxxxxx", "name": "edit_b", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
No parameter with header-text and body and footer button quick-replay Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_ee", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components(array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required for HEADER, BODY, FOOTER) – The actual text content of the component. buttons(array, optional) – List of buttons in the BUTTONS component. type (string, required) – Type of button (e.g., “QUICK_REPLY”). text (string, required) – The button label. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe" } ] } ] } Parameters template_id (string, required) – The ID of the template to be updated. components(array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required for HEADER, BODY, FOOTER) – The updated text content of the component. buttons(array, optional) – Updated list of buttons in the BUTTONS component. type (string, required) – Type of button (e.g., “QUICK_REPLY”). text (string, required) – The button label. Response { "success": true, "id": "xxxxxx", "name": "edit_b", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
No parameter with header-text and body and footer button quick-replay and visit-website Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_f", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://urwallet.pingtochat.com" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components(array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required for HEADER, BODY, FOOTER) – The actual text content of the component. buttons(array, optional) – List of buttons in the BUTTONS component. type (string, required) – Type of button (e.g., “QUICK_REPLY”, “url”). text (string, required) – The button label. url (string, required for url button) – The link to redirect users. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe promo" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Parameters template_id (string, required) – The ID of the template to be updated. components(array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required for HEADER, BODY, FOOTER) – The updated text content of the component. buttons(array, optional) – Updated list of buttons in the BUTTONS component. type (string, required) – Type of button (e.g., “QUICK_REPLY”, “url”). text (string, required) – The button label. url (string, required for url button) – The link to redirect users. Response { "success": true, "id": "xxxxxx", "name": "edit_b", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
No parameter with header-text and body and footer button quick-replay and visit-website and phone-number Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_g", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://urwallet.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components(array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required for HEADER, BODY, FOOTER) – The actual text content of the component. buttons(array, optional) – List of buttons in the BUTTONS component. type (string, required) – Type of button (e.g., “QUICK_REPLY”, “url”, “PHONE_NUMBER”). text (string, required) – The button label. url (string, required for url button) – The link to redirect users. phone_number (string, required for PHONE_NUMBER button) – The phone number for calling action. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe promo" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "911234567890" } ] } ] } Parameters template_id (string, required) – The ID of the template to be updated. components(array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format type for the HEADER component (e.g., “TEXT”). text (string, required for HEADER, BODY, FOOTER) – The updated text content of the component. buttons(array, optional) – Updated list of buttons in the BUTTONS component. type (string, required) – Type of button (e.g., “QUICK_REPLY”, “url”, “PHONE_NUMBER”, “copy_code”). text (string, required) – The button label. url (string, required for url button) – The link to redirect users. phone_number (string, required for PHONE_NUMBER button) – The phone number for calling action. example (string, required for copy_code button) – Example code for the copy action. Response { "success": true, "id": "xxxxxx", "name": "edit_b", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
No parameter with header-text and body and footer button quick-replay,visit-website, phone-number and copy-code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_h", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com/" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). text (string, required) – The actual text content of the template. buttons (array, optional) – List of buttons in the template. url (string, optional) – URL for “url” type buttons. phone_number (string, optional) – Phone number for “PHONE_NUMBER” type buttons. example (string, optional) – Example code for “copy_code” type buttons. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe promo" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "911234567890" }, { "type": "copy_code", "example": "ABCD" } ] } ] } Parameters template_id (string, required) – The ID of the template to be updated. components (array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). text (string, required) – The updated text content of the template. buttons (array, optional) – Updated list of buttons in the template. url (string, optional) – Updated URL for “url” type buttons. phone_number (string, optional) – Updated phone number for “PHONE_NUMBER” type buttons. example (string, optional) – Updated example code for “copy_code” type buttons. Response { "success": true, "id": "xxxxxx", "name": "edit_b", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
No parameter with header-text and body and footer static without url button Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_i", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”). format (string, optional) – Format of the component, required for “HEADER” type. text (string, required) – The actual text content of the template. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type":"BUTTONS", "buttons": [ { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Parameters template_id (string, required) – The ID of the template to be updated. components (array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format of the component, required for “HEADER” type. text (string, required) – The updated text content of the template. buttons (array, optional) – List of buttons for “BUTTONS” type. type (string, required) – Type of button (e.g., “url”). text (string, required) – Button label. url (string, optional) – URL for “url” type buttons. Response { "success": true, "id": "xxxxxx", "name": "edit_b", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
No parameter with header-text and body and footer static without url button and with quick-replay Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_j", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “BODY”). text (string, required) – The actual text content of the template. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Parameters template_id (string, required) – The ID of the template to be updated. components (array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “BODY”). text (string, required) – The updated text content of the template. Response { "success": true, "id": "xxxxxx", "name": "edit_j", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
No parameter with header-text and body and footer static without url button and with quick-replay,phone-number Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_k", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Parameters name (string, required): The name of the template. language (string, required): Language code of the template (e.g., “en_US”). category (string, required): The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional): Determines whether the category can be changed. components (array, required): List of components in the template. type (string, required): Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional): Format of the header (e.g., “TEXT”). text (string, required): The actual text content of the template. buttons (array, optional): List of buttons if applicable. type (string, required): Type of button (e.g., “QUICK_REPLY”, “PHONE_NUMBER”). text (string, required): Button text. phone_number (string, optional): Phone number for “PHONE_NUMBER” button type. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxxx" } ] } ] } Parameters template_id (string, required): The ID of the template to be updated. components (array, required): Updated list of components in the template. type (string, required): Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional): Format of the header (e.g., “TEXT”). text (string, required): The updated text content of the template. buttons (array, optional): Updated list of buttons if applicable. type (string, required): Type of button (e.g., “QUICK_REPLY”, “PHONE_NUMBER”, “url”). text (string, required): Button text. url (string, optional): URL for “url” button type. phone_number (string, optional): Phone number for “PHONE_NUMBER” button type. Response { "success": true, "id": "xxxxxx", "name": "edit_k", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
No parameter with header-text and body and footer static without url button and with quick-replay,phone-number,copy-code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_l", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format of the component if applicable (e.g., “TEXT”). text (string, required) – The actual text content of the template. buttons (array, optional) – List of buttons included in the template. type (string, required) – Type of button (e.g., “QUICK_REPLY”, “PHONE_NUMBER”, “copy_code”). text (string, required) – The display text of the button. phone_number (string, optional) – The phone number associated with a “PHONE_NUMBER” button. example (string, optional) – Example code for “copy_code” button Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "abcd" } ] } ] } Parameters template_id (string, required) – The ID of the template to be updated. components (array, required) – Updated list of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format of the component if applicable (e.g., “TEXT”). text (string, required) – The updated text content of the template. buttons (array, optional) – List of updated buttons. type (string, required) – Type of button (e.g., “QUICK_REPLY”, “url”, “PHONE_NUMBER”, “copy_code”). text (string, required) – The display text of the button. url (string, optional) – The URL associated with a “url” button. phone_number (string, optional) – The phone number for a “PHONE_NUMBER” button. example (string, optional) – Example code for “copy_code” button. Response { "success": true, "id": "xxxxxx", "name": "edit_l", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
No parameter with header-text and body and footer dynamic without url button Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_n", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" } ] } ] } Parameters HEADER: “Our summer sale is on!” BODY: “Shop now and use code CR7000 to get more offers” FOOTER: “Thank you for choosing us!” BUTTONS: Quick Reply: “Unsubscribe from Promos” Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] } ] } ] } Parameters HEADER: “Our summer sale is on in Urwallet!” BODY: “We are introducing our new product in Urwallet!” FOOTER: “Thank you for choosing Urwallet!” BUTTONS: Quick Reply: “Unsubscribe Urwallet” URL Button: “Go to link” (redirects to https://developers.pingtochat.com/{{1}} with example parameter ?docs=pingtochat/wp) Response { "success": true, "id": "xxxxxx", "name": "edit_n", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
No parameter with header-text and body and footer edit without url button and with quick-replay,phone-number Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_o", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Parameters HEADER: “Our summer sale is on!” BODY: “Shop now and use code CR7000 to get more offers” FOOTER: “Thank you for choosing us!” BUTTONS: Quick Reply: “Unsubscribe from Promos” Phone Call Button: “Call” (Dialing 91xxxxxxxxxx) Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “BODY”). text (string, required) – The actual text content of the template. buttons (array, optional) – List of interactive buttons. type (string, required) – Type of button (e.g., “QUICK_REPLY”, “PHONE_NUMBER”). text (string, required) – Button label text. phone_number (string, optional) – Required if button type is “PHONE_NUMBER” (e.g., “91xxxxxxxxxx”). Response { "success": true, "id": "xxxxxx", "name": "edit_o", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
No parameter with header-text and body and footer dynamic without url button and with quick-replay,phone-number,copy-code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_p", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “BODY”). text (string, required) – The actual text content of the template. buttons (array, optional) – List of interactive buttons. QUICK_REPLY (string, optional) – Quick reply button text. PHONE_NUMBER (string, optional) – Phone number button, including text (label) and phone_number (number to call). copy_code (string, optional) – Provides an example code that users can copy. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "abcd" } ] } ] } Parameters HEADER (object, required) – The header component, including: format (string, required) – Format of the header (e.g., “TEXT”). text (string, required) – Header content. BODY (object, required) – The body content. text (string, required) – The actual text content of the body. FOOTER (object, required) – The footer component. text (string, required) – Footer content. BUTTONS (array, required) – List of buttons in the template. QUICK_REPLY (string, optional) – Quick reply button text. url (object, optional) – A button that redirects users to a link. text (string, required) – The button label. url (string, required) – The URL for the button. example (array, optional) – Example URL parameters. PHONE_NUMBER (object, optional) – Phone button details. text (string, required) – The button label. phone_number (string, required) – The phone number. copy_code (object, optional) – Provides a code that users can copy. example (string, required) – Example code value. Response { "success": true, "id": "xxxxxx", "name": "edit_p", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
No parameter with header-text and body and footer static with url button Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_q", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offer" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type":"BUTTONS", "buttons": [ { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Parameters name (string, required) – The name of the template. language (string, required) – Language code of the template (e.g., “en_US”). category (string, required) – The category of the template (e.g., “MARKETING”). allow_category_change (boolean, optional) – Determines whether the category can be changed. components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format of the header text (e.g., “TEXT”). text (string, required) – The actual text content of the component. buttons (array, required) – List of buttons used in the template. type (string, required) – Type of button (e.g., “url”). text (string, required) – Text displayed on the button. url (string, required for “url” buttons) – URL linked to the button. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type":"BUTTONS", "buttons": [ { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] } ] } ] } Parameters components (array, required) – List of components in the template. type (string, required) – Type of component (e.g., “HEADER”, “BODY”, “FOOTER”, “BUTTONS”). format (string, optional) – Format of the header text (e.g., “TEXT”). text (string, required) – The actual text content of the component. buttons (array, required) – List of buttons used in the template. type (string, required) – Type of button (e.g., “url”). text (string, required) – Text displayed on the button. url (string, required for “url” buttons) – URL linked to the button. example (array, optional) – Example query parameters that can be appended to the URL. Response { "success": true, "id": "xxxxxx", "name": "edit_q", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
No parameter with header-text and body and footer static with url button and with quick-replay Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_r", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Parameters name (string, required) – The unique name identifier for the template (“edit_r”). language (string, required) – The language code for the template (“en_US”). category (string, required) – The category of the template (“MARKETING”). allow_category_change (boolean, optional) – Whether the category can be changed (true). components (array, required) – The structural components of the template. Components Details HEADER type (string, required) – “HEADER” format (string, required) – “TEXT” text (string, required) – “Our summer sale is on!” BODY type (string, required) – “BODY” text (string, required) – “Shop now and use code CR7000 to get more offers” FOOTER type (string, required) – “FOOTER” text (string, required) – “Thank you for choosing us!” BUTTONS type (string, required) – “BUTTONS” buttons (array, required) – Contains interactive buttons. QUICK_REPLY type (string, required) – “QUICK_REPLY” text (string, required) – “Unsubscribe from Promos” URL Button type (string, required) – “url” text (string, required) – “Go to link” url (string, required) – “https://app.pingtochat.com“ Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet!" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] } ] } ] } Parameters name (string, required) – The unique name identifier for the template (“edit_r”). language (string, required) – The language code for the template (“en_US”). category (string, required) – The category of the template (“MARKETING”). allow_category_change (boolean, optional) – Whether the category can be changed (true). components (array, required) – The structural components of the template. Components Details HEADER type (string, required) – “HEADER” format (string, required) – “TEXT” text (string, required) – “Our summer sale is on!” BODY type (string, required) – “BODY” text (string, required) – “Shop now and use code CR7000 to get more offers” FOOTER type (string, required) – “FOOTER” text (string, required) – “Thank you for choosing us!” BUTTONS type (string, required) – “BUTTONS” buttons (array, required) – Contains interactive buttons. QUICK_REPLY type (string, required) – “QUICK_REPLY” text (string, required) – “Unsubscribe from Promos” URL Button type (string, required) – “url” text (string, required) – “Go to link” url (string, required) – “https://app.pingtochat.com“ Response { "success": true, "id": "xxxxxx", "name": "edit_r", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
No parameter with header-text and body and footer static with url button and with quick-replay,phone-number Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_s", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" } ] } ] } Parameters name (string, required) – The unique name identifier for the template (“edit_s”). language (string, required) – The language code for the template (“en_US”). category (string, required) – The category of the template (“MARKETING”). allow_category_change (boolean, optional) – Whether the category can be changed (true). components (array, required) – The structural components of the template. Components Breakdown HEADER type (string, required) – “HEADER” format (string, required) – “TEXT” text (string, required) – “Our summer sale is on!” BODY type (string, required) – “BODY” text (string, required) – “Shop now and use code CR7000 to get more offers” FOOTER type (string, required) – “FOOTER” text (string, required) – “Thank you for choosing us!” BUTTONS type (string, required) – “BUTTONS” buttons (array, required) – Contains interactive buttons. QUICK_REPLY type (string, required) – “QUICK_REPLY” text (string, required) – “Unsubscribe from Promos” URL Button type (string, required) – “url” text (string, required) – “Go to link” url (string, required) – “https://app.pingtochat.com“ Phone Number Button type (string, required) – “PHONE_NUMBER” text (string, required) – “Call” phone_number (string, required) – “91xxxxxxxxxx” Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet!" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "911234567890" }, { "type": "copy_code", "example": "12345" } ] } ] } Components Breakdown HEADER – Text: “Our summer sale is on in Urwallet!” BODY – Text: “We are introducing our new product in Urwallet!” FOOTER – Text: “Thank you for choosing Urwallet!” BUTTONS Quick Reply Button – “Unsubscribe Urwallet!” URL Button – “Go to link” (Dynamic URL support with example values) Phone Number Button – “Call” (Calls a specified phone number) Copy Code Button – Provides a predefined code for easy copying Response { "success": true, "id": "xxxxxx", "name": "edit_s", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
No parameter with header-text and body and footer static with url to dynamic url button and with quick-replay,phone-number,copy-code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_t", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "919526986676" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Parameters name (string, required) – The unique name identifier for the template (“edit_s”). language (string, required) – The language code for the template (“en_US”). category (string, required) – The category of the template (“MARKETING”). allow_category_change (boolean, optional) – Whether the category can be changed (true). components (array, required) – The structural components of the template. Components Breakdown HEADER type (string, required) – “HEADER” format (string, required) – “TEXT” text (string, required) – “Our summer sale is on!” BODY type (string, required) – “BODY” text (string, required) – “Shop now and use code CR7000 to get more offers” FOOTER type (string, required) – “FOOTER” text (string, required) – “Thank you for choosing us!” BUTTONS type (string, required) – “BUTTONS” buttons (array, required) – Contains interactive buttons. QUICK_REPLY type (string, required) – “QUICK_REPLY” text (string, required) – “Unsubscribe from Promos” URL Button type (string, required) – “url” text (string, required) – “Go to link” url (string, required) – “https://app.pingtochat.com“ Phone Number Button type (string, required) – “PHONE_NUMBER” text (string, required) – “Call” phone_number (string, required) – “91xxxxxxxxxx” Copy code Button type (string, required) – “COPY CODE” text (string, required) – “copy code” copy_code (string, required) – “wrett” Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet!" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "911234567890" } ] } ] } Components Breakdown HEADER – Text: “Our summer sale is on in Urwallet!” BODY – Text: “We are introducing our new product in Urwallet!” FOOTER – Text: “Thank you for choosing Urwallet!” BUTTONS Quick Reply Button – “Unsubscribe Urwallet!” URL Button – “Go to link” (Dynamic URL support with example values) Phone Number Button – “Call” (Calls a specified phone number) Copy Code Button – Provides a predefined code for easy copying Response { "success": true, "id": "xxxxxx", "name": "edit_s", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
No parameter with header-text and body and footer dynamic url to static url Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_u", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] } ] } ] } Components Breakdown HEADER Type: “HEADER” Format: “TEXT” Text: “Our summer sale is on!” BODY Type: “BODY” Text: “Shop now and use code CR7000 to get more offers” FOOTER Type: “FOOTER” Text: “Thank you for choosing us!” BUTTONS Type: “BUTTONS” Buttons: URL Button: “Go to link” (URL: “https://developers.pingtochat.com/{{1}}“, Example: “?docs=pingtochat/wp”) Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Components Breakdown HEADER – Text: “Our summer sale is on in Urwallet!” BODY – Text: “We are introducing our new product in Urwallet!” FOOTER – Text: “Thank you for choosing Urwallet!” BUTTONS URL Button – “Go to link” (URL: “https://app.pingtochat.com“) Response { "success": true, "id": "xxxxxx", "name": "edit_s", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
No parameter with header-text and body and footer dynamic url to static button quick-replay,phone-number,copy-code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_x", "language": "en_US", "category": "MARKETING", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on!" }, { "type": "BODY", "text": "Shop now and use code CR7000 to get more offers" }, { "type": "FOOTER", "text": "Thank you for choosing us!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe from Promos" }, { "type": "url", "text": "Go to link", "url": "https://developers.pingtochat.com/{{1}}", "example": [ "?docs=pingtochat/wp" ] }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "91xxxxxxxxxx" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Components Breakdown HEADER Type: “HEADER” Format: “TEXT” Text: “Our summer sale is on!” BODY Type: “BODY” Text: “Shop now and use code CR7000 to get more offers” FOOTER Type: “FOOTER” Text: “Thank you for choosing us!” BUTTONS Quick Reply Button: “Unsubscribe from Promos” URL Button: “Go to link” (URL: “https://developers.pingtochat.com/{{1}}“, Example: “?docs=pingtochat/wp”) Phone Number Button: “Call” (Phone Number: “91xxxxxxxxxx”) Copy Code Button: “WRETTT” Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our summer sale is on in Urwallet!" }, { "type": "BODY", "text": "We are introducing our new product in Urwallet!" }, { "type": "FOOTER", "text": "Thank you for choosing Urwallet!" }, { "type": "BUTTONS", "buttons": [ { "type": "QUICK_REPLY", "text": "Unsubscribe Urwallet" }, { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" }, { "type": "PHONE_NUMBER", "text": "Call", "phone_number": "911234567890" }, { "type": "copy_code", "example": "WRETTT" } ] } ] } Components Breakdown HEADER – Text: “Our summer sale is on in Urwallet!” BODY – Text: “We are introducing our new product in Urwallet!” FOOTER – Text: “Thank you for choosing Urwallet!” BUTTONS Quick Reply Button – “Unsubscribe Urwallet” URL Button – “Go to link” (URL: “https://app.pingtochat.com“) Phone Number Button – “Call” (Phone Number: “911234567890”) Copy Code Button – “WRETTT” Response { "success": true, "id": "xxxxxx", "name": "edit_x", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
Parameter with header body without static button url Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "edit_y", "language": "en_US", "category": "UTILITY", "allow_category_change": true, "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" } ] } Parameters name (string, required) – Unique identifier for the template (e.g., “edit_y”). language (string, required) – Language code for the template (e.g., “en_US”). category (string, required) – Category of the template (e.g., “UTILITY”). allow_category_change (boolean, optional) – Whether the category can be changed (true/false). components (array, required) – List of structural components of the template. Components Breakdown HEADER type (string, required) – “HEADER” format (string, required) – “TEXT” text (string, required) – “Our pingtochat {{1}} is on!” example (object, optional) – Example values for the header text. BODY type (string, required) – “BODY” text (string, required) – “Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.” example (object, optional) – Example values for the body text. FOOTER type (string, required) – “FOOTER” text (string, required) – “Use the buttons below to manage your marketing subscriptions.” Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "HEADER", "format": "TEXT", "text": "Our pingtochat {{1}} is on!", "example": { "header_text": [ "Summer Sale" ] } }, { "type": "BODY", "text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.", "example": { "body_text": [ [ "the end of August", "25OFF", "25%" ] ] } }, { "type": "FOOTER", "text": "Use the buttons below to manage your marketing subscriptions" }, { "type": "BUTTONS", "buttons": [ { "type": "url", "text": "Go to link", "url": "https://app.pingtochat.com" } ] } ] } Components Breakdown HEADER text: “Our pingtochat {{1}} is on!” example: Example header text values. BODY text: “Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.” example: Example body text values. FOOTER text: “Use the buttons below to manage your marketing subscriptions.” BUTTONS URL Button text: “Go to link” url: “https://app.pingtochat.com“ Response { "success": true, "id": "xxxxxx", "name": "edit_y", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
Zero-Tap to Auto-Fill Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "zero_tap_chat", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "zero_tap", "text": "Copy Code", "autofill_text": "Autofill", "zero_tap_terms_accepted": true, "supported_apps": [ { "package_name": "app.pingtochat.com", "signature_hash": "K8a/AINcGX7" } ] } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: zero_tap Text: Copy Code Autofill Text: Autofill Zero Tap Terms Accepted: true Supported Apps: Package Name: app.pingtochat.com Signature Hash: K8a/AINcGX7 Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "AUTHENTICATION" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 10 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "one_tap", "text": "Copy Code", "autofill_text": "Autofill", "package_name": "com.example.luckyshrub", "signature_hash": "K8a/AINcGX7" } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 10 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: one_tap Text: Copy Code Autofill Text: Autofill Package Name: com.example.luckyshrub Signature Hash: K8a/AINcGX7 Success Response { "success": true, "id": "xxxxxx", "name": "edit_s", "category": "AUTHENTICATION" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
Zero-Tap to Copy-Code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "zero_tap_chat", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "zero_tap", "text": "Copy Code", "autofill_text": "Autofill", "zero_tap_terms_accepted": true, "supported_apps": [ { "package_name": "app.pingtochat.com", "signature_hash": "K8a/AINcGX7" } ] } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: zero_tap Text: Copy Code Autofill Text: Autofill Zero Tap Terms Accepted: true Supported Apps: Package Name: app.pingtochat.com Signature Hash: K8a/AINcGX7 Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "copy_code", "text": "Copy Code" } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: copy_code Text: Copy Code Success Response Status Code: 201 APPROVED { "success": true, "id": "xxxxxx", "name": "zero_tap_chat", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
Auto-Fill to Zero-Tap Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "autofill_to_zero_tab", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 10 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "one_tap", "text": "Copy Code", "autofill_text": "Autofill", "package_name": "app.pingtochat.com", "signature_hash": "K8a/AINcGX7" } ] } ] } Components Body: Includes security recommendations for authentication messages. Footer: Specifies the OTP code expiration time (5 minutes). Buttons: OTP Type: zero_tap Button Text: “Copy Code” Autofill Text: “Autofill” Zero Tap Terms Accepted: true Supported Apps: Defines package names and signature hashes for authentication. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "zero_tap", "text": "Copy Code", "autofill_text": "Autofill", "zero_tap_terms_accepted": true, "supported_apps": [ { "package_name": "com.example.luckyshrub", "signature_hash": "K8a/AINcGX7" } ] } ] } ] } Components Body: Includes security recommendations. Footer: OTP code expiration time (10 minutes for one-tap, 5 minutes for zero-tap). Buttons: One Tap Option: Provides a copy code button with autofill capability. Zero Tap Option: Supports direct authentication without manual entry. Success Response { "success": true, "id": "xxxxxx", "name": "autofill_to_zero_tab", "category": "marketing" } Notes Ensure that {{your_domain}}, {{phone_number_id}}, and {{key}} are correctly replaced with actual values. The zero_tap_terms_accepted field must be set to true for Zero Tap authentication. The supported applications must match the package name and signature hash used for authentication. This setup enables secure and seamless authentication experiences for users.
Auto-Fill to Copy-Code Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "autofill_to_copy_code", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 10 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "one_tap", "text": "Copy Code", "autofill_text": "Autofill", "package_name": "app.pingtochat.com", "signature_hash": "K8a/AINcGX7" } ] } ] } Components Body: Includes security recommendations for authentication messages. Footer: Specifies the OTP code expiration time (5 minutes). Buttons: OTP Type: zero_tap Button Text: “Copy Code” Autofill Text: “Autofill” Zero Tap Terms Accepted: true Supported Apps: Defines package names and signature hashes for authentication. Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "copy_code", "text": "Copy Code" } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: copy_code Text: Copy Code Success Response Status Code: 201 APPROVED { "success": true, "id": "xxxxxx", "name": "autofill_to_copy_code", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
Copy-Code to Zero-Tap Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "copy_code_to_zero_tap", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "copy_code", "text": "Copy Code" } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: copy_code Text: Copy Code Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "zero_tap", "text": "Copy Code", "autofill_text": "Autofill", "zero_tap_terms_accepted": true, "supported_apps": [ { "package_name": "com.example.luckyshrub", "signature_hash": "K8a/AINcGX7" } ] } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: zero_tap Text: Copy Code Autofill Text: Autofill Zero Tap Terms Accepted: true Supported Apps: Package Name: app.pingtochat.com Signature Hash: K8a/AINcGX7 Response { "success": true, "id": "xxxxxx", "name": "copy_code_to_zero_tap", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
Copy-Code to Auto-Fill Create a Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/message_templates {{your_domain}}: Your domain URL where the API is hosted. {{phone_number_id}}: The unique identifier of the phone number used for sending messages. {{key}}: Your API key for authentication.How to create key Request Headers Authorization: Bearer token for authentication. Content-Type: Should be set to application/json. Request Body { "name": "copy_code_to_auto_fill", "language": "en_US", "category": "authentication", "message_send_ttl_seconds": 60, "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 5 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "copy_code", "text": "Copy Code" } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: copy_code Text: Copy Code Success Response Status Code: 201 APPROVED { "id": "xxxxxx", "status": "APPROVED", "category": "MARKETING" } Edit an Existing Template Endpoint http://{{your_domain}}/api/v1.0/{{phone_number_id}}/{{key}}/{{template_id}}/template_update Request Body { "components": [ { "type": "body", "add_security_recommendation": true }, { "type": "footer", "code_expiration_minutes": 10 }, { "type": "buttons", "buttons": [ { "type": "otp", "otp_type": "one_tap", "text": "Copy Code", "autofill_text": "Autofill", "package_name": "com.example.luckyshrub", "signature_hash": "K8a/AINcGX7" } ] } ] } Components Body Type: BODY Security Recommendation: true Footer Type: FOOTER Code Expiration: 5 minutes Buttons Type: BUTTONS Buttons: Type: otp OTP Type: zero_tap Text: Copy Code Autofill Text: Autofill Zero Tap Terms Accepted: true Supported Apps: Package Name: app.pingtochat.com Signature Hash: K8a/AINcGX7 Response { "success": true, "id": "xxxxxx", "name": "copy_code_to_auto_fill", "category": "marketing" } Notes The {{your_domain}} should be replaced with the actual domain. The {{phone_number_id}}, {{key}}, and {{template_id}} should be replaced with the actual values. Ensure that the request body is formatted correctly as JSON. Only authorized users with a valid key can create or update templates. Categories may be restricted based on platform policies.
Utility Finalize account set-up Hi John, Your new account has been created successfully. Please verify your email address to complete your profile. 🔗 Verify account Upcoming automatic payment Hi John, Your automatic payment for CS Mutual Checking is scheduled on Jan 1, 2024 for $12.34. Kindly ensure your balance is sufficient to avoid late fees. 🔗 View account Upcoming automatic payment Hi John, this is to remind you of your upcoming auto-pay: Date: Jan 1, 2024 Account: Market Credit Plus Amount: $12.34 Thank you and have a nice day. 🔗 View details Payment Reminder Reminder: Your scheduled payment for your CS Mutual Credit Plus card ending in 1234 is scheduled for Mar 22, 2024. Thank you. Order Delivered John, your order was successfully delivered! You can track your package and manage your order below. 🔗 Manage order Order Delivered John, great news! Your order #12345 was delivered. Need to return or replace an item? Click to manage your order. 🔗 Manage Order Order Delivered John, your order was successfully delivered! You can track your package and manage your order below. 🔗 Manage order Order Delivered John, great news! Your order #12345 was delivered. Need to return or replace an item? Click to manage your order. 🔗 Manage Order Order Delivered John, your order #12345 was delivered on Jan 1, 2024. If you need to return or replace item(s), please click below. 📌 Start Return Could Not Deliver Your Order Hi John, We attempted to deliver your order on Jan 1, 2024 but were not successful. Please contact us at 1800-555-1234 to arrange re-delivery. Thank you. 🚚 Manage Delivery 📞 Call Us We Were Unable to Deliver Your Order We were unable to deliver order #12345 today. Please try a redelivery to schedule another delivery attempt. 📦 Schedule Delivery We Were Unable to Deliver Your Order We were unable to deliver order #12345 today. Please try a redelivery to schedule another delivery attempt. 📦 Reschedule Your Order is On Its Way John, your order #12345 is on its way and should arrive soon. Estimated delivery is between 1pm and 4pm. We will provide an update when your order is delivered. An adult must be home to accept this package. 📦 Track Order Your Order is Out for Delivery! John, your order #12345 is out for delivery! It should be delivered at your doorstep between 1pm and 4pm. We hope you enjoy your item(s)! 📦 Track Order Out for Delivery Your order #12345 is out for delivery! It should arrive by Jan 1, 2024. Thank you for your business. 📦 Track Order You have an upcoming event Reminder: You RSVP’ed to John’s 30th birthday party by John and Jane. The event starts on January 1 at 7 pm at 123 Baker Street, Palo Alto, CA 91041. Reminder: John’s 30th birthday party is coming up and you have RSVP’ed yes. See you at 7 pm at Party Place. Thank you for RSVP’ing to John’s 30th birthday party by John and Jane. See you on January 1st at 7 pm! Your RSVP for John’s 30th birthday party by John and Jane is confirmed! Thanks! Reminder: John and Jane invited you to John’s 30th birthday party taking place on January 1st at 7 pm. Click below to RSVP. 🔗 RSVP Reminder: You’ve been invited to John’s 30th birthday party by John and Jane. Click below to RSVP. 🔗 RSVP Hi John, Thank you for your recent visit with us. We value your feedback and would appreciate you sharing more about your experience with us at the link below. This should only take 5 minutes. We appreciate your time. 🔗 Leave a Feedback How did we do? Thank you for visiting us at Jasper’s Market, 123 Baker street. Palo Alto CA, 91041 on Jan 1, 2024. We value your feedback. Please fill out this short survey to let us know how we can continue to improve. 🔗 Fill out survey How did we do? At Jasper’s Market, we value customer feedback and use it to continually improve our products. Please fill out a short survey, linked below, to let us know more about your recent purchase with us. Thank you in advance. 🔗 Provide feedback Rate your experience Your feedback is important to us. Please take a quick survey about your recent flight booking experience. 🔗 Take survey At Jasper’s Market, we value customer feedback and use it to continually improve our products. Please fill out a short survey, linked below, to let us know more about your recent purchase with us. Thank you in advance. 🔗 Take survey Hi John, We noticed a suspicious transaction on your CS Mutual debit card from Jasper’s Market for $12.34. If you didn’t make this transaction, please call us immediately at 1800-555-1234. You can also click below to freeze your card. Thank you! 📞 Call Us 🔗 Freeze card Hi John, This is CS Mutual. We identified a suspicious transaction on your CS Mutual debit card ending in 1234: Date: Jan 1, 2024 Merchant: Jasper’s Amount: $12.34 Did you make this purchase? ↩ Yes ↩ No Hi John, We noticed a suspicious charge on your credit card account. Please verify the details of this transaction. 🔗 Verify Transaction Suspicious transaction Hi John, We detected a suspicious transaction on your CS Mutual debit account card ending in 1234. Please verify if this was you. 🔗 Verify Transaction Low account balance Hi John, This is to notify you that your available funds in your CS Mutual checking plus account ending in 1234 is below your pre-set limit of $50.00. Click below to add funds or call us. 🔗 Make a deposit 📞 Call Us Hi John, Available funds in your CS Mutual checking plus account ending in 1234 are below your pre-set $50.00 limit. 🔗 Make a deposit 📞 Call Us John, before we can process your order #12345, we need to verify some information. Please contact us at your earliest convenience. Thank you. 📞 Call Us We were unable to process your order #12345. Please call us at 1800-555-1234 for next steps. 📞 Call Us Order canceled John, your order #12345 has been successfully canceled. Your refund will be processed in 7 business days. Thank you. 🔗 View order details John, per your request, we have canceled your order #12345. Your refund will be processed in 7 business days. You can track this below. 🔗 View order details Hi, this is to confirm we have successfully canceled your recent order #559032. Thank you. 🔗 View order details John, there is a delay in delivering your order #12345. We’re working to resolve it as soon as possible. We will follow up with an update. We apologize for any inconvenience. We’ll send you an updated delivery status when we can. 🔗 Track my order 🔗 View order details Item(s) out-of-stock Hi John, Item(s) from your recent order #12345 are out-of-stock. We will notify you as soon as your item(s) ship. If you prefer not to wait, please click below to cancel your order. We apologize for any inconvenience. 🔗 Manage Order Order confirmed Hi John, Thank you for your purchase! Your order number is #12345. We’ll start getting 2 12-pack of Jasper’s paper towels ready to ship. Estimated delivery: Jan 1, 2024 We will let you know when your order ships. 🔗 View order details Order confirmed John, your order is confirmed and your order number is #12345. Estimated delivery: Jan 1, 2024. We will follow up with more details as we prepare your order for shipment. 🔗 View order details Order confirmed John, we’ve received your order. Your order number is #12345. Click below to manage your order. 🔗 Manage Order Order confirmed Hi Pavan, Your order has been successfully placed and is being processed. Your order number is #12345. 🔗 View Order Ready for pick up! John, your order #12345 is ready for pick up at Jasper’s Market, 1234 Baker street. Palo Alto, CA 94301. Message us when you arrive and we will bring your order out to you. See you soon! 🔗 I’ve arrived Great news! Your order #12345 is now ready for pick up at Jasper’s Market, 1234 Baker street. Palo Alto, CA 94301. Click “I’m here” when you arrive and we will meet you with your products. See you soon! 🔗 I’m here Verify your payment info Hi John, Payment for your CS Mutual card card ending in 1234 is coming due. Verify your information to avoid overdue fees. Please ignore this message if you’ve already paid. 🔗 Verify Review a recent transaction Hi John, We encountered an issue with your recent transaction for $12.34 at Jasper’s Market. Please contact us at 1-800-555-1234 for assistance. 📞 Call us Could not process payment Your scheduled payment of $12.34 for CS Mutual debit plus could not be processed. Please contact us at 1-800-555-1234 for assistance. 📞 Call us Hi John, We have received your payment of $12.34 for CS Mutual debit card. Thank you for your payment. 🔗 View payment details Successful payment Your payment of $12.34 for CS Mutual credit card has been processed successfully. We appreciate your business. 🔗 View details Payment confirmation: Account: CS Mutual credit card Amount: $12.34 Date: Jan 1, 2024 Thank you and have a nice day. 🔗 View details Hi John, your recent payment of $12.34 for your CS Mutual Credit plus card account has failed. Please check your account and try again. 🔗 View Account Hi John, We were unable to process your payment of $12.34 for CS Mutual Credit plus card. Please update your payment method or contact us for assistance. 🔗 View Account 📞 Call Us Your payment was rejected. Account: CS Mutual debit plus Amount: $12.34 Date: Jan 1, 2024 Please check your account and try again. 🔗 View Account Your payment for $12.34 will be processed on Jan 1, 2024. Thank you! 🔗 View Account Thank you for scheduling your payment of $12.34. We will charge your card on Jan 1, 2024. 🔗 View Account This is to confirm your payment of $12.34 for your card will be processed on Jan 1, 2024. 🔗 View Account Payment overdue Your credit card payment of $12.34 is overdue by 3 days. Please pay now to avoid avoid late fees. Contact us if you need assistance. 🔗 Pay Now 📞 Contact Us Hi John, you have a payment overdue: Account: CS Mutual card Amount due: $12.34 Due date: Jan 1, 2024 Pay now to complete payment via our website. Please ignore this message if you’ve already paid. 🔗 Pay Now Payment is overdue for your CS Mutual card card ending in 1234 for $12.34. Please click to pay now and avoid late fees. 🔗 Pay Now Payment is overdue for your CS Mutual card card ending in 1234. Please click to pay now and avoid late fees. 🔗 Review and Pay {{Product name}} Quantity {{#}} Total ₹{{#}} Hi John, you have a payment overdue: Account: CS Mutual card Due date: Jan 1, 2024 Pay now to complete payment via our website. Please ignore this message if you’ve already paid. 🔗 Review and Pay {{Product name}} Quantity {{#}} Total ₹{{#}} Payment overdue Your credit card payment is overdue by 3 days. Please pay now to avoid late fees. Contact us if you need assistance. 🔗 Review and Pay Payment due soon Hello John, Your payment of $12.34 is due on Jan 1, 2024. Please ignore this message if you’ve already paid. 🔗 Pay Now Your payment of $12.34 is due on Jan 1, 2024. Pay now to avoid late fees. If you already paid, please ignore this message. 🔗 Pay Now Payment due Payment reminder: Account: CS Mutual card XXX-1234 Amount due: $12.34 Due date: Jan 1, 2024 Pay now to avoid late fees. Please ignore this if you have already paid. 🔗 Pay Now Payment of $12.34 due Hi John, Payment of $12.34 for your CS Mutual debit plus card ending in 1234 is due on Jan 1, 2024. Pay now to avoid late fees. Please ignore this if you have already paid. 🔗 Pay Now ORDER #{{Order number}} {{Product name}} Quantity {{#}} Total ₹{{#}} Payment due Hi John, Payment for your CS Mutual debit plus card ending in 1234 is due on Jan 1, 2024. Pay now to avoid late fees. Please ignore this message if you’ve already paid. 🔗 Review and Pay ORDER #{{Order number}} {{Product name}} Quantity {{#}} Total ₹{{#}} Payment due Payment reminder: Account: CS Mutual card XXX-1234 Due date: Jan 1, 2024 Pay now to avoid late fees. Please ignore this message if you’ve already paid. 🔗 Review and Pay ORDER #{{Order number}} {{Product name}} Quantity {{#}} Total ₹{{#}} Your payment is due on Jan 1, 2024. Pay now to avoid late fees. If you’ve already paid, please ignore this message. 🔗 Review and Pay ORDER #{{Order number}} {{Product name}} Quantity {{#}} Total ₹{{#}} Payment due soon Your payment is due on Jan 1, 2024. Please ignore this message if you’ve already paid. 🔗 Review and Pay Your payment of $12.34 for your CS Mutual Credit Plus account is scheduled for Jan 1, 2024. Please ensure you have sufficient funds to avoid generating any late fees. 🔗 Manage payment Upcoming scheduled payment Hi John, Thank you for scheduling your payment of $12.34 for your CS Mutual debit plus account on Jan 1, 2024. Please visit your account if you would like to make any changes ahead of this date. 🔗 Manage payment Hi John, this is to remind you of your upcoming scheduled payment: Date: Jan 1, 2024 Account: CS Mutual debit plus Amount: $12.34 Thank you and have a nice day. 🔗 Manage payment 📄 Thank you for your purchase of $12.34 from Jasper’s Market, 123 Baker street. Palo Alto CA, 91041. Your receipt PDF is attached. 📄 Thank you for using your credit card at CS Mutual. Your receipt is attached as a PDF. This message is to confirm your purchase for $12.34 from CS Mutual on Jan 1, 2024. You were refunded for $25 Hi John, Your refund for $25 has been processed for order #12345. You’ll be credited back to your original payment method in 3-5 business days. John, thank you for returning product(s) from your order #12345. We are currently processing your return and will notify you of your refund status. 🔗 Manage Order Return received We have received item(s) from your order #12345. Your return is complete, and we have processed your refund for $12.34. Thank you for your business. 🔗 Manage order Order shipped John, your order has shipped! Your tracking number is ZK12345KI999. Estimated delivery is Jan 1, 2024. We will continue to provide updates on this shipment until it is delivered. 🔗 Track shipment John, great news! Your order #12345 has shipped. Tracking #: ZK4539O2311J Estimated delivery: Jan 1, 2024 We will provide updates until delivery. 🔗 Track shipment John, your order #12345 has left our facility and is on its way to you! Your tracking ID is ZK12345KI999. Click below to track your package. 🔗 Track my order Statement available Hi John, Your January statement for your account ending in 1234 is now available. Click below to see your statement. 🔗 View statement Statement available This is to notify you that your latest statement for your Mankt checking plus account is now available. Please log into your account to view your statement. 🔗 View statement
Authentication Your order is arriving soon. {{code}} is your verification code. Please show this to the delivery associate. 6:52 AM Your order is on its way and scheduled to arrive at {{date}}. Please show verification code {{code}} to receive your order. 6:52 AM Please share code {{code}} with the delivery agent after verifying the package. 6:52 AM Your order of {{number}} items (Order ID: {{text}}) is out for delivery today. Please provide the code {{code}} to the delivery agent to receive your order. 6:52 AM {{code}} is your verification code. 6:52 AM {{code}} is your password recovery code. 6:52 AM Use code {{code}} to authorize your transaction. 6:52 AM Use code {{code}} to verify your transaction of {{amount}}. 6:52 AM Use code {{code}} to verify your transaction of {{amount}} on your card ending in {{card number}}. 6:52 AM Use code {{code}} to verify your transaction of {{amount}} on your account ending in {{number}}. 6:52 AM {{code}} is your verification code for transfer of {{amount}}. 6:52 AM
Introduction A flow template provides a structured, reusable framework for building automated processes—such as marketing journeys, or workflow systems. Instead of starting from scratch, teams can use a template to save time, ensure consistency, and reduce errors. By using a flow template, you benefit from: Faster setup and deployment Standardized logic and messaging Improved collaboration and scalability Easier testing and optimization Whether you’re designing customer interactions, automating tasks, or guiding users through a process, a flow template serves as a reliable starting point—helping you work smarter and deliver a consistent experience every time.
Create template Overview The Flow Template Creation feature allows users to design and save custom flow templates consisting of interactive screens. These templates can be used in various workflows to guide users through a predefined sequence of content and actions. 🔘 Create Template – Main Sections When creating a flow template, the interface is divided into three main sections: 1. Screen Section This section allows users to add and manage up to 8 screens. Each screen represents a step or page in the flow. Users can add, remove, or navigate between screens using this section. The selected screen’s content will be editable in the Edit Content section. 2. Edit Content Section Displays the content of the currently selected screen. Users can edit text, images, inputs, or other interactive elements. All changes made here are reflected in the corresponding screen. 3. Preview Section Provides a real-time preview of the selected screen as it will appear in the final template. Allows users to visualize the layout and flow before saving. ✅ Save Template After editing all desired screens, the user can click the “Save” button. Upon clicking Save: All screen data and configurations are stored as a complete flow template. The template becomes available for use in other modules or workflows. 📌 Additional Notes A minimum of 1 screen and a maximum of 8 screens are allowed per flow template. Templates can be edited later if changes are needed. Ensure that all required fields in the Edit Content section are filled before saving. 🧩 Use Cases Onboarding flows Survey or feedback forms Guided tutorials or walkthroughs Lead generation sequences
Introduction WhatsApp SandboxA WhatsApp Sandbox is a test environment that allows developers to simulate WhatsApp Business messaging without needing full approval or a live WhatsApp Business number. It enables sending and receiving messages, testing templates, configuring webhooks, and building conversational workflows in a controlled setting—ideal for development and early-stage prototyping.
WhatsApp Sandbox A WhatsApp Sandbox is a testing environment that simulates real WhatsApp Business interactions without requiring a live or verified WhatsApp Business account. It is primarily used by developers and businesses to prototype, test, and validate WhatsApp messaging workflows, templates, webhooks, and integrations before going live. Core Features Safe Testing EnvironmentInteract with WhatsApp messaging APIs in a risk-free environment, without affecting real customers or production data. Message SimulationSend and receive messages (text, templates, media) between a test number and sandbox-enabled service. Webhook TestingSimulate callbacks for message delivery, read receipts, or inbound messages using public URLs (e.g., via ngrok or PostBin). Pre-Approved TemplatesMost sandboxes support a limited number of pre-approved message templates for testing transactional or marketing content. Limited AudienceOnly authorized test numbers can interact in the sandbox environment—often limited to the developer’s own phone number(s). Common Limitations Restricted RecipientsMessages can typically only be sent to registered test numbers (often just one or a few) to prevent abuse. Session TimeoutsTest sessions often expire after a few hours or days; users may need to re-authorize or re-join the sandbox. Rate LimitsMessage sending frequency is capped (e.g., 1 message every 3 seconds in some platforms). Limited Templates & FeaturesCustom templates may not be allowed; you may be limited to built-in examples for testing. No Production MessagingSandboxes do not support actual user communications—only for development or QA purposes. How to Access a WhatsApp Sandbox Register with a WhatsApp API provider (e.g., Pingtochat, 360dialog, Zoho, etc.). Obtain a test API key and/or sandbox number. Add your phone number as an authorized tester. Use API endpoints or dashboards to send/receive messages. Configure webhooks to receive events like inbound messages or delivery updates. Go to Service → SandboxThis will open the Sandbox configuration page. To access the Sandbox: Option 1: Scan the QR code using your WhatsApp app. Option 2: Manually copy the phone number and send the provided message code via WhatsApp to join the sandbox. After joining the sandbox: ➡️ You will be automatically redirected to the next page where you can test message sending. On this page, you can: Enter a phone number to send a test message. Select a template to use for the message. View the output of the message delivery in real time. Access sample code in multiple languages such as: PHP cURL Python Node.js, and more. This allows you to test message delivery and understand how to integrate the API into your application. The WhatsApp Sandbox environment provides a safe and efficient way to test message delivery, template functionality, and API integration—all without needing a live WhatsApp Business account. From joining via QR code or message code, to sending test messages and viewing sample code, the sandbox equips you with everything needed to build and validate your messaging flow before going live. Whether you’re testing authentication templates, marketing messages, or webhook responses, the sandbox is an essential step in your WhatsApp development journey. 🛠️ Need Help? If you encounter any issues or have questions: 📨 Contact Support at: support@texaavyinfotech.com 💬 Live Chat is available in the dashboard for real-time assistance.