Skip to content

Deep links

Updated: Jun 30, 2026

You can map an Android deep link⁠ to a marketing template URL button that, when tapped, loads a particular location or content within your app.

WhatsApp chat showing a Lucky Shrub marketing template message with a View Deals URL button mapped to a deep link

If you have not onboarded to the Marketing Messages API for WhatsApp (MM API for WhatsApp), your marketing templates will not display any conversion metrics. Learn more about how to measure conversion.

Template creation via WhatsApp Manager

To create a template with a button mapped to an Android deep link:

  • Access WhatsApp Manager⁠.
  • Navigate to the Message templates > Manage templates panel and click the Create template button.
  • Select Marketing (tab) > Custom (radio button) and click the Next button.
  • In the Buttons section, click the + Add buttons dropdown menu and select Visit website.
  • Check the Track app conversions checkbox to reveal the deep link fields (pictured below).
  • Complete each field using its tooltip or form field descriptions below as guidance.
  • Add any additional components you'd like your template to use, name your template, and submit it for approval.

Note that you can also use the Manage templates panel to edit an existing template and add a deep link-mapped button, but the template must pass template review again.

WhatsApp Manager template Buttons form with Track app conversions checked, revealing Meta app ID, Android deep link, and Android fallback URL fields

Form fields

Field labelDescriptionExample value
Android deep linkRequired. Android deep link URI.luckyshrub://deals/summer_solstice
Android fallback URLOptional. Fallback URL. If the WhatsApp client cannot load the deep link URI, the WhatsApp client loads this URL in the device's default web browser. If omitted, the WhatsApp client loads the URL specified in the Website URL field instead.https://www.luckyshrub.com/deals/`summer_solstice`
Button TextRequired. Button label text. Maximum 25 characters.View deal
Meta app IDRequired. This is a list of the Meta app(s) associated with your business portfolio. Select the app whose access token you will use to send the template.Lucky Shrub (634974688087057)
Type of ActionRequired. Must be set to Visit website.Visit website
URL TypeRequired. Set to Static if your Android deep link or Android fallback URL has no dynamic values, otherwise set to Dynamic.Static
Website URLRequired. URL of a website to load if the WhatsApp user views the message on a non-Android device, or if the WhatsApp client cannot load your Android deep link URI and no Android fallback URL is specified.https://www.luckyshrub.com/

Template creation via API

Use the Message Templates API to create the template and include a URL button component mapped to your Android deep link.

Note that you can also use the Template API to edit an existing template and add a URL button component, but the template must pass template review again.

Request syntax

Template components can vary based on your needs. This example syntax creates a marketing template with the following components:

  • text header, without parameters
  • body, without parameters
  • URL button, mapped to a deep link URI and fallback URL
'https://graph.facebook.com/<API_VERSION>/<WHATSAPP_BUSINESS_ACCOUNT_ID>/message_templates' \  
-H 'Content-Type: application/json' \  
-H 'Authorization: Bearer <ACCESS_TOKEN>' \  
-d '  
{  
  "name": "<TEMPLATE_NAME>",  
  "language": "<TEMPLATE_LANGUAGE>",  
  "category": "marketing",  
  "components": [  
    {  
      "type": "header",  
      "format": "text",  
      "text": "<HEADER_TEXT>"  
    },  
    {  
      "type": "body",  
      "text": "<BODY_TEXT>"  
    },  
    {  
      "type": "buttons",  
      "buttons": [  
        {  
          "type": "url",  
          "text": "<BUTTON_LABEL_TEXT>",  
          "url": "<BUTTON_URL>",  
          "app_deep_link": {  
            "meta_app_id": <META_APP_ID>,  
            "android_deep_link": "<ANDROID_DEEP_LINK>",  
            "android_fallback_playstore_url": "<FALLBACK_URL>"  
          }  
        }  
      ]  
    }  
  ]  
}'

Request parameters

PlaceholderDescriptionExample value
<ACCESS_TOKEN>StringRequired.System token or business token.EAAJB...
<ANDROID_DEEP_LINK>StringRequired if using a URL button component mapped to a deep link.Android deep link⁠ URI. The WhatsApp client loads this URI when the WhatsApp user taps the button on an Android device.luckyshrub://deals/summer/
<API_VERSION>StringOptional. Graph API version.v22.0
<BODY_TEXT>StringRequired if using a body component. Template body text. Variables are supported. Maximum 1024 characters.Beat the heat with our sizzling summer deals on succulents! At Lucky Shrub, we...
<BUTTON_LABEL_TEXT>StringRequired if using a URL button component. Button label text. Maximum 25 characters.View Deals
<BUTTON_URL>StringRequired if using a URL button component. URL of a website that the WhatsApp client loads in the device's default web browser when the user taps the button. For deep links, the WhatsApp client uses this website URL only if the WhatsApp user taps the button on a non-Android device.https://www.luckyshrub.com/deals/summer/
<FALLBACK_URL>StringRequired if using a URL button mapped to a deep link. URL of a website that the WhatsApp client loads in the device's default web browser when the user taps the button but the client cannot load the Android deep link URI.https://www.luckyshrub.com/deals/summer/
<HEADER_TEXT>StringRequired if using a text header component. Template header text string. Supports up to 1 parameter. If this string contains a parameter, you must include an example property. Maximum 60 characters.Sizzling Summer Deals at Lucky Shrub
<META_APP_ID>IntegerRequired if using a URL button mapped to a deep link. Your Meta app ID.634974688087057
<TEMPLATE_LANGUAGE>StringRequired. Template language and locale code.en_US
<TEMPLATE_NAME>StringRequired. Template name. Maximum 512 characters.summer_deals_deep_link_v1
<WHATSAPP_BUSINESS_ACCOUNT_ID>StringRequired. WhatsApp Business account ID.102290129340398

Example request

curl 'https://graph.facebook.com/v22.0/102290129340398/message_templates' \  
-H 'Content-Type: application/json' \  
-H 'Authorization: Bearer EAAJB...' \  
-d '  
{  
  "name": "summer_deals_deep_link_v1",  
  "language": "en_US",  
  "category": "marketing",  
  "components": [  
    {  
      "type": "header",  
      "format": "text",  
      "text": "Sizzling Summer Deals at Lucky Shrub"  
    },  
    {  
      "type": "body",  
      "text": "Beat the heat with our sizzling summer deals on succulents! At Lucky Shrub, we're passionate about bringing a touch of greenery to your life. Our succulents are not only low-maintenance and easy to care for, but they also add a pop of color and style to any room. Use the button below to see our Summer Steals!"  
    },  
    {  
      "type": "buttons",  
      "buttons": [  
        {  
          "type": "url",  
          "text": "View Deals",  
          "url": "https://www.luckyshrub.com/deals/summer/",  
          "app_deep_link": {  
            "meta_app_id": 634974688087057,  
            "android_deep_link": "luckyshrub://deals/summer/",  
            "android_fallback_playstore_url": "https://www.luckyshrub.com/deals/summer/"  
          }  
        }  
      ]  
    }  
  ]  
}'

Viewing metrics

See our Viewing metrics document.

Unofficial mirror for reference/search purposes. All content originates from developers.facebook.com — see the source link at the top of each page. Machine-readable indexes: llms.txt · llms-full.txt · About