{"info":{"_postman_id":"5e639ecb-50f7-411b-b038-2a80dbcc0cac","name":"SENDPK_OFFICIAL_WHATSAPP","description":"<html><head></head><body><p>The wa.sendpk.com API enables businesses to communicate with customers through WhatsApp, offering features such as automated messaging, template-based notifications, and integration with CRM systems. It supports sending and receiving text, images, and media, while ensuring data security and compliance with WhatsApp's guidelines. The API facilitates efficient customer interactions, automation, and analytics to enhance engagement and support.</p>\n<h3 id=\"how-to-get-started\">How to get started</h3>\n<p>Easy. Only two steps actually:</p>\n<h4 id=\"1-create-an-account-at-wasendpkcom\">1. Create an account at wa.sendpk.com</h4>\n<p>In order to use our API, you will need <code>api_token</code>. This can be obtained by creating an account and then by logging in to the customer portal.</p>\n<p><a href=\"https://wa.sendpk.com/Register.php\">Register</a></p>\n<h4 id=\"2-copy-api_token\">2. Copy <code>api_token</code></h4>\n<p><code>api_token</code> can be obtained on the profile page. Here is the page profile link:</p>\n<p><a href=\"https://wa.sendpk.com/dashboard/profile_api_key.php\">Profile Page<br><br></a>StartFragment</p>\n<h1 id=\"template-message-api-documentation\">Template Message API Documentation</h1>\n<p><strong>Note:</strong> This API supports both <strong>GET</strong> &amp; <strong>POST</strong> methods (POST method recommended).<br>StartFragment</p>\n<h2 id=\"parameters\">Parameters:</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>api_key (mandatory)</td>\n<td>Client's secret API token</td>\n</tr>\n<tr>\n<td>template_id (required if template message)</td>\n<td>Approved template ID</td>\n</tr>\n<tr>\n<td>template_data (required if template message)</td>\n<td>Specific JSON format for template data</td>\n</tr>\n<tr>\n<td>whatsapp_id (optional)</td>\n<td>Send message from a specific WhatsApp ID</td>\n</tr>\n<tr>\n<td>free_form (optional)</td>\n<td>Send free-form message within 24 hours of user reply</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"base-url\">Base URL:</h2>\n<p><a href=\"https://wa.sendpk.com/api/send.php\">https://wa.sendpk.com/api/send.php</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Template Message API Documentation","slug":"template-message-api-documentation"}],"owner":"9576087","collectionId":"5e639ecb-50f7-411b-b038-2a80dbcc0cac","publishedId":"2sAXjDdv62","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-08-22T06:04:04.000Z"},"item":[{"name":"Simple Template API (Fixed Content)","id":"2e891ec9-b273-4357-bdac-d5a27c699998","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"api_key","value":"{{api_key}}","type":"text"},{"key":"template_id","value":"{{approved_tempate_id}}","type":"text"},{"key":"template_data","value":"[{\"mobile\":\"{{Recipient_Number}}\"}]","type":"text"}]},"url":"https://wa.sendpk.com/api/send.php","description":"<h2 id=\"simple-template-api-fixed-content\"><strong>Simple Template API (Fixed Content)</strong></h2>\n<p>To Send A Template Message First Of All We Need To Approve An Template From Whatsapp.</p>\n<p>For Example, We Have Approved The Following Template Message</p>\n<p>“Thank you for your order! We have received your order and are currently processing it. You will receive updates as your order moves forward. If you have any questions, feel free to contact us”</p>\n<p>Please note that this message has no variable (meaning you can't change anything in the message content, it is fixed). If you have variables like <strong>{{}}</strong>, you can change the text as per your need, which will be discussed in the next chapter.</p>\n<p>To Send This Message, Simply We Need The Following Parameters in Our URL:</p>\n<p><a href=\"https://wa.sendpk.com/api/send.php?api_key=API_KEY&amp;template_id=TEMPLATE_ID&amp;template_data=%5B%7B\">https://wa.sendpk.com/api/send.php?api_key=API_KEY&amp;template_id=TEMPLATE_ID&amp;template_data=[{\"mobile\":\"923XXXXXX\"}]</a></p>\n","urlObject":{"protocol":"https","path":["api","send.php"],"host":["wa","sendpk","com"],"query":[],"variable":[]}},"response":[{"id":"7c8f1022-f1ad-4cda-88de-a3b9daf0fb15","name":"Simple Template API (Fixed Content)","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"api_key","value":"{{api_key}}","type":"text"},{"key":"template_id","value":"{{approved_tempate_id}}","type":"text"},{"key":"template_data","value":"[{\"mobile\":\"{{Recipient_Number}}\"}]","type":"text"}]},"url":"https://wa.sendpk.com/api/send.php"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": \"true\",\n    \"method\": \"API\",\n    \"message_type\": \"TEMPLATE\",\n    \"total_price\": \"0\",\n    \"total_gsm\": \"1\",\n    \"remaining_credit\": \"906\",\n    \"results\": [\n        {\n            \"status\": \"OK\",\n            \"id\": \"58e95d15-323e-4ed8-9a10-388f39849974\",\n            \"mobile\": \"923134126153\"\n        }\n    ]\n}"}],"_postman_id":"2e891ec9-b273-4357-bdac-d5a27c699998"},{"name":"Dynamic Template API","id":"569eb541-ad63-41af-99f2-bb6f1f5c1793","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"api_key","value":"{{api_key}}","type":"text"},{"key":"template_id","value":"{{template_id}}","type":"text"},{"key":"template_data","value":"[{\"mobile\":\"{{recipient_number}}\",\"body\":[{\"type\":\"text\",\"text\":\"{{Variable_1}}\"},{\"type\":\"text\",\"text\":\"{{variable_2}}\"}]}]","type":"text"}]},"url":"https://wa.sendpk.com/api/send.php","description":"<h1 id=\"dynamic-template-api\">Dynamic Template API</h1>\n<p>With this API, we can dynamically modify the message header and body content, which can include text, images, or media files. This flexibility enables you to tailor messages to fit various needs and contexts, providing a more personalized and engaging experience for recipients.</p>\n<p>To Send A Template Message First Of All We Need To Approve An Template From Whatsapp</p>\n<p>For <strong>Example</strong>, We Have Approved The Following Template Message:</p>\n<blockquote>\n</blockquote>\n<p>“Hi <strong>{{1}}</strong>,<br />Your order has been successfully placed!<br />The total amount is <strong>{{2}}</strong>  </p>\n<p>Thank you for choosing us!”</p>\n<p> Please Note, In the Dynamic Template API, placeholders such as <code>{{1}}</code> &amp; <code>{{2}}</code> are used to represent dynamic variables within the message template. These placeholders can be replaced with specific values as needed to customize the message for each recipient.</p>\n<ul>\n<li><p><code>{{1}}</code> This placeholder corresponds to the first dynamic variable in the message template.</p>\n</li>\n<li><p><code>{{2}}</code> This placeholder corresponds to the second dynamic variable in the message template.  </p>\n<p>  To send a Dynamic Template message with these placeholders, use the following URL</p>\n</li>\n</ul>\n<p>[<a href=\"https://wa.sendpk.com/api/send.php?api_key=API_KEY&amp;template_id=TEMPLATE_ID&amp;template_data=%5B%7B%22mobile%22:%22923134126153%22,%22body%22:%5B%7B%22type%22:%22text%22,%22text%22:%22Abdul%20Basit%22%7D,%7B%22type%22:%22text%22,%22text%22:%221500%22%7D%5D%7D%5D%5D(https://wa.sendpk.com/api/send.php?api_key=API_KEY&amp;template_id=TEMPLATE_ID&amp;template_data=%5B%7B%22mobile%22:%22923134126153%22,%22body%22:%5B%7B%22type%22:%22text%22,%22text%22:%22Abdul%20Basit%22%7D,%7B%22type%22:%22text%22,%22text%22:%221500%22%7D%5D%7D%5D)\">https://wa.sendpk.com/api/send.php?api_key=API_KEY&amp;template_id=TEMPLATE_ID&amp;template_data=[{\"mobile\":\"923134126153\",\"body\":[{\"type\":\"text\",\"text\":\"Abdul%20Basit\"},{\"type\":\"text\",\"text\":\"1500\"}]}]](https://wa.sendpk.com/api/send.php?api_key=API_KEY&amp;template_id=TEMPLATE_ID&amp;template_data=%5B%7B%22mobile%22:%22923134126153%22,%22body%22:%5B%7B%22type%22:%22text%22,%22text%22:%22Abdul%20Basit%22%7D,%7B%22type%22:%22text%22,%22text%22:%221500%22%7D%5D%7D%5D)</a>  </p>\n<p>Parameter <strong>template_data</strong> Sample: <code>[{\"mobile\":\"923134126153\",\"body\":[{\"type\":\"text\",\"text\":\"Abdul Basit\"},{\"type\":\"text\",\"text\":\"1500\"}]}]</code></p>\n","urlObject":{"protocol":"https","path":["api","send.php"],"host":["wa","sendpk","com"],"query":[],"variable":[]}},"response":[{"id":"172497e9-2966-4358-84ed-dda630b4db28","name":"Dynamic Template API","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"api_key","value":"{{api_key}}","type":"text"},{"key":"template_id","value":"{{approved_tempate_id}}","type":"text"},{"key":"template_data","value":"[{\"mobile\":\"{{recipient_number}}\",\"body\":[{\"type\":\"text\",\"text\":\"{{Variable_1}}\"},{\"type\":\"text\",\"text\":\"{{variable_2}}\"}]}]","type":"text"}]},"url":"https://wa.sendpk.com/api/send.php"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": \"true\",\n    \"method\": \"API\",\n    \"message_type\": \"TEMPLATE\",\n    \"total_price\": \"1\",\n    \"total_gsm\": \"1\",\n    \"remaining_credit\": \"906\",\n    \"results\": [\n        {\n            \"status\": \"OK\",\n            \"id\": \"dc0eda5c-a09e-4a6c-8b4d-22ed4a5f0e68\",\n            \"mobile\": \"923134126153\"\n        }\n    ]\n}"}],"_postman_id":"569eb541-ad63-41af-99f2-bb6f1f5c1793"},{"name":"Media Template API","id":"122a99a9-e92e-43ac-88d7-4ec5b76de141","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"api_key","value":"{{API_KEY}}","type":"text"},{"key":"template_id","value":"{{template_id}}","type":"text"},{"key":"template_data","value":"[{\"mobile\":\"{{recipient_number}}\",\"header\":{\"type\":\"{{type}}\",\"url\":\"{{media_url}}\"},\"body\":[{\"type\":\"text\",\"text\":\"{{variable_1}}\"},{\"type\":\"text\",\"text\":\"{{variable_2}}\"},{\"type\":\"text\",\"text\":\"{{variable_3}}\"}]}]","type":"text"}]},"url":"https://wa.sendpk.com/api/send.php","description":"<h1 id=\"media-template-api\">Media Template API</h1>\n<p>The Media API supports sending media files such as images and documents.</p>\n<p>To send a media message, you must have an approved template from WhatsApp. For example, we have an approved template featuring an image with dynamic text content.</p>\n<p>“Hi <strong>{{1}}</strong>,<br />This is to confirm your order of the <strong>{{2}}</strong> watch.<br />The total price is <strong>{{3}}</strong>.  </p>\n<p>Thank you for your purchase ”  </p>\n<img src=\"https://content.pstmn.io/b89515bd-dccd-4358-b4d8-65718c2e1e89/aW1hZ2UucG5n\" alt height=\"652\" width=\"500\" />\n\n<p>Please Note, In this Template, placeholders such as <code>{{1}}</code> , <code>{{2}}</code> &amp; <code>{{3}}</code> are used to represent dynamic variables within the message template. These placeholders can be replaced with specific values as needed to customize the message for each recipient.</p>\n<ul>\n<li><p><code>{{1}}</code> This placeholder corresponds to the first dynamic variable in the message template.</p>\n</li>\n<li><p><code>{{2}}</code> This placeholder corresponds to the second dynamic variable in the message template.</p>\n</li>\n<li><p><code>{{3}}</code> This placeholder corresponds to the third dynamic variable in the message template.</p>\n</li>\n</ul>\n<p><code>template_data</code> Paramter Will be  </p>\n<p>[{\"mobile\":\"923134126153\",\"header\":{\"type\":\"image\",\"url\":\"[<a href=\"https://wa.sendpk.com/assets-front-end/images/api_docs/watch.jpg%22%7D,%22body%22:%5B%7B%22type%22:%22text%22,%22text%22:%22Abdul%5D(https://wa.sendpk.com/assets-front-end/images/api_docs/watch.jpg)\">https://wa.sendpk.com/assets-front-end/images/api_docs/watch.jpg\"},\"body\":[{\"type\":\"text\",\"text\":\"Abdul](https://wa.sendpk.com/assets-front-end/images/api_docs/watch.jpg)</a> Hadi\"},{\"type\":\"text\",\"text\":\"Apple Watch Ultra 2\"},{\"type\":\"text\",\"text\":\"$ 800\"}]}]  </p>\n<p>As you can see in the JSON, the <code>\"header\"</code> contains:</p>\n<p><code>\"type\": \"image\"</code></p>\n<p>header should be the</p>\n<p><strong>image, document, video, text</strong></p>\n<p>If you skip the <code>\"header\"</code> in the JSON, the default media will be attached during WhatsApp's template approval time.</p>\n<p>You can provide your own media URL to include dynamic content such as images, documents, or any other media files. This allows you to personalize the media in your messages, making it adaptable to different contexts and purposes.  </p>\n<p>Sample URL For This Template:</p>\n<p>[<a href=\"https://wa.sendpk.com/api/send.php?api_key=API_KEY&amp;template_id=TEMPLATE_ID&amp;template_data=%5B%7B%22mobile%22:%22923134126153%22,%22header%22:%7B%22type%22:%22image%22,%22url%22:%22https://wa.sendpk.com/assets-front-end/images/api_docs/watch.jpg%22%7D,%22body%22:%5B%7B%22type%22:%22text%22,%22text%22:%22Abdul%20Hadi%22%7D,%7B%22type%22:%22text%22,%22text%22:%22Apple%20Watch%20Ultra%202%22%7D,%7B%22type%22:%22text%22,%22text%22:%22$%20800%22%7D%5D%7D%5D%5D(https://wa.sendpk.com/api/send.php?api_key=API_KEY&amp;template_id=TEMPLATE_ID&amp;template_data=%5B%7B%22mobile%22:%22923134126153%22,%22header%22:%7B%22type%22:%22image%22,%22url%22:%22https://wa.sendpk.com/assets-front-end/images/api_docs/watch.jpg%22%7D,%22body%22:%5B%7B%22type%22:%22text%22,%22text%22:%22Abdul%20Hadi%22%7D,%7B%22type%22:%22text%22,%22text%22:%22Apple%20Watch%20Ultra%202%22%7D,%7B%22type%22:%22text%22,%22text%22:%22$%20800%22%7D%5D%7D%5D)\">https://wa.sendpk.com/api/send.php?api_key=API_KEY&amp;template_id=TEMPLATE_ID&amp;template_data=[{\"mobile\":\"923134126153\",\"header\":{\"type\":\"image\",\"url\":\"https://wa.sendpk.com/assets-front-end/images/api_docs/watch.jpg\"},\"body\":[{\"type\":\"text\",\"text\":\"Abdul%20Hadi\"},{\"type\":\"text\",\"text\":\"Apple%20Watch%20Ultra%202\"},{\"type\":\"text\",\"text\":\"$%20800\"}]}]](https://wa.sendpk.com/api/send.php?api_key=API_KEY&amp;template_id=TEMPLATE_ID&amp;template_data=%5B%7B%22mobile%22:%22923134126153%22,%22header%22:%7B%22type%22:%22image%22,%22url%22:%22https://wa.sendpk.com/assets-front-end/images/api_docs/watch.jpg%22%7D,%22body%22:%5B%7B%22type%22:%22text%22,%22text%22:%22Abdul%20Hadi%22%7D,%7B%22type%22:%22text%22,%22text%22:%22Apple%20Watch%20Ultra%202%22%7D,%7B%22type%22:%22text%22,%22text%22:%22$%20800%22%7D%5D%7D%5D)</a></p>\n<p>Success Response:<br />{\"success\":\"true\",\"method\":\"API\",\"message_type\":\"TEMPLATE\",\"total_price\":\"1\",\"total_gsm\":\"1\",\"remaining_credit\":\"906\",\"results\":[{\"status\":\"OK\",\"id\":\"8ed138a8-d9dd-41c8-833d-d314c269493e\",\"mobile\":\"9231341XXXX\"}]}  </p>\n<img src=\"https://content.pstmn.io/13ddc4f3-f2dd-471e-8dde-064a24d0df0f/aW1hZ2UucG5n\" alt height=\"981\" width=\"798\" />","urlObject":{"protocol":"https","path":["api","send.php"],"host":["wa","sendpk","com"],"query":[],"variable":[]}},"response":[{"id":"8a639417-402c-4e3d-bbd4-b949367cf7aa","name":"Media Template API","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"api_key","value":"{{API_KEY}}","type":"text"},{"key":"template_id","value":"{{template_id}}","type":"text"},{"key":"template_data","value":"[{\"mobile\":\"{{recipient_number}}\",\"header\":{\"type\":\"{{type}}\",\"url\":\"{{media_url}}\"},\"body\":[{\"type\":\"text\",\"text\":\"{{variable_1}}\"},{\"type\":\"text\",\"text\":\"{{variable_2}}\"},{\"type\":\"text\",\"text\":\"{{variable_3}}\"}]}]","type":"text"}]},"url":"https://wa.sendpk.com/api/send.php"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": \"true\",\n    \"method\": \"API\",\n    \"message_type\": \"TEMPLATE\",\n    \"total_price\": \"1\",\n    \"total_gsm\": \"1\",\n    \"remaining_credit\": \"906\",\n    \"results\": [\n        {\n            \"status\": \"OK\",\n            \"id\": \"0e3ca78f-77c2-430f-9080-c6f8a7a0ebe9\",\n            \"mobile\": \"923134126153\"\n        }\n    ]\n}"}],"_postman_id":"122a99a9-e92e-43ac-88d7-4ec5b76de141"},{"name":"Header, Body, Footer Template API","id":"ae637d1e-4974-4cdb-bf1a-0bbb24f40b58","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"api_key","value":"{{API_KEY}}","type":"text"},{"key":"template_id","value":"{{template_data}}","type":"text"},{"key":"template_data","value":"[{\"mobile\":\"{{RECIPIENT_NUMBER}}\",\"header\":{\"type\":\"text\",\"text\":\"{{Luqman Rasul}}\"},\"body\":[{\"type\":\"text\",\"text\":\"{{$ 180}}\"},{\"type\":\"text\",\"text\":\"{{CS Mutual Debit Plus}}\"},{\"type\":\"text\",\"text\":\"{{Jan 1, 2024}}\"}]}]","type":"text"}]},"url":"https://wa.sendpk.com/api/send.php","description":"<h1 id=\"header-body-footer-template-api\">Header, Body, Footer Template API</h1>\n<p>A WhatsApp template can consist of 3 key elements: <strong>Header</strong>, <strong>Body</strong>, and <strong>Footer</strong>. The <strong>Body</strong> is mandatory, while the <strong>Header</strong> and <strong>Footer</strong> are optional. The <strong>Header</strong> allows for a maximum of <strong>60</strong> characters and can include <strong>1</strong> dynamic variable if it consists of text. In contrast, the <strong>Body</strong> supports up to <strong>1024 characters</strong> and can accommodate over <strong>50</strong> dynamic variables, making it the most flexible section. The <strong>Footer</strong>, like the Header, is limited to <strong>60 characters</strong> but does not support any dynamic variables.  </p>\n<p>Please ensure that these specifications are adhered to in order to create a valid template.</p>\n<p>In this template, we will send a message that consists of three main elements: a <strong>header</strong>, a <strong>body</strong>, and a <strong>footer</strong>.</p>\n<p>To Send A Template Message First Of All We Need To Approve An Template From Whatsapp</p>\n<p>For Example, We Have Approved The Following Template Message:</p>\n<h3 id=\"hi-1-upcoming-scheduled-payment\">Hi <strong>{{1}}</strong>, Upcoming Scheduled Payment</h3>\n<p>\"Thank you for scheduling your payment of <strong>{{1}}</strong> for your <strong>{{2}}</strong> account on {{3}}</p>\n<p>visit your account if you would like to make any changes.\"</p>\n<img src=\"https://content.pstmn.io/575389ba-9b14-46ab-b447-1b087074d6c4/aW1hZ2UucG5n\" alt height=\"467\" width=\"818\" />\n\n<p>Please Note, In this Template, placeholders such as <code>{{1}}</code> in header &amp; <code>{{1}}</code>, <code>{{2}}</code> variable are used in body to represent dynamic values within the message template. These placeholders can be replaced with specific values as needed to customize the message for each recipient.</p>\n<p>To send a Dynamic Template message with these placeholders, use the following URL:</p>\n<p>[<a href=\"https://wa.sendpk.com/api/send.php?api_key=API_KEY&amp;template_id=TEMPLATE_ID&amp;template_data=%5B%7B%22mobile%22:%22RECIPIENT_NUMBER%22,%22header%22:%7B%22type%22:%22text%22,%22text%22:%22Luqman%20Rasul%22%7D,%22body%22:%5B%7B%22type%22:%22text%22,%22text%22:%22$%20180%22%7D,%7B%22type%22:%22text%22,%22text%22:%22CS%20Mutual%20Debit%20Plus%22%7D,%7B%22type%22:%22text%22,%22text%22:%22Jan%201,%202024%22%7D%5D%7D%5D%5D(https://wa.sendpk.com/api/send.php?api_key=API_KEY&amp;template_id=TEMPLATE_ID&amp;template_data=%5B%7B%22mobile%22:%22RECIPIENT_NUMBER%22,%22header%22:%7B%22type%22:%22text%22,%22text%22:%22Luqman%20Rasul%22%7D,%22body%22:%5B%7B%22type%22:%22text%22,%22text%22:%22$%20180%22%7D,%7B%22type%22:%22text%22,%22text%22:%22CS%20Mutual%20Debit%20Plus%22%7D,%7B%22type%22:%22text%22,%22text%22:%22Jan%201,%202024%22%7D%5D%7D%5D)\">https://wa.sendpk.com/api/send.php?api_key=API_KEY&amp;template_id=TEMPLATE_ID&amp;template_data=[{\"mobile\":\"RECIPIENT_NUMBER\",\"header\":{\"type\":\"text\",\"text\":\"Luqman%20Rasul\"},\"body\":[{\"type\":\"text\",\"text\":\"$%20180\"},{\"type\":\"text\",\"text\":\"CS%20Mutual%20Debit%20Plus\"},{\"type\":\"text\",\"text\":\"Jan%201,%202024\"}]}]](https://wa.sendpk.com/api/send.php?api_key=API_KEY&amp;template_id=TEMPLATE_ID&amp;template_data=%5B%7B%22mobile%22:%22RECIPIENT_NUMBER%22,%22header%22:%7B%22type%22:%22text%22,%22text%22:%22Luqman%20Rasul%22%7D,%22body%22:%5B%7B%22type%22:%22text%22,%22text%22:%22$%20180%22%7D,%7B%22type%22:%22text%22,%22text%22:%22CS%20Mutual%20Debit%20Plus%22%7D,%7B%22type%22:%22text%22,%22text%22:%22Jan%201,%202024%22%7D%5D%7D%5D)</a></p>\n<p>StartFragmentarameter <strong>template_data</strong> Sample: </p>\n<p><code>[{\"mobile\":\"RECIPIENT_NUMBER\",\"header\":{\"type\":\"text\",\"text\":\"Luqman Rasul\"},\"body\":[{\"type\":\"text\",\"text\":\"$ 180\"},{\"type\":\"text\",\"text\":\"CS Mutual Debit Plus\"},{\"type\":\"text\",\"text\":\"Jan 1, 2024\"}]}]</code></p>\n<p><strong>Successful Response</strong></p>\n<p>{\"success\":\"true\",\"method\":\"API\",\"message_type\":\"TEMPLATE\",\"total_price\":\"1\",\"total_gsm\":\"1\",\"remaining_credit\":\"906\",\"results\":[{\"status\":\"OK\",\"id\":\"8ed138a8-d9dd-41c8-833d-d314c269493e\",\"mobile\":\"9231341XXXX\"}]}</p>\n<img src=\"https://content.pstmn.io/f92f1b29-64bb-44e2-a5eb-59b462b98cec/aW1hZ2UucG5n\" alt height=\"1432\" width=\"1243\" />","urlObject":{"protocol":"https","path":["api","send.php"],"host":["wa","sendpk","com"],"query":[],"variable":[]}},"response":[{"id":"52d034ff-f91c-42f1-a8a6-3d1442422fcc","name":"Header, Body, Footer Template API","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"api_key","value":"{{API_KEY}}","type":"text"},{"key":"template_id","value":"{{template_data}}","type":"text"},{"key":"template_data","value":"[{\"mobile\":\"{{RECIPIENT_NUMBER}}\",\"header\":{\"type\":\"text\",\"text\":\"{{Luqman Rasul}}\"},\"body\":[{\"type\":\"text\",\"text\":\"{{$ 180}}\"},{\"type\":\"text\",\"text\":\"{{CS Mutual Debit Plus}}\"},{\"type\":\"text\",\"text\":\"{{Jan 1, 2024}}\"}]}]","type":"text"}]},"url":"https://wa.sendpk.com/api/send.php"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": \"true\",\n    \"method\": \"API\",\n    \"message_type\": \"TEMPLATE\",\n    \"total_price\": \"1\",\n    \"total_gsm\": \"1\",\n    \"remaining_credit\": \"906\",\n    \"results\": [\n        {\n            \"status\": \"OK\",\n            \"id\": \"8f2f766f-66b9-4ed1-8e70-b863873b60ab\",\n            \"mobile\": \"923134126153\"\n        }\n    ]\n}"}],"_postman_id":"ae637d1e-4974-4cdb-bf1a-0bbb24f40b58"},{"name":"Header, Body, Footer, Button Template API","id":"66151b7a-df8a-4b9b-b230-3297942eeba4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"api_key","value":"{{api_key}}","type":"text"},{"key":"template_id","value":"{{template_id}}","type":"text"},{"key":"template_data","value":"[{\"mobile\":\"{{RECIPIENT_NUMBER}}\",\"header\":{\"type\":\"text\",\"text\":\"{{header_variable_1}}\"},\"body\":[{\"type\":\"text\",\"text\":\"{{body_variable_1}}\"},{\"type\":\"text\",\"text\":\"{{body_variable_2}}\"},{\"type\":\"text\",\"text\":\"{{body_variable_3}}\"}],\"button\":[{\"type\":\"url\",\"text\":\"{{/url-trackering-address/}}\"}]}]","type":"text"}]},"url":"https://wa.sendpk.com/api/send.php","description":"<h1 id=\"header-body-footer-button-template-api\">Header, Body, Footer, Button Template API</h1>\n<p>A WhatsApp template can consist of 4 key elements: Header, Body, Footer &amp; Button. The Body is mandatory, while the Header , Footer &amp; Button are optional. The Header allows for a maximum of <strong>60</strong> characters and can include <strong>1</strong> dynamic variable if it consists of text. In contrast, the Body supports up to <strong>1024 characters</strong> and can accommodate over <strong>50</strong> dynamic variables, making it the most flexible section. The Footer, like the Header, is limited to <strong>60 characters</strong> but does not support any dynamic variables. Up to <strong>13</strong>, buttons including <strong>2</strong> website buttons, <strong>1</strong> call button, &amp; <strong>10</strong> quick reply buttons.<br />Please ensure that these specifications are adhered to in order to create a valid template.</p>\n<p>In this template, we will send a message that consists of three main elements: a <strong>header</strong>, a <strong>body</strong>, and a <strong>footer</strong>.</p>\n<p>To Send A Template Message First Of All We Need To Approve An Template From Whatsapp</p>\n<p>For Example, We Have Approved The Following Template Message:</p>\n<h3 id=\"order-shipped-order-id-1\">Order shipped, Order ID <strong>{{1}}</strong></h3>\n<p><strong>{{1}}</strong>, your order has shipped!<br />Your tracking number is <strong>{{2}}</strong>.<br />Estimated delivery is <strong>{{3}}</strong>.</p>\n<p>We will continue to provide updates on this shipment.</p>\n<img src=\"https://content.pstmn.io/c77651c2-3c9c-4b64-87b8-5e895c656677/aW1hZ2UucG5n\" alt height=\"631\" width=\"809\" />\n\n<p>Please Note, In this Template, placeholders such as <code>{{1}}</code> in header &amp; <code>{{1}}</code>, <code>{{2}}</code> &amp; <code>{{3}}</code> variable are used in body to represent dynamic values within the message template. These placeholders can be replaced with specific values as needed to customize the message for each recipient  </p>\n<p>To send a Dynamic Template message with these placeholders &amp; buttons, use the following URL:  </p>\n<p>[<a href=\"https://wa.sendpk.com/api/send.php?api_key=API_KEY&amp;template_id=TEMPLATE_ID&amp;template_data=%5B%7B%22mobile%22:%22RECIPIENT_NUMBER%22,%22header%22:%7B%22type%22:%22text%22,%22text%22:%2266457%22%7D,%22body%22:%5B%7B%22type%22:%22text%22,%22text%22:%22Mubashar\">https://wa.sendpk.com/api/send.php?api_key=API_KEY&amp;template_id=TEMPLATE_ID&amp;template_data=[{\"mobile\":\"RECIPIENT_NUMBER\",\"header\":{\"type\":\"text\",\"text\":\"66457\"},\"body\":[{\"type\":\"text\",\"text\":\"Mubashar</a> Shahzad\"},{\"type\":\"text\",\"text\":\"3434656-43434-33\"},{\"type\":\"text\",\"text\":\"22 December 2024\"}],\"button\":[{\"type\":\"url\",\"text\":\"/url-trackering-address/\"}]}]<br /><br />](<a href=\"https://wa.sendpk.com/api/send.php?api_key=API_KEY&amp;template_id=TEMPLATE_ID&amp;template_data=%5B%7B%22mobile%22:%22RECIPIENT_NUMBER%22,%22header%22:%7B%22type%22:%22text%22,%22text%22:%2266457%22%7D,%22body%22:%5B%7B%22type%22:%22text%22,%22text%22:%22Mubashar%20Shahzad%22%7D,%7B%22type%22:%22text%22,%22text%22:%223434656-43434-33%22%7D,%7B%22type%22:%22text%22,%22text%22:%2222%20December%202024%22%7D%5D,%22button%22:%5B%7B%22type%22:%22url%22,%22text%22:%22/url-trackering-address/%22%7D%5D%7D%5D)Parameter\">https://wa.sendpk.com/api/send.php?api_key=API_KEY&amp;template_id=TEMPLATE_ID&amp;template_data=%5B%7B%22mobile%22:%22RECIPIENT_NUMBER%22,%22header%22:%7B%22type%22:%22text%22,%22text%22:%2266457%22%7D,%22body%22:%5B%7B%22type%22:%22text%22,%22text%22:%22Mubashar%20Shahzad%22%7D,%7B%22type%22:%22text%22,%22text%22:%223434656-43434-33%22%7D,%7B%22type%22:%22text%22,%22text%22:%2222%20December%202024%22%7D%5D,%22button%22:%5B%7B%22type%22:%22url%22,%22text%22:%22/url-trackering-address/%22%7D%5D%7D%5D)Parameter</a> <strong>template_data</strong> Sample: <code>[{\"mobile\":\"RECIPIENT_NUMBER\",\"header\":{\"type\":\"text\",\"text\":\"66457\"},\"body\":[{\"type\":\"text\",\"text\":\"Mubashar Shahzad\"},{\"type\":\"text\",\"text\":\"3434656-43434-33\"},{\"type\":\"text\",\"text\":\"22 December 2024\"}],\"button\":[{\"type\":\"url\",\"text\":\"/url-trackering-address/\"}]}]</code>  </p>\n<p>**Successful Response<br />**{ \"success\": \"true\", \"method\": \"API\", \"message_type\": \"TEMPLATE\", \"total_price\": \"1\", \"total_gsm\": \"1\", \"remaining_credit\": \"906\", \"results\": [ { \"status\": \"OK\", \"id\": \"8ed138a8-d9dd-41c8-833d-d314c269493e\", \"mobile\": \"9231341XXXX\" } ] }  </p>\n<img src=\"https://content.pstmn.io/dbda827c-312b-4afc-9446-d01fa65b2682/aW1hZ2UucG5n\" alt height=\"804\" width=\"811\" />\n\n<p><strong>Please Note!</strong> When creating templates, it's important to understand that not all buttons need to be defined in the JSON under the button variable. Specifically, only the buttons that include dynamic website URLs should be mentioned there. Static buttons or buttons that do not change based on the content do not need to be included in the button variable. For example, if you have a static button in your template that links to a fixed URL, you don't need to mention it in the JSON. However, if the button's URL is dynamic and changes based on the content you're sending, then it should be included in the JSON. Let's say your main domain is '<a href=\"https://example.com/\">https://example.com/</a>', and you have a dynamic URL path that varies depending on the report you send. In such cases, you would specify this dynamic path in the JSON as follows  </p>\n<p>\"button\": [<br />{<br />\"type\": \"url\",<br />\"text\": \"/url-tracking-address/\"<br />}<br />]  </p>\n<p>Here, <code>'/url-tracking-address/'</code> is a dynamic part that will be added to the main domain, resulting in a complete URL like '<a href=\"https://example.com/url-tracking-address/\">https://example.com/url-tracking-address/</a>' This method allows you to customize URLs easily without hardcoding every possible button link directly into the template, giving you more flexibility in your messaging.</p>\n","urlObject":{"protocol":"https","path":["api","send.php"],"host":["wa","sendpk","com"],"query":[],"variable":[]}},"response":[{"id":"a54aa0fe-6b9f-439b-acd8-beee8e794997","name":"Header, Body, Footer, Button Template API","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"api_key","value":"{{api_key}}","type":"text"},{"key":"template_id","value":"{{template_id}}","type":"text"},{"key":"template_data","value":"[{\"mobile\":\"{{RECIPIENT_NUMBER}}\",\"header\":{\"type\":\"text\",\"text\":\"{{header_variable_1}}\"},\"body\":[{\"type\":\"text\",\"text\":\"{{body_variable_1}}\"},{\"type\":\"text\",\"text\":\"{{body_variable_2}}\"},{\"type\":\"text\",\"text\":\"{{body_variable_3}}\"}],\"button\":[{\"type\":\"url\",\"text\":\"{{/url-trackering-address/}}\"}]}]","type":"text"}]},"url":"https://wa.sendpk.com/api/send.php"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": \"true\",\n    \"method\": \"API\",\n    \"message_type\": \"TEMPLATE\",\n    \"total_price\": \"1\",\n    \"total_gsm\": \"1\",\n    \"remaining_credit\": \"906\",\n    \"results\": [\n        {\n            \"status\": \"OK\",\n            \"id\": \"8ed138a8-d9dd-41c8-833d-d314c269493e\",\n            \"mobile\": \"9231341XXXX\"\n        }\n    ]\n}"}],"_postman_id":"66151b7a-df8a-4b9b-b230-3297942eeba4"}]}