---
title: "Create Media Handler"
method: POST
path: "/v3/metainfo/template/create_media_handler"
tags: ["WhatsApp Templates"]
---

# Create Media Handler

`POST /v3/metainfo/template/create_media_handler`

## Request

- Base URL: `https://cpaaswa.netcorecloud.net/api`
- URL: `https://cpaaswa.netcorecloud.net/api/v3/metainfo/template/create_media_handler`
- Auth: HTTP bearer

Use this endpoint to upload a media file and generate a handler ID for use in WhatsApp templates.  
The media file must be provided (e.g., image, video or PDF) and its format specified.  
After successful upload you receive a handler ID and URL for inclusion in the template header or body.

## Request body `multipart/form-data`

- object
  - `file` string, binary, required: The media file to upload (image, video or document) for template usage.
  - `format` string, required: The media type (e.g., image, video, document) to indicate how the file will be used.

## Response `200`

Media handler created successfully.

- object
  - `request_id` string
  - `status` string
  - `data` object
    - `sample_id` string
    - `url` string, uri
  - `error` object
    - `code` string
    - `message` string

## Other responses

- `400`: Request is invalid or missing required fields.
- `401`: Authentication failed – invalid or missing bearer token.
- `500`: Internal server error occurred while processing media upload.

---

[API](https://skmtc.dev/netcorecloud/apis/whatsapp-api.md) - [All operations](https://skmtc.dev/netcorecloud/apis/whatsapp-api/llms.txt) - [OpenAPI document](https://skmtc.dev/netcorecloud/apis/whatsapp-api/revisions/82cdf689fb7a?raw)
