https://wv{{wolkvox_server}}.wolkvox.com/api/v2/whatsapp.php?api=upload_media
Description:
This API allows you to upload a multimedia file (image, video, or document) to Meta Business Suite to serve as a visual or content example when creating a WhatsApp template that requires attachments.
It’s important to understand that the file uploaded through this API is only an example and will not be directly included in the final template. When a Wolkvox Agent (in the web or desktop version) sends a message using a WhatsApp template with a multimedia attachment, they must provide the public URL of the actual file in the ‘WhatsApp file link’ field (web version) or ‘File URL’ field (desktop version).
This API streamlines the template creation process in Meta Business Suite, which requires a sample multimedia file when designing templates that include such content.
The file sent to Meta through this API can be reused to create multiple templates in your operation. You can use the same handle obtained from this API request in several template creation APIs.
Note: The file sent via this API must be hosted in Wolkvox Storage, and its public URL must be used.
Benefits:
How it works:
API Limits:
Code Examples:
In our Postman workspace ([click here] to access it), you have access to code examples that facilitate integration with our APIs in different programming languages such as cURL, Python, JavaScript, and more.
This feature is ideal for quick integrations and allows you to adapt the API calls to your system’s programming language.
How to Use the Code Examples:
NAME | DESCRIPTION | TYPE |
---|---|---|
connector_id | Unique identifier of the WhatsApp connector associated with your account. | String |
file_url | The public URL of the multimedia file (image, video, or document) you want to upload as an example. This URL must be accessible from the internet so that Meta can download the file. | String |
NAME | DESCRIPTION | TYPE |
---|---|---|
code | Error code. | Int |
error | Error name. | String |
msg | Error explanation. | String |
data | Object containing relevant upload data. | Object |
0 | Internal confirmation message. | String |
handle | This is the key value. It is a unique identifier generated by Meta for the uploaded multimedia file. This handle must be saved and later used in Meta Business Suite’s WhatsApp template creation APIs when a sample multimedia file is required. It is the reference Meta will use to identify the sample content. | String |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://wv{{wolkvox_server}}.wolkvox.com/api/v2/whatsapp.php?api=upload_media',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"connector_id": "",
"file_url": ""
}',
CURLOPT_HTTPHEADER => array(
'wolkvox-token: {{wolkvox-token}}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
curl --location --globoff 'https://wv{{wolkvox_server}}.wolkvox.com/api/v2/whatsapp.php?api=upload_media' \
--header 'wolkvox-token: {{wolkvox-token}}' \
--header 'Content-Type: application/json' \
--data '{
"connector_id": "",
"file_url": ""
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"connector_id\": \"\",\r\n \"file_url\": \"\"\r\n}");
Request request = new Request.Builder()
.url("https://wv{{wolkvox_server}}.wolkvox.com/api/v2/whatsapp.php?api=upload_media")
.method("POST", body)
.addHeader("wolkvox-token", "{{wolkvox-token}}")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
import requests
import json
url = "https://wv{{wolkvox_server}}.wolkvox.com/api/v2/whatsapp.php?api=upload_media"
payload = json.dumps({
"connector_id": "",
"file_url": ""
})
headers = {
'wolkvox-token': '{{wolkvox-token}}',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
{
"code": "200",
"error": null,
"msg": "Media uploaded successfully",
"data": {
"0": "media_uploaded_successfully",
"handle": ""
}
}
Sao Paulo +55 (11) 521 75 933
Santiago de Chile +56 (2) 240 533 89
Medellín +57 (604) 322 98 80
Ciudad de Guatemala +502 (2) 3141344
Ciudad de México +52 (55) 8526 36 34
Copyright © 2025 WOLKVOX MICROSYSLABS. 1820 N Corporate Lakes Blvd, unit 205. Weston, FL 33326
COLOMBIA
Medellín +57 (4) 322 98 80
Bogotá +57 (1) 381 90 40
Cali +57 (2) 891 28 46
Barranquilla +57 (5) 316 10 34
ARGENTINA
Buenos Aires +54 (11) 5217 5933
SPAIN
Madrid +34 (910) 601 691
MEXICO
Ciudad de México +52 (55) 8526 36 34
BRASIL
Brasilia +55 (61) 9836 4127
São Paulo +55 (12) 9811 155 83
UNITED STATES
New York +1 (914) 373 71 36
DOMINICAN REPUBLIC
Santo Domingo +1 (829) 249 69 68
CHILE
Santiago de Chile +56 (2) 240 533 89
GUATEMALA
Ciudad de Guatemala +502 (2) 314 1344
PERU
Lima +51 (1) 644 91 39
Copyright © 2025 WOLKVOX MICROSYSLABS.
Cra 30 # 4A – 45 Of. 205 Ed. FOREVER W&L, Medellín, Colombia
Usamos cookies, se continuar a navegar assumimos que concorda. Pode ler mais sobre a utilização de cookies nas nossas políticas de privacidade e tratamento de dados pessoais