Upload media
POST
/{phone_number_id}/mediaUploads a file so you can send it by id instead of by link. The upload uses form data (multipart/form-data), not JSON, and the file goes in a field named sheet.
Uploaded files are kept for 30 days. Check the supported types and sizes first.
Authorization
apiKey apikey<token>
Your HostMentor API key, from the dashboard under Messaging → WhatsApp → API keys.
In: header
Path Parameters
phone_number_id*string
ID of your WhatsApp number, from the dashboard or List your phone numbers. It isn't the phone number itself.
Request Body
multipart/form-data
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://wa.hostmentor.com/v3/106540352242922/media" \ -H "apikey: YOUR_API_KEY" \ -F sheet="string"{ "response": { "id": "1166846181421424" }}