{"id":18279,"date":"2026-11-18T23:54:31","date_gmt":"2026-11-18T18:24:31","guid":{"rendered":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-media-template\/"},"modified":"2026-11-19T00:56:56","modified_gmt":"2026-11-18T19:26:56","slug":"whatsapp-api-media-template","status":"publish","type":"post","link":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-media-template\/","title":{"rendered":"Send a WhatsApp template with image, video or PDF by API (media_url)"},"content":{"rendered":"<p>To send a WhatsApp template with an image, video or PDF header through the Fast2SMS API, add <code>media_url<\/code> to the normal template request: a public link to the file. For a PDF you can also send <code>document_filename<\/code>, the name the customer sees. This guide covers the file types and sizes the API accepts, how to host the file so the link works, and code in cURL, PHP, Python and Node.js.<\/p>\n<aside class=\"f2s-cta\" aria-label=\"Get started with Fast2SMS\"><div class=\"f2s-cta__copy\"><strong class=\"f2s-cta__title\">Send image and PDF templates by API<\/strong><p>Share offers, invoices and tickets on WhatsApp with a media header, straight from your app.<\/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>An approved template whose header is <strong>Image<\/strong>, <strong>Video<\/strong> or <strong>Document<\/strong>. You choose the header type when you create the template; see <a href=\"\/help\/create-whatsapp-template-fast2sms\/\">how to create a WhatsApp template<\/a>.<\/li>\n<li>The template&#8217;s <strong>Message ID<\/strong> from <strong>WhatsApp Manager<\/strong>, <strong>Templates<\/strong>.<\/li>\n<li>The file on a public web address (your website, a CDN or cloud storage with public read).<\/li>\n<li>Your <a href=\"\/help\/api-key-find-reset\/\">API key<\/a>. The basics of the template API are in <a href=\"\/help\/whatsapp-api-send-template\/\">send WhatsApp template messages by API<\/a>.<\/li>\n<\/ul>\n<h2>Step by step<\/h2>\n<ol class=\"f2s-steps\">\n<li>\n<h3>Find the media template and its Message ID<\/h3>\n<p>Open <strong>WhatsApp Manager<\/strong>, then <strong>Templates<\/strong>. A template with a media header shows the header in the phone preview. Note its <strong>Message ID<\/strong> and count the variables in the body.<\/p>\n<figure class=\"f2s-shot\"><img src=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/whatsapp-templates-list-page2-hd-scaled.webp\" width=\"1440\" height=\"900\" loading=\"lazy\" decoding=\"async\" alt=\"Templates page with an approved marketing template festive_sale_offer that has an image header, Message ID 20001 and two body variables\"><figcaption>The festive_sale_offer template has an image header and two variables.<\/figcaption><\/figure>\n<\/li>\n<li>\n<h3>Upload the file and copy a direct link<\/h3>\n<p>Put the file where anyone can open it without logging in. Open the link in a private browser window: it must show or download the file itself, not a preview or login page.<\/p>\n<\/li>\n<li>\n<h3>Send the request with media_url<\/h3>\n<p>Send <code>message_id<\/code>, <code>numbers<\/code>, <code>variables_values<\/code> and <code>media_url<\/code>. For a PDF, add <code>document_filename<\/code>.<\/p>\n<\/li>\n<li>\n<h3>Check the delivery report<\/h3>\n<p>The reply gives a <code>request_id<\/code>. Open <strong>Delivery Report<\/strong> to see each number&#8217;s status. If WhatsApp could not fetch the file, the message fails with a media error and is refunded like any failed message.<\/p>\n<\/li>\n<\/ol>\n<h2>File types and size limits<\/h2>\n<div class=\"f2s-facts\">\n<table>\n<thead>\n<tr>\n<th>Header type<\/th>\n<th>File formats the API checks for<\/th>\n<th>Max size<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Image<\/td>\n<td>JPEG or PNG<\/td>\n<td>5 MB<\/td>\n<\/tr>\n<tr>\n<td>Video<\/td>\n<td>MP4<\/td>\n<td>16 MB<\/td>\n<\/tr>\n<tr>\n<td>Document<\/td>\n<td>PDF<\/td>\n<td>100 MB<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Fast2SMS checks the link before it queues the message. These limits follow WhatsApp&#8217;s own media rules at the time of writing. For all formats see <a href=\"\/help\/whatsapp-media-file-size-limits\/\">WhatsApp media file size limits<\/a>.<\/p>\n<h2>Code examples<\/h2>\n<p>These send the image template 20001 with two variables (&#8220;Rahul&#8221; and &#8220;20%&#8221;) to 9999999999.<\/p>\n<h3>cURL<\/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\":\"20001\",\"numbers\":\"9999999999\",\"variables_values\":\"Rahul|20%\",\n       \"media_url\":\"https:\/\/example.com\/offers\/festive-sale.jpg\"}'<\/code><\/pre>\n<h3>cURL with a PDF header<\/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\":\"20007\",\"numbers\":\"9999999999\",\"variables_values\":\"INV-1042\",\n       \"media_url\":\"https:\/\/example.com\/invoices\/INV-1042.pdf\",\"document_filename\":\"Invoice INV-1042\"}'<\/code><\/pre>\n<h3>PHP<\/h3>\n<pre><code class=\"language-php\">&lt;?php\n$payload = [\n    \"message_id\"       =&gt; \"20001\",\n    \"numbers\"          =&gt; \"9999999999\",\n    \"variables_values\" =&gt; \"Rahul|20%\",\n    \"media_url\"        =&gt; \"https:\/\/example.com\/offers\/festive-sale.jpg\",\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]);\n$data = json_decode(curl_exec($ch), true);\ncurl_close($ch);\necho ($data[\"return\"] ?? false) === true ? $data[\"request_id\"] : json_encode($data[\"errors\"] ?? $data);<\/code><\/pre>\n<h3>Python<\/h3>\n<pre><code class=\"language-python\">import requests\n\npayload = {\n    \"message_id\": \"20001\",\n    \"numbers\": \"9999999999\",\n    \"variables_values\": \"Rahul|20%\",\n    \"media_url\": \"https:\/\/example.com\/offers\/festive-sale.jpg\",\n}\nr = requests.post(\"https:\/\/www.fast2sms.com\/dev\/whatsapp\",\n                  headers={\"authorization\": \"YOUR_API_KEY\"}, json=payload, timeout=30)\ndata = r.json()\nprint(data[\"request_id\"] if data.get(\"return\") else data.get(\"errors\"))<\/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: { authorization: process.env.FAST2SMS_API_KEY, \"Content-Type\": \"application\/json\" },\n  body: JSON.stringify({\n    message_id: \"20001\",\n    numbers: \"9999999999\",\n    variables_values: \"Rahul|20%\",\n    media_url: \"https:\/\/example.com\/offers\/festive-sale.jpg\",\n  }),\n});\nconst data = await res.json();\nconsole.log(data.return === true ? data.request_id : data.errors);<\/code><\/pre>\n<div class=\"f2s-note\">\n<p>If you use GET instead of POST, URL-encode <code>media_url<\/code> and <code>variables_values<\/code>. With cURL, <code>--data-urlencode<\/code> does this for you.<\/p>\n<\/div>\n<aside class=\"f2s-cta\" aria-label=\"Get started with Fast2SMS\"><div class=\"f2s-cta__copy\"><strong class=\"f2s-cta__title\">One template, a new file every time<\/strong><p>Send each customer their own invoice, ticket or offer image with the same approved WhatsApp 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>How to host the file so the link works<\/h2>\n<ul>\n<li><strong>Use https and a direct file link.<\/strong> The link must start with <code>http:\/\/<\/code> or <code>https:\/\/<\/code> and point at the file itself. Share pages of Google Drive or Dropbox show a preview page, not the file, so they usually fail.<\/li>\n<li><strong>No login, no IP block.<\/strong> Fast2SMS and WhatsApp both fetch the file from the internet. Links on localhost, a private IP or behind a login are refused with &#8220;Media URL is not reachable. Please use a public link.&#8221;<\/li>\n<li><strong>Return the right file type.<\/strong> Your server should answer with the correct Content-Type, for example <code>image\/jpeg<\/code> or <code>application\/pdf<\/code>.<\/li>\n<li><strong>Keep the file online.<\/strong> WhatsApp downloads the file when it sends the message. A scheduled message needs the link to still work at the scheduled time.<\/li>\n<li><strong>One file per customer is fine.<\/strong> Each request can carry a different <code>media_url<\/code>, for example a separate invoice PDF per order. All numbers in one request get the same file.<\/li>\n<\/ul>\n<h2>Common problems and fixes<\/h2>\n<h3>&#8220;Media URL is not reachable. Please use a public link.&#8221;<\/h3>\n<p>The link points at a private or local address, or our server could not reach it. Host the file on a public address and test it in a private browser window.<\/p>\n<h3>&#8220;Media URL must start with http:\/\/ or https:\/\/&#8221;<\/h3>\n<p>Send the full address including <code>https:\/\/<\/code>.<\/p>\n<h3>&#8220;Media file is too large. Maximum allowed size for this type is &#8230; MB&#8221;<\/h3>\n<p>Compress the image or video, or split a large PDF. Limits are 5 MB for images, 16 MB for video and 100 MB for PDF.<\/p>\n<h3>The API accepted the request but the message failed<\/h3>\n<p>WhatsApp could not download or use the file. Open the message in <strong>Delivery Report<\/strong> and read the Description. A media error such as 131053 means the file type, size or link was the problem. See <a href=\"\/help\/whatsapp-api-error-codes-list\/\">WhatsApp API error codes<\/a>.<\/p>\n<h3>The PDF opens with a strange name<\/h3>\n<p>Send <code>document_filename<\/code>, for example &#8220;Invoice INV-1042&#8221;. Without it the customer sees a default name.<\/p>\n<section class=\"f2s-faq\">\n<h2>Frequently asked questions<\/h2>\n<h3>Can I upload the image to Fast2SMS through the API?<\/h3>\n<p>The template send API takes a link, not a file upload. Host the file yourself and pass its public URL in <code>media_url<\/code>.<\/p>\n<h3>Can I send an image with a normal text template?<\/h3>\n<p>No. The template must have an image, video or document header approved by Meta. Create a new template with a media header for that.<\/p>\n<h3>Is the sample image from template approval sent automatically?<\/h3>\n<p>Send <code>media_url<\/code> with every request for a media template, so you control which file the customer gets.<\/p>\n<h3>Does a media template cost more than a text template?<\/h3>\n<p>WhatsApp charges by template category (Marketing, Utility, Authentication), not by header type. See the <a href=\"https:\/\/www.fast2sms.com\/whatsapp-pricing\">WhatsApp pricing page<\/a> for current rates.<\/p>\n<h3>Can I send a video in a session reply?<\/h3>\n<p>Yes, within 24 hours of the customer&#8217;s last message, using the session API with <code>type=video<\/code>. See <a href=\"\/help\/whatsapp-api-session-message\/\">the session message API<\/a>.<\/p>\n<\/section>\n<aside class=\"f2s-cta\" aria-label=\"Get started with Fast2SMS\"><div class=\"f2s-cta__copy\"><strong class=\"f2s-cta__title\">Ready to send rich WhatsApp messages<\/strong><p>Sign up for Fast2SMS, get your media template approved and send it from your app or the panel.<\/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\/whatsapp-api-send-template\/\">Send WhatsApp template messages with the Fast2SMS API<\/a><\/li>\n<li><a href=\"\/help\/whatsapp-media-file-size-limits\/\">WhatsApp media file size limits<\/a><\/li>\n<li><a href=\"\/help\/whatsapp-template-format-rules-limits\/\">WhatsApp template format rules and limits<\/a><\/li>\n<li><a href=\"\/help\/send-bulk-whatsapp-messages-fast2sms\/\">Send bulk WhatsApp messages from the panel<\/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 with an image, video or PDF header through the Fast2SMS API, add media_url to the normal template request: a public link to the file. For a PDF you can also send document_filename, the name the customer sees. This guide covers the file types and sizes the API accepts, how to [&hellip;]<\/p>\n","protected":false},"featured_media":18278,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,24],"tags":[],"class_list":["post-18279","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 Image, Video and PDF Template API | Fast2SMS<\/title>\n<meta name=\"description\" content=\"Send WhatsApp templates with an image, video or PDF header by API: media_url rules, file sizes, hosting tips, and code in cURL, PHP, Python and Node.js.\" \/>\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-media-template\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WhatsApp Image, Video and PDF Template API | Fast2SMS\" \/>\n<meta property=\"og:description\" content=\"Send WhatsApp templates with an image, video or PDF header by API: media_url rules, file sizes, hosting tips, and code in cURL, PHP, Python and Node.js.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.fast2sms.com\/help\/whatsapp-api-media-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:24:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-18T19:26:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/whatsapp-templates-list-page2-hd-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-media-template\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-media-template\\\/\"},\"author\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#organization\"},\"headline\":\"Send a WhatsApp template with image, video or PDF by API (media_url)\",\"datePublished\":\"2026-11-18T18:24:31+00:00\",\"dateModified\":\"2026-11-18T19:26:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-media-template\\\/\"},\"wordCount\":981,\"publisher\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-media-template\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/whatsapp-templates-list-page2-hd-scaled.webp\",\"articleSection\":[\"API\",\"WhatsApp\"],\"inLanguage\":\"en-IN\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-media-template\\\/\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-media-template\\\/\",\"name\":\"WhatsApp Image, Video and PDF Template API | Fast2SMS\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-media-template\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-media-template\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/whatsapp-templates-list-page2-hd-scaled.webp\",\"datePublished\":\"2026-11-18T18:24:31+00:00\",\"dateModified\":\"2026-11-18T19:26:56+00:00\",\"description\":\"Send WhatsApp templates with an image, video or PDF header by API: media_url rules, file sizes, hosting tips, and code in cURL, PHP, Python and Node.js.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-media-template\\\/#breadcrumb\"},\"inLanguage\":\"en-IN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-media-template\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-IN\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-media-template\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/whatsapp-templates-list-page2-hd-scaled.webp\",\"contentUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/whatsapp-templates-list-page2-hd-scaled.webp\",\"width\":2560,\"height\":1600,\"caption\":\"Templates page with an approved marketing template festive_sale_offer that has an image header, Message ID 20001 and two body variables\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/whatsapp-api-media-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 a WhatsApp template with image, video or PDF by API (media_url)\"}]},{\"@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 Image, Video and PDF Template API | Fast2SMS","description":"Send WhatsApp templates with an image, video or PDF header by API: media_url rules, file sizes, hosting tips, and code in cURL, PHP, Python and Node.js.","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-media-template\/","og_locale":"en_US","og_type":"article","og_title":"WhatsApp Image, Video and PDF Template API | Fast2SMS","og_description":"Send WhatsApp templates with an image, video or PDF header by API: media_url rules, file sizes, hosting tips, and code in cURL, PHP, Python and Node.js.","og_url":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-media-template\/","og_site_name":"Fast2SMS","article_publisher":"https:\/\/www.facebook.com\/Fast2SMS\/","article_published_time":"2026-11-18T18:24:31+00:00","article_modified_time":"2026-11-18T19:26:56+00:00","og_image":[{"width":2560,"height":1600,"url":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/whatsapp-templates-list-page2-hd-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-media-template\/#article","isPartOf":{"@id":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-media-template\/"},"author":{"@id":"https:\/\/www.fast2sms.com\/#organization"},"headline":"Send a WhatsApp template with image, video or PDF by API (media_url)","datePublished":"2026-11-18T18:24:31+00:00","dateModified":"2026-11-18T19:26:56+00:00","mainEntityOfPage":{"@id":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-media-template\/"},"wordCount":981,"publisher":{"@id":"https:\/\/www.fast2sms.com\/#organization"},"image":{"@id":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-media-template\/#primaryimage"},"thumbnailUrl":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/whatsapp-templates-list-page2-hd-scaled.webp","articleSection":["API","WhatsApp"],"inLanguage":"en-IN"},{"@type":"WebPage","@id":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-media-template\/","url":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-media-template\/","name":"WhatsApp Image, Video and PDF Template API | Fast2SMS","isPartOf":{"@id":"https:\/\/www.fast2sms.com\/help\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-media-template\/#primaryimage"},"image":{"@id":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-media-template\/#primaryimage"},"thumbnailUrl":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/whatsapp-templates-list-page2-hd-scaled.webp","datePublished":"2026-11-18T18:24:31+00:00","dateModified":"2026-11-18T19:26:56+00:00","description":"Send WhatsApp templates with an image, video or PDF header by API: media_url rules, file sizes, hosting tips, and code in cURL, PHP, Python and Node.js.","breadcrumb":{"@id":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-media-template\/#breadcrumb"},"inLanguage":"en-IN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.fast2sms.com\/help\/whatsapp-api-media-template\/"]}]},{"@type":"ImageObject","inLanguage":"en-IN","@id":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-media-template\/#primaryimage","url":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/whatsapp-templates-list-page2-hd-scaled.webp","contentUrl":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/whatsapp-templates-list-page2-hd-scaled.webp","width":2560,"height":1600,"caption":"Templates page with an approved marketing template festive_sale_offer that has an image header, Message ID 20001 and two body variables"},{"@type":"BreadcrumbList","@id":"https:\/\/www.fast2sms.com\/help\/whatsapp-api-media-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 a WhatsApp template with image, video or PDF by API (media_url)"}]},{"@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\/18279","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=18279"}],"version-history":[{"count":1,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/posts\/18279\/revisions"}],"predecessor-version":[{"id":19477,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/posts\/18279\/revisions\/19477"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/media\/18278"}],"wp:attachment":[{"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/media?parent=18279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/categories?post=18279"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/tags?post=18279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}