--- title: "Upload WhatsApp Template Media Files" slug: "upload-whatsapp-template-media-files" description: "Documents the POST /api/v1/templates/file-upload endpoint for uploading image, video, or document files to get a media handle for WhatsApp template headers." tags: ["transactional whatsapp api", "whatsapp api template message", "add cta"] updated: 2026-09-09T12:52:43Z published: 2026-09-09T12:52:43Z canonical: "academy.insiderone.com/upload-whatsapp-template-media-files" --- > ## Documentation Index > Fetch the complete documentation index at: https://academy.insiderone.com/llms.txt > Use this file to discover all available pages before exploring further. # Upload WhatsApp Template Media Files You can use the WhatsApp Template Management API to upload files when your template components need a media handle for an image, video, or document header. You can use this API version when authenticating requests with an Insider One API key. > [!NOTE] > All examples below use sample data and payloads for documentation purposes only. Before going live, replace all template names, languages, components, and media handles with values specific to your own integration. > [!WARNING] > For the V1 template API, authenticate requests with `x-ins-auth-key` . Public examples below use the Gateway base URL so that your integration stays on a public entrypoint instead of calling internal services. > [!WARNING] > For this endpoint, only image, video, and document file types are supported. ## Endpoint and Headers > **POST** https://whatsapp.useinsider.com/v1/templates/file-upload | Header | Sample Value | Description | | --- | --- | --- | | X-INS-AUTH-KEY | 1a2b3c4d5e6f | This key is required to authorize your request. Refer to [Generate API Credentials for WhatsApp Template Management](/v1/docs/generate-api-credentials-for-whatsapp-template-management#generate-whatsapp-template-creation-api-key) to generate your token. | | Content-Type | application/json | This header specifies the media type of the resource. | ## Body Parameters | Column | Data Type | Required | Description | | --- | --- | --- | --- | | name | String | Yes | The template name to create. | | language | String | Yes | The template locale, such as **en_US**. | | category | String | Yes | The Meta template category. | | components | Array[object] | Yes | At least one component is required. | | bid_spec | Object | No | Opt-in for dynamic pricing. Only valid for MARKETING templates. | ## Sample Request ```bash curl --location 'https://whatsapp.useinsider.com/v1/templates/file-upload' \ --header 'x-ins-auth-key: your-api-key' \ --form 'file=@"/path/to/header-image.png"' ``` ## Sample Response A successful request returns the following JSON response. ```json {  "id": "4::aW1hZ2UvcG5n:ARbExampleMediaHandle" } ```