{"id":18951,"date":"2026-11-19T00:17:31","date_gmt":"2026-11-18T18:47:31","guid":{"rendered":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-send-template\/"},"modified":"2026-11-19T00:56:59","modified_gmt":"2026-11-18T19:26:59","slug":"whatsapp-api-send-template","status":"publish","type":"post","link":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-send-template\/","title":{"rendered":"Send WhatsApp template messages with the Fast2SMS API (message_id, numbers, variables)"},"content":{"rendered":"<p>To send a WhatsApp template message with the Fast2SMS API, call <code>https:\/\/www.fast2sms.com\/dev\/whatsapp<\/code> with your API key, the template&#8217;s <strong>Message ID<\/strong> (<code>message_id<\/code>), the mobile numbers and the variable values. This guide shows where to find each ID in the panel, the full parameter list, ready code in cURL, PHP, Python, Node.js, Java, C# and Go, and the errors you may see on the first try.<\/p>\n<aside class=\"f2s-cta\" aria-label=\"Get started with Fast2SMS\"><div class=\"f2s-cta__copy\"><strong class=\"f2s-cta__title\">Send your first WhatsApp template by API<\/strong><p>Connect your WhatsApp number, get a template approved and send it from your app with one API call.<\/p><\/div><div class=\"f2s-cta__actions\"><a class=\"f2s-cta__btn f2s-cta__btn--primary\" href=\"https:\/\/www.fast2sms.com\/\"><span>Sign up free<\/span> <span class=\"f2sh-btn__arrow\" aria-hidden=\"true\">&rarr;<\/span><\/a><a class=\"f2s-cta__btn f2s-cta__btn--ghost\" href=\"https:\/\/www.fast2sms.com\/meet\/\" target=\"_blank\" rel=\"noopener\">Book a free meeting<\/a><\/div><\/aside>\n<h2>Before you start<\/h2>\n<ul>\n<li>A WhatsApp number connected in Fast2SMS with the status <strong>Connected<\/strong>. A newly connected number can send only after 10 minutes.<\/li>\n<li>At least one template with the status <strong>APPROVED<\/strong>.<\/li>\n<li>Your Fast2SMS API key from <strong>API Key<\/strong> under UTILITY. See <a href=\"\/help\/api-key-find-reset\/\">how to find and reset your API key<\/a>.<\/li>\n<li>Enough wallet balance for all the numbers in the request.<\/li>\n<\/ul>\n<h2>How to send a WhatsApp template message by API<\/h2>\n<ol class=\"f2s-steps\">\n<li>\n<h3>Open your approved templates<\/h3>\n<p>Go to <strong>WhatsApp Manager<\/strong> and click <strong>Templates<\/strong>. Each card shows the category, the language, the <strong>Message ID<\/strong>, the name, the <strong>Sender Number<\/strong> and Meta&#8217;s <strong>Template ID<\/strong>. Only cards with the green APPROVED badge can be sent.<\/p>\n<figure class=\"f2s-shot\"><img src=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/whatsapp-templates-list-approved-hd-2-scaled.webp\" width=\"1440\" height=\"900\" loading=\"lazy\" decoding=\"async\" alt=\"WhatsApp Manager Templates page with three approved template cards showing Message ID, Name, Sender Number and Template ID\"><figcaption>The Message ID on each card is the value you pass as message_id.<\/figcaption><\/figure>\n<div class=\"f2s-note\">\n<p>Use the <strong>Message ID<\/strong> (for example 20005), not the long Meta <strong>Template ID<\/strong>. The API rejects Meta&#8217;s ID with &#8220;WhatsApp Template ID (message_id) is invalid or not approved.&#8221;<\/p>\n<\/div>\n<\/li>\n<li>\n<h3>Copy the sample code<\/h3>\n<p>Click <strong>Sample Code<\/strong> on the template card. Pick your language in <strong>Select Language<\/strong> and click <strong>Copy<\/strong>. The sample already has the right <code>message_id<\/code> and one <code>variables_values<\/code> slot per variable.<\/p>\n<figure class=\"f2s-shot\"><img src=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/whatsapp-template-sample-code-hd-2-scaled.webp\" width=\"1440\" height=\"900\" loading=\"lazy\" decoding=\"async\" alt=\"Sample Code popup on a WhatsApp template with cURL selected, showing the dev\/whatsapp URL with authorization, message_id, numbers and variables_values\"><figcaption>Sample Code gives a ready request for that template.<\/figcaption><\/figure>\n<\/li>\n<li>\n<h3>Note the phone_number_id (optional)<\/h3>\n<p>Open <strong>WhatsApp Manager<\/strong> and click <strong>Numbers<\/strong>. The <strong>Phone Number ID<\/strong> is under Business IDs. You need it only when you want to choose the sending number. If you leave it out, a connected number of the template&#8217;s WhatsApp Business Account is used.<\/p>\n<figure class=\"f2s-shot\"><img src=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/whatsapp-manager-numbers-hd-16-scaled.webp\" width=\"1440\" height=\"900\" loading=\"lazy\" decoding=\"async\" alt=\"WhatsApp Manager Numbers tab with Business Portfolio ID, WABA ID and Phone Number ID for a connected and a pending number\"><figcaption>The Phone Number ID is listed for every number.<\/figcaption><\/figure>\n<\/li>\n<li>\n<h3>Send the request from your server<\/h3>\n<p>Put your API key in the <code>authorization<\/code> header and send <code>message_id<\/code>, <code>numbers<\/code> and <code>variables_values<\/code>. Code for each language is below.<\/p>\n<\/li>\n<li>\n<h3>Check the result<\/h3>\n<p>A successful reply has <code>\"return\":true<\/code> and a <code>request_id<\/code> that starts with W. Save it. You need it to fetch the delivery report, and you can search it in <strong>Delivery Report<\/strong> and <strong>API Logs<\/strong>.<\/p>\n<\/li>\n<\/ol>\n<h2>Parameters<\/h2>\n<div class=\"f2s-facts\">\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Required<\/th>\n<th>What to send<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>authorization<\/code> (header)<\/td>\n<td>Yes<\/td>\n<td>Your Fast2SMS API key<\/td>\n<\/tr>\n<tr>\n<td><code>message_id<\/code><\/td>\n<td>Yes<\/td>\n<td>The template&#8217;s Message ID from the template card. Must be an approved template of your account<\/td>\n<\/tr>\n<tr>\n<td><code>numbers<\/code><\/td>\n<td>Yes<\/td>\n<td>Indian mobile numbers, comma-separated. 10 digits starting with 6 to 9; a leading 91 or +91 is accepted<\/td>\n<\/tr>\n<tr>\n<td><code>variables_values<\/code><\/td>\n<td>If the template has variables<\/td>\n<td>Values for {{1}}, {{2}} and so on, in order, separated by <code>|<\/code>. Up to 1,000 characters in total<\/td>\n<\/tr>\n<tr>\n<td><code>phone_number_id<\/code><\/td>\n<td>No<\/td>\n<td>The sending number&#8217;s Phone Number ID. Must be connected<\/td>\n<\/tr>\n<tr>\n<td><code>media_url<\/code><\/td>\n<td>For media headers<\/td>\n<td>Public link to the header image, video or PDF. See <a href=\"\/help\/whatsapp-api-media-template\/\">sending media templates<\/a><\/td>\n<\/tr>\n<tr>\n<td><code>document_filename<\/code><\/td>\n<td>No<\/td>\n<td>File name shown for a PDF header<\/td>\n<\/tr>\n<tr>\n<td><code>schedule_time<\/code><\/td>\n<td>No<\/td>\n<td>Send later: <code>DD-MM-YYYY-HH-MM<\/code> in IST, or a Unix timestamp, at least 1 minute ahead<\/td>\n<\/tr>\n<tr>\n<td><code>sms_details<\/code><\/td>\n<td>No<\/td>\n<td><code>1<\/code> adds the rate, count and category to the reply<\/td>\n<\/tr>\n<tr>\n<td><code>udf1<\/code>, <code>udf2<\/code>, <code>udf3<\/code><\/td>\n<td>No<\/td>\n<td>Your own tracking values, returned in <a href=\"\/help\/fast2sms-webhooks-setup-delivery-reports\/\">webhooks<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2>Code examples<\/h2>\n<p>All examples send the template with Message ID 20005 and one variable to 9999999999. Replace YOUR_API_KEY with your key. Keep the key on your server, never in a mobile app or web page.<\/p>\n<h3>cURL (POST, JSON)<\/h3>\n<pre><code class=\"language-bash\">curl -X POST \"https:\/\/www.fast2sms.com\/dev\/whatsapp\" \\\n  -H \"authorization: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\/json\" \\\n  -d '{\"message_id\":\"20005\",\"numbers\":\"9999999999\",\"variables_values\":\"1499\"}'<\/code><\/pre>\n<h3>cURL (GET)<\/h3>\n<pre><code class=\"language-bash\">curl -G \"https:\/\/www.fast2sms.com\/dev\/whatsapp\" \\\n  -H \"authorization: YOUR_API_KEY\" \\\n  --data-urlencode \"message_id=20005\" \\\n  --data-urlencode \"numbers=9999999999\" \\\n  --data-urlencode \"variables_values=1499\"<\/code><\/pre>\n<h3>PHP<\/h3>\n<pre><code class=\"language-php\">&lt;?php\n$payload = [\n    \"message_id\"       =&gt; \"20005\",\n    \"numbers\"          =&gt; \"9999999999\",\n    \"variables_values\" =&gt; \"1499\",\n];\n$ch = curl_init(\"https:\/\/www.fast2sms.com\/dev\/whatsapp\");\ncurl_setopt_array($ch, [\n    CURLOPT_POST           =&gt; true,\n    CURLOPT_RETURNTRANSFER =&gt; true,\n    CURLOPT_HTTPHEADER     =&gt; [\"authorization: YOUR_API_KEY\", \"Content-Type: application\/json\"],\n    CURLOPT_POSTFIELDS     =&gt; json_encode($payload),\n    CURLOPT_TIMEOUT        =&gt; 30,\n]);\n$data = json_decode(curl_exec($ch), true);\ncurl_close($ch);\n\nif (($data[\"return\"] ?? false) === true) {\n    echo \"Accepted, request ID: \" . $data[\"request_id\"];\n} else {\n    print_r($data[\"errors\"] ?? $data);\n}<\/code><\/pre>\n<h3>Python<\/h3>\n<pre><code class=\"language-python\">import requests\n\nr = requests.post(\n    \"https:\/\/www.fast2sms.com\/dev\/whatsapp\",\n    headers={\"authorization\": \"YOUR_API_KEY\"},\n    json={\"message_id\": \"20005\", \"numbers\": \"9999999999\", \"variables_values\": \"1499\"},\n    timeout=30,\n)\ndata = r.json()\nif data.get(\"return\"):\n    print(\"Accepted, request ID:\", data[\"request_id\"])\nelse:\n    print(\"Error:\", data.get(\"errors\") or data)<\/code><\/pre>\n<h3>Node.js<\/h3>\n<pre><code class=\"language-javascript\">const res = await fetch(\"https:\/\/www.fast2sms.com\/dev\/whatsapp\", {\n  method: \"POST\",\n  headers: {\n    authorization: process.env.FAST2SMS_API_KEY,\n    \"Content-Type\": \"application\/json\",\n  },\n  body: JSON.stringify({ message_id: \"20005\", numbers: \"9999999999\", variables_values: \"1499\" }),\n});\nconst data = await res.json();\nif (data.return === true) {\n  console.log(\"Accepted, request ID:\", data.request_id);\n} else {\n  console.log(\"Error:\", data.errors || data);\n}<\/code><\/pre>\n<h3>Java (11 or later)<\/h3>\n<pre><code class=\"language-java\">import java.net.URI;\nimport java.net.http.*;\n\npublic class SendWhatsApp {\n    public static void main(String[] args) throws Exception {\n        String body = \"{\\\"message_id\\\":\\\"20005\\\",\\\"numbers\\\":\\\"9999999999\\\",\\\"variables_values\\\":\\\"1499\\\"}\";\n        HttpRequest req = HttpRequest.newBuilder(URI.create(\"https:\/\/www.fast2sms.com\/dev\/whatsapp\"))\n                .header(\"authorization\", \"YOUR_API_KEY\")\n                .header(\"Content-Type\", \"application\/json\")\n                .POST(HttpRequest.BodyPublishers.ofString(body))\n                .build();\n        HttpResponse&lt;String&gt; res = HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofString());\n        System.out.println(res.statusCode() + \" \" + res.body());\n    }\n}<\/code><\/pre>\n<h3>C# (.NET 6 or later)<\/h3>\n<pre><code class=\"language-csharp\">using System.Net.Http;\nusing System.Text;\n\nvar client = new HttpClient();\nvar req = new HttpRequestMessage(HttpMethod.Post, \"https:\/\/www.fast2sms.com\/dev\/whatsapp\");\nreq.Headers.TryAddWithoutValidation(\"authorization\", \"YOUR_API_KEY\");\nreq.Content = new StringContent(\n    \"{\\\"message_id\\\":\\\"20005\\\",\\\"numbers\\\":\\\"9999999999\\\",\\\"variables_values\\\":\\\"1499\\\"}\",\n    Encoding.UTF8, \"application\/json\");\nvar res = await client.SendAsync(req);\nConsole.WriteLine(await res.Content.ReadAsStringAsync());<\/code><\/pre>\n<h3>Go<\/h3>\n<pre><code class=\"language-go\">package main\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"net\/http\"\n\t\"strings\"\n)\n\nfunc check(err error) {\n\tif err == nil {\n\t\treturn\n\t}\n\tlog.Fatal(err)\n}\n\nfunc main() {\n\tbody := `{\"message_id\":\"20005\",\"numbers\":\"9999999999\",\"variables_values\":\"1499\"}`\n\treq, err := http.NewRequest(\"POST\", \"https:\/\/www.fast2sms.com\/dev\/whatsapp\", strings.NewReader(body))\n\tcheck(err)\n\treq.Header.Set(\"authorization\", \"YOUR_API_KEY\")\n\treq.Header.Set(\"Content-Type\", \"application\/json\")\n\tres, err := http.DefaultClient.Do(req)\n\tcheck(err)\n\tdefer res.Body.Close()\n\tout, _ := io.ReadAll(res.Body)\n\tfmt.Println(res.StatusCode, string(out))\n}<\/code><\/pre>\n<aside class=\"f2s-cta\" aria-label=\"Get started with Fast2SMS\"><div class=\"f2s-cta__copy\"><strong class=\"f2s-cta__title\">Templates approved, API ready<\/strong><p>Fast2SMS gives you the Message ID, sample code and an Excel of ready API URLs for every approved template.<\/p><\/div><div class=\"f2s-cta__actions\"><a class=\"f2s-cta__btn f2s-cta__btn--primary\" href=\"https:\/\/www.fast2sms.com\/\"><span>Sign up free<\/span> <span class=\"f2sh-btn__arrow\" aria-hidden=\"true\">&rarr;<\/span><\/a><a class=\"f2s-cta__btn f2s-cta__btn--ghost\" href=\"https:\/\/www.fast2sms.com\/meet\/\" target=\"_blank\" rel=\"noopener\">Book a free meeting<\/a><\/div><\/aside>\n<h2>The response<\/h2>\n<p>Success comes with HTTP 200:<\/p>\n<pre><code class=\"language-json\">{\"return\":true,\"request_id\":\"Wa1B2c3D4e5F6g7\",\"message\":[\"Whatsapp Message sent successfully.\"]}<\/code><\/pre>\n<p>This means Fast2SMS accepted the request and queued it. It does not mean the message reached the phone. Delivery and read status come later in the delivery report, the WhatsApp DLR API and webhooks. See <a href=\"\/help\/whatsapp-api-delivery-report\/\">WhatsApp delivery and read status by API<\/a>.<\/p>\n<p>With <code>schedule_time<\/code> the message says the WhatsApp message was scheduled. An error has <code>\"return\":false<\/code> and an <code>errors<\/code> object that names the field, for example:<\/p>\n<pre><code class=\"language-json\">{\"return\":false,\"errors_keys\":[\"message_id\"],\"errors\":{\"message_id\":[\"WhatsApp Template ID (message_id) is invalid or not approved.\"]}}<\/code><\/pre>\n<h2>Find message_id and phone_number_id by API<\/h2>\n<p>If you manage many templates, fetch the IDs from your code instead of copying them by hand:<\/p>\n<pre><code class=\"language-bash\">curl \"https:\/\/www.fast2sms.com\/dev\/dlt_manager\/whatsapp?type=template\" \\\n  -H \"authorization: YOUR_API_KEY\"<\/code><\/pre>\n<p>The reply lists each number with its <code>waba_id<\/code>, <code>phone_number_id<\/code>, <code>number<\/code>, <code>quality_rating<\/code>, <code>messaging_limit<\/code> and <code>connection_status<\/code>. With <code>type=template<\/code> each number also has a <code>templates<\/code> list:<\/p>\n<pre><code class=\"language-json\">{\"success\":true,\"data\":[{\"waba_id\":\"100000000000001\",\"phone_number_id\":\"100000000000002\",\"number\":\"+91 90000 00001\",\n \"connection_status\":\"CONNECTED\",\"templates\":[{\"message_id\":20005,\"template_id\":\"1000000000000005\",\n \"template_name\":\"payment_completed\",\"category\":\"UTILITY\",\"status\":\"Approved\",\"language\":\"en\",\"var_count\":1}]}]}<\/code><\/pre>\n<p>Pass <code>message_id<\/code> from this list to the send API. <code>template_id<\/code> is Meta&#8217;s ID and is not used for sending. Use <code>type=number<\/code> to get only the numbers, and add <code>phone_number_id=...<\/code> to see one number.<\/p>\n<h2>Download every template as API URLs in Excel<\/h2>\n<p>Go to <strong>Account Setting<\/strong>, open <strong>API Excel<\/strong> and pick <strong>WhatsApp<\/strong>. <strong>Download Templates<\/strong> gives one row per template on a connected number, with the Message ID, variable count, media needs and a ready <code>api_url<\/code>. <strong>Download Session API<\/strong> gives samples for free-form replies.<\/p>\n<figure class=\"f2s-shot\"><img src=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/whatsapp-api-excel-2x-1-scaled.webp\" width=\"1440\" height=\"900\" loading=\"lazy\" decoding=\"async\" alt=\"Account Setting API Excel page with the WhatsApp tab open, showing WhatsApp Template API Excel and WhatsApp Session API Excel download buttons\"><figcaption>API Excel has ready request URLs for each approved template.<\/figcaption><\/figure>\n<div class=\"f2s-note f2s-note--warn\">\n<p>The Excel URLs carry your key as <code>?authorization=<\/code> in the link. That is handy for testing in a browser, but in your app send the key in the header so it does not end up in server and proxy logs.<\/p>\n<\/div>\n<h2>Variables, numbers and charges<\/h2>\n<ul>\n<li><strong>Variables:<\/strong> send values in the order of {{1}}, {{2}} in the body, separated by <code>|<\/code>. For &#8220;Hi {{1}}, your order {{2}} is shipped&#8221; send <code>variables_values=Rahul|ORD123<\/code>.<\/li>\n<li><strong>Authentication (OTP) templates:<\/strong> send only the code, for example <code>variables_values=482913<\/code>. Fast2SMS also puts it on the copy-code button. For OTP login flows with retries and verification, <a href=\"\/help\/smart-otp-whatsapp-otp-template\/\">Smart OTP on WhatsApp<\/a> does this work for you.<\/li>\n<li><strong>Numbers:<\/strong> the template API takes Indian mobile numbers only. If even one number in the list is invalid, the whole request is refused with &#8220;Mobile Number format is invalid:&#8221; followed by the bad numbers. Clean your list first.<\/li>\n<li><strong>Charges:<\/strong> each message is charged at your rate for the template&#8217;s category (Marketing, Utility or Authentication). The amount comes off your wallet when the message is queued. Failed messages are refunded automatically later. See <a href=\"\/help\/whatsapp-failed-message-charges-refund\/\">WhatsApp failed message charges and refunds<\/a> and the current rates on the <a href=\"https:\/\/www.fast2sms.com\/whatsapp-pricing\">WhatsApp pricing page<\/a>.<\/li>\n<\/ul>\n<h2>Common problems and fixes<\/h2>\n<h3>&#8220;WhatsApp Template ID (message_id) is invalid or not approved.&#8221;<\/h3>\n<p>The ID is not an approved template of this account. Use the Message ID from the template card, not Meta&#8217;s Template ID, and check that the card says APPROVED. A PAUSED or REJECTED template cannot be sent.<\/p>\n<h3>&#8220;WhatsApp Phone Number ID is invalid or not connected.&#8221;<\/h3>\n<p>The <code>phone_number_id<\/code> is wrong, belongs to another WhatsApp Business Account than the template, or the number is not Connected. Remove <code>phone_number_id<\/code> to let Fast2SMS pick a connected number of the template&#8217;s account, or reconnect the number.<\/p>\n<h3>&#8220;Messaging will be available 10 minutes after onboarding.&#8221;<\/h3>\n<p>The number was connected less than 10 minutes ago. Wait and try again.<\/p>\n<h3>&#8220;Insufficient wallet balance, you need at least \u20b9X&#8230;&#8221;<\/h3>\n<p>The cost of all numbers in the request is more than your balance. Recharge, or send to fewer numbers per call.<\/p>\n<h3>Error 412 &#8220;Invalid Authentication, Check Authorization Key&#8221;<\/h3>\n<p>The key is missing or wrong. Copy it again from <strong>API Key<\/strong> and send it in the <code>authorization<\/code> header without quotes or spaces. For all API errors see <a href=\"\/help\/whatsapp-api-errors\/\">Fast2SMS WhatsApp API errors<\/a>.<\/p>\n<h3>The API said success but the customer did not get the message<\/h3>\n<p>Check the delivery report. WhatsApp can still fail a message after it is accepted, for example when the number is not on WhatsApp. The reason is shown with a Meta error code. See <a href=\"\/help\/whatsapp-api-error-codes-list\/\">WhatsApp API error codes<\/a>.<\/p>\n<section class=\"f2s-faq\">\n<h2>Frequently asked questions<\/h2>\n<h3>What is message_id in the Fast2SMS WhatsApp API?<\/h3>\n<p>It is the Message ID shown on the template card in WhatsApp Manager, a short number such as 20005. It is not Meta&#8217;s Template ID.<\/p>\n<h3>Is phone_number_id required?<\/h3>\n<p>No. If you leave it out, the message goes from a connected number in the template&#8217;s WhatsApp Business Account. Send it when that account has more than one number and you want a specific one.<\/p>\n<h3>Can I send to many numbers in one call?<\/h3>\n<p>Yes. Put them in <code>numbers<\/code>, separated by commas. Every number must be a valid Indian mobile, or the whole request is refused.<\/p>\n<h3>Can I send a free text message without a template?<\/h3>\n<p>Only within 24 hours of the customer&#8217;s last message, with the session message API. See <a href=\"\/help\/whatsapp-api-session-message\/\">WhatsApp session message API<\/a>.<\/p>\n<h3>Does the API support GET and POST?<\/h3>\n<p>Yes. Both work. POST with a JSON body is easier to read and keeps values out of URLs.<\/p>\n<h3>Can I schedule a WhatsApp template by API?<\/h3>\n<p>Yes. Add <code>schedule_time<\/code> as <code>DD-MM-YYYY-HH-MM<\/code> in IST or as a Unix timestamp, at least 1 minute in the future.<\/p>\n<h3>Can I send to international numbers?<\/h3>\n<p>Not with this API at the time of writing. It accepts Indian mobile numbers only.<\/p>\n<\/section>\n<aside class=\"f2s-cta\" aria-label=\"Get started with Fast2SMS\"><div class=\"f2s-cta__copy\"><strong class=\"f2s-cta__title\">Start sending WhatsApp from your app<\/strong><p>Sign up for Fast2SMS, connect your number with Meta and send approved templates by API in minutes.<\/p><\/div><div class=\"f2s-cta__actions\"><a class=\"f2s-cta__btn f2s-cta__btn--primary\" href=\"https:\/\/www.fast2sms.com\/\"><span>Sign up free<\/span> <span class=\"f2sh-btn__arrow\" aria-hidden=\"true\">&rarr;<\/span><\/a><a class=\"f2s-cta__btn f2s-cta__btn--ghost\" href=\"https:\/\/www.fast2sms.com\/meet\/\" target=\"_blank\" rel=\"noopener\">Book a free meeting<\/a><\/div><\/aside>\n<h2>Related guides<\/h2>\n<ul>\n<li><a href=\"\/help\/create-whatsapp-template-fast2sms\/\">How to create a WhatsApp template in Fast2SMS<\/a><\/li>\n<li><a href=\"\/help\/whatsapp-template-status-meaning\/\">WhatsApp template status meaning<\/a><\/li>\n<li><a href=\"\/help\/whatsapp-business-api-onboarding-fast2sms\/\">Connect your number to WhatsApp Business API<\/a><\/li>\n<li><a href=\"\/help\/api-key-find-reset\/\">Find, view and reset your Fast2SMS API key<\/a><\/li>\n<li><a href=\"https:\/\/www.fast2sms.com\/help\/whatsapp-message-api\/\">WhatsApp Message API overview<\/a><\/li>\n<li><a href=\"https:\/\/www.fast2sms.com\/whatsapp-api\">Fast2SMS WhatsApp API<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>To send a WhatsApp template message with the Fast2SMS API, call https:\/\/www.fast2sms.com\/dev\/whatsapp with your API key, the template&#8217;s Message ID (message_id), the mobile numbers and the variable values. This guide shows where to find each ID in the panel, the full parameter list, ready code in cURL, PHP, Python, Node.js, Java, C# and Go, and [&hellip;]<\/p>\n","protected":false},"featured_media":18945,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,24],"tags":[],"class_list":["post-18951","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-api","category-whatsapp"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>WhatsApp Template Message API: Send by API | Fast2SMS<\/title>\n<meta name=\"description\" content=\"Send an approved WhatsApp template with the Fast2SMS API: find message_id, pass numbers and variables, with code in cURL, PHP, Python, Node.js and more.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.fast2sms.com\/help\/whatsapp-api-send-template\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WhatsApp Template Message API: Send by API | Fast2SMS\" \/>\n<meta property=\"og:description\" content=\"Send an approved WhatsApp template with the Fast2SMS API: find message_id, pass numbers and variables, with code in cURL, PHP, Python, Node.js and more.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.fast2sms.com\/help\/whatsapp-api-send-template\/\" \/>\n<meta property=\"og:site_name\" content=\"Fast2SMS\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Fast2SMS\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-18T18:47:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-18T19:26:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/whatsapp-templates-list-approved-hd-2-scaled.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fast2sms\" \/>\n<meta name=\"twitter:site\" content=\"@fast2sms\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-send-template\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-send-template\\\/\"},\"author\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#organization\"},\"headline\":\"Send WhatsApp template messages with the Fast2SMS API (message_id, numbers, variables)\",\"datePublished\":\"2026-11-18T18:47:31+00:00\",\"dateModified\":\"2026-11-18T19:26:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-send-template\\\/\"},\"wordCount\":1518,\"publisher\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-send-template\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/whatsapp-templates-list-approved-hd-2-scaled.webp\",\"articleSection\":[\"API\",\"WhatsApp\"],\"inLanguage\":\"en-IN\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-send-template\\\/\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-send-template\\\/\",\"name\":\"WhatsApp Template Message API: Send by API | Fast2SMS\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-send-template\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-send-template\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/whatsapp-templates-list-approved-hd-2-scaled.webp\",\"datePublished\":\"2026-11-18T18:47:31+00:00\",\"dateModified\":\"2026-11-18T19:26:59+00:00\",\"description\":\"Send an approved WhatsApp template with the Fast2SMS API: find message_id, pass numbers and variables, with code in cURL, PHP, Python, Node.js and more.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-send-template\\\/#breadcrumb\"},\"inLanguage\":\"en-IN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-send-template\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-IN\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-send-template\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/whatsapp-templates-list-approved-hd-2-scaled.webp\",\"contentUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/whatsapp-templates-list-approved-hd-2-scaled.webp\",\"width\":2560,\"height\":1600,\"caption\":\"WhatsApp Manager Templates page with three approved template cards showing Message ID, Name, Sender Number and Template ID\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-send-template\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"API\",\"item\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/api\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Send WhatsApp template messages with the Fast2SMS API (message_id, numbers, variables)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/#website\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/\",\"name\":\"Fast2SMS\",\"description\":\"Help\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#organization\"},\"inLanguage\":\"en-IN\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#organization\",\"name\":\"Fast2SMS\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#logo\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/Fast2SMS.png\",\"contentUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/Fast2SMS.png\",\"caption\":\"Fast2SMS\"},\"image\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#logo\"},\"email\":\"support@fast2sms.com\",\"telephone\":\"+91-6262778822\",\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/Fast2SMS\",\"https:\\\/\\\/www.instagram.com\\\/fast2sms\",\"https:\\\/\\\/x.com\\\/fast2sms\",\"https:\\\/\\\/www.youtube.com\\\/Fast2SMSofficial\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/fast2sms\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WhatsApp Template Message API: Send by API | Fast2SMS","description":"Send an approved WhatsApp template with the Fast2SMS API: find message_id, pass numbers and variables, with code in cURL, PHP, Python, Node.js and more.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-send-template\/","og_locale":"en_US","og_type":"article","og_title":"WhatsApp Template Message API: Send by API | Fast2SMS","og_description":"Send an approved WhatsApp template with the Fast2SMS API: find message_id, pass numbers and variables, with code in cURL, PHP, Python, Node.js and more.","og_url":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-send-template\/","og_site_name":"Fast2SMS","article_publisher":"https:\/\/www.facebook.com\/Fast2SMS\/","article_published_time":"2026-11-18T18:47:31+00:00","article_modified_time":"2026-11-18T19:26:59+00:00","og_image":[{"width":2560,"height":1600,"url":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/whatsapp-templates-list-approved-hd-2-scaled.webp","type":"image\/webp"}],"twitter_card":"summary_large_image","twitter_creator":"@fast2sms","twitter_site":"@fast2sms","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-send-template\/#article","isPartOf":{"@id":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-send-template\/"},"author":{"@id":"https:\/\/www.fast2sms.com\/#organization"},"headline":"Send WhatsApp template messages with the Fast2SMS API (message_id, numbers, variables)","datePublished":"2026-11-18T18:47:31+00:00","dateModified":"2026-11-18T19:26:59+00:00","mainEntityOfPage":{"@id":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-send-template\/"},"wordCount":1518,"publisher":{"@id":"https:\/\/www.fast2sms.com\/#organization"},"image":{"@id":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-send-template\/#primaryimage"},"thumbnailUrl":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/whatsapp-templates-list-approved-hd-2-scaled.webp","articleSection":["API","WhatsApp"],"inLanguage":"en-IN"},{"@type":"WebPage","@id":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-send-template\/","url":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-send-template\/","name":"WhatsApp Template Message API: Send by API | Fast2SMS","isPartOf":{"@id":"https:\/\/www.fast2sms.com\/help\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-send-template\/#primaryimage"},"image":{"@id":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-send-template\/#primaryimage"},"thumbnailUrl":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/whatsapp-templates-list-approved-hd-2-scaled.webp","datePublished":"2026-11-18T18:47:31+00:00","dateModified":"2026-11-18T19:26:59+00:00","description":"Send an approved WhatsApp template with the Fast2SMS API: find message_id, pass numbers and variables, with code in cURL, PHP, Python, Node.js and more.","breadcrumb":{"@id":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-send-template\/#breadcrumb"},"inLanguage":"en-IN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.fast2sms.com\/help\/whatsapp-api-send-template\/"]}]},{"@type":"ImageObject","inLanguage":"en-IN","@id":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-send-template\/#primaryimage","url":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/whatsapp-templates-list-approved-hd-2-scaled.webp","contentUrl":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/whatsapp-templates-list-approved-hd-2-scaled.webp","width":2560,"height":1600,"caption":"WhatsApp Manager Templates page with three approved template cards showing Message ID, Name, Sender Number and Template ID"},{"@type":"BreadcrumbList","@id":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-send-template\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.fast2sms.com\/help\/"},{"@type":"ListItem","position":2,"name":"API","item":"https:\/\/www.fast2sms.com\/help\/api\/"},{"@type":"ListItem","position":3,"name":"Send WhatsApp template messages with the Fast2SMS API (message_id, numbers, variables)"}]},{"@type":"WebSite","@id":"https:\/\/www.fast2sms.com\/help\/#website","url":"https:\/\/www.fast2sms.com\/help\/","name":"Fast2SMS","description":"Help","publisher":{"@id":"https:\/\/www.fast2sms.com\/#organization"},"inLanguage":"en-IN"},{"@type":"Organization","@id":"https:\/\/www.fast2sms.com\/#organization","name":"Fast2SMS","url":"https:\/\/www.fast2sms.com\/","logo":{"@type":"ImageObject","@id":"https:\/\/www.fast2sms.com\/#logo","url":"https:\/\/www.fast2sms.com\/Fast2SMS.png","contentUrl":"https:\/\/www.fast2sms.com\/Fast2SMS.png","caption":"Fast2SMS"},"image":{"@id":"https:\/\/www.fast2sms.com\/#logo"},"email":"support@fast2sms.com","telephone":"+91-6262778822","sameAs":["https:\/\/www.facebook.com\/Fast2SMS","https:\/\/www.instagram.com\/fast2sms","https:\/\/x.com\/fast2sms","https:\/\/www.youtube.com\/Fast2SMSofficial","https:\/\/www.linkedin.com\/company\/fast2sms"]}]}},"_links":{"self":[{"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/posts\/18951","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/comments?post=18951"}],"version-history":[{"count":1,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/posts\/18951\/revisions"}],"predecessor-version":[{"id":19480,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/posts\/18951\/revisions\/19480"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/media\/18945"}],"wp:attachment":[{"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/media?parent=18951"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/categories?post=18951"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/tags?post=18951"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}