---
title: "POST /v1/whatsapp/template/media"
method: POST
path: "/v1/whatsapp/template/media"
---

# POST /v1/whatsapp/template/media

`POST /v1/whatsapp/template/media`

Uploads media for use in a WhatsApp message template.

## Request body

- object
  - `id` string, required — The ID of the WhatsApp Business Account associated with this media upload.
  - `sourceS3File` object — Contains information for the S3 bucket that contains media files.
    - `bucketName` string — The bucket name.
    - `key` string — <p>The S3 key prefix that defines the storage location of your media files. The prefix works like a folder path in S3, and is combined with the WhatsApp mediaId to create the final file path.</p> <p>For example, if a media file's WhatsApp mediaId is <code>123.ogg</code>, and the key is <code>audio/example.ogg</code>, the final file path is <code>audio/example.ogg123.ogg</code>.</p> <p>For the same mediaId, a key of <code>audio/</code> results in the file path <code>audio/123.ogg</code>.</p>

## Response `200`

Success

- CreateWhatsAppMessageTemplateMediaOutput
  - `metaHeaderHandle` string — The handle assigned to the uploaded media by Meta, used to reference the media in templates.

## Other responses

- `480` — ValidationException
- `481` — AccessDeniedException
- `482` — ResourceNotFoundException
- `483` — InvalidParametersException
- `484` — AccessDeniedByMetaException
- `485` — ThrottledRequestException
- `486` — InternalServiceException
- `487` — DependencyException

---

[API](https://skmtc.net/aws/apis/socialmessaging.md) · [All operations](https://skmtc.net/aws/apis/socialmessaging/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/socialmessaging/versions/127e73cd9a15/schema)
