> For the complete documentation index, see [llms.txt](https://help.clickatell.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.clickatell.com/whatsapp/channel-capabilities/whatsapp-message-templates/use-media-in-message-templates.md).

# Use media in message templates

To use media in your message template, you must:

1. [Select the media type](#select-media-type)
2. [Upload the media file](#upload-media)
3. [Send the message template via One API](https://help.clickatell.com/whatsapp/channel-capabilities/whatsapp-message-templates/send-message-templates.md)

## **Select media type**

1. When [creating your template](https://help.clickatell.com/whatsapp/channel-capabilities/whatsapp-message-templates/add-message-templates.md) in Facebook Business Manager, you can select to add "Media" as the header. &#x20;
2. Select the type of media you want to add to your template.&#x20;
   * Note: The [*Location* ](https://help.clickatell.com/whatsapp/channel-capabilities/whatsapp-message-templates/use-location-in-message-templates.md)media type is only available on Cloud.
3. Add a sample for the header content.

{% hint style="info" %}
All variables (e.g., {{1}}) are set when [sending the message via One API](https://help.clickatell.com/developers-api-reference/reference/one-api.md), where you can specify the parameters in the payload.&#x20;
{% endhint %}

<figure><img src="https://content.gitbook.com/content/H9mbp0ZlSZKdmkQMXA0U/blobs/JX0QFnc24LDt44OA5qcV/image.png" alt=""><figcaption></figcaption></figure>

## **Upload media**

{% hint style="warning" %}
You can only send the template after uploading the media file.
{% endhint %}

1. Once your template is approved, upload the media file to be included in your message template onto the Clickatell server by using the Upload media file and Get media file metadata endpoints as described in the [One API Reference](https://help.clickatell.com/developers-api-reference/reference/one-api.md) document.
2. The successful upload of your media will return a ***fileID*** which is the unique reference to the media file you’ve uploaded. You'll use this in the next step.

{% hint style="info" %}
Although the template is not limited to a single media file, it is registered for a **specific media type** only.
{% endhint %}

## **Send message template via One API**

1. Once you have successfully uploaded your media file, you can send the message template to customers via our One API using the Sends one or more messages endpoint as described in the [One API Reference](https://help.clickatell.com/developers-api-reference/reference/one-api.md) document.
2. As part of the One API call, you need to include the template name and the *fileID* as returned in the step above.
