Skip to main content
POST
/
api
/
v1
/
whatsapp
/
templates
/
upload-media
Upload a media file
curl --request POST \
  --url https://{subdomain}.mihu.ai/api/v1/whatsapp/templates/upload-media \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form waba_id=123456789012345 \
  --form media_type=image \
  --form file='@example-file'
{
  "success": true,
  "message": "Media uploaded successfully",
  "data": {
    "handle": "4::aW1hZ2UvanBlZw==:ARYf7QqLNzCm0wd3rKtN6V4hQp9zXxF...",
    "media_type": "image"
  }
}

Documentation Index

Fetch the complete documentation index at: https://developers.mindhunters.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Use a Bearer token to access these API endpoints. Example: "Bearer {your-token}"

Body

multipart/form-data
waba_id
string
required

WABA the template will be created under. Must be linked to this tenant (GET /api/v1/whatsapp/wabas to list yours).

Example:

"123456789012345"

media_type
enum<string>
required

Determines which header.format the resulting handle is valid for. image→HEADER.format=IMAGE, video→VIDEO, document→DOCUMENT.

Available options:
image,
video,
document
file
file
required

The actual binary file. Image: jpg/png ≤5MB. Video: mp4/3gp ≤16MB. Document: pdf/txt/doc(x)/xls(x)/ppt(x) ≤100MB.

Response

Upload success. Use data.handle in your template create call within ~24h.

success
boolean
Example:

true

message
string
Example:

"Media uploaded successfully"

data
object