Create an upload session
POST
/app/uploadsStep 1 of uploading a template sample. Tell WhatsApp the file's size and type; you get back a session id for step 2.
Authorization
apiKey apikey<token>
Your HostMentor API key, from the dashboard under Messaging → WhatsApp → API keys.
In: header
Query Parameters
file_length*integer
Size of the file in bytes.
file_type*string
The file's type, such as image/jpeg, image/png, video/mp4 or application/pdf.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://wa.hostmentor.com/v3/app/uploads?file_length=164313&file_type=image%2Fjpeg" \ -H "apikey: YOUR_API_KEY"{ "id": "upload:MTphdHRhY2htZW50OjNlYTE1ZTkzLTZkZDktNGIwOS1iOTM3LWM4YWZmMTRkYTZkMz9maWxlX2xlbmd0aD0xNjQzMTM?sig=ARbUFIDlNcIbRnOalIY"}