Subir un archivo multimedia
curl --request POST \
--url https://cerberus.eazybe.com/prod/api/v2/meta/phone-numbers/{phoneNumberId}/media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file'{
"id": "1234567890123456"
}Archivos multimedia
Subir un archivo multimedia
Subir un archivo multimedia. Consulta los parámetros, el ejemplo y las respuestas disponibles para esta operación.
POST
/
meta
/
phone-numbers
/
{phoneNumberId}
/
media
Subir un archivo multimedia
curl --request POST \
--url https://cerberus.eazybe.com/prod/api/v2/meta/phone-numbers/{phoneNumberId}/media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file'{
"id": "1234567890123456"
}Autorizaciones
Token bearer de Eazybe. El token identifica la organización y debe mantenerse en el servidor.
Parámetros de ruta
ID del número de teléfono devuelto por GET /meta/phone-numbers.
Cuerpo
multipart/form-data
curl -X POST "https://cerberus.eazybe.com/meta/phone-numbers/5647382910/media" \
-H "Authorization: Bearer <jwt>" \
-F "file=@invoice.pdf"
Respuesta
200 - application/json
Media uploaded
Failure responses
| Status | Meaning | Action |
|---|---|---|
401 | Missing, invalid, or expired bearer token | Re-authenticate |
404 | phoneNumberId not linked to your organization | Verify the id |
400 | Unsupported MIME type or file over WhatsApp's size limit (image 5 MB, document 100 MB, video/audio 16 MB) | Re-encode or compress |
500 | No file field in the multipart body | Send as multipart/form-data with field file |
502 | Graph unreachable or timed out | Retry with backoff |
¿Esta página le ayudó?