Upload media
Uploads media bytes and returns the durable upload_ref used by an
outbound media part. Send the raw bytes as the request body and their
exact media type in Content-Type; the body is never JSON-normalized.
media_id is a different namespace: it is the channel’s transient,
inbound-only identifier and expires after seven days. It is never an
outbound address. Handles returned here visibly begin upload. and are
reusable within this key’s account and test/live partition. Outbound
uploads have no fixed beta expiry and are not routinely pruned, but this
is not a permanence promise: account deletion or offboarding may remove
them. Reusing a handle does not create or refresh an expiry clock.
Inbound media bytes are not readable through this route and are deleted
30 days after server receipt.
Size ceilings are applied by kind: image 5,000,000 bytes; audio and
video 16,000,000; document 100,000,000; static sticker 100,000 and
animated sticker 500,000. A larger body is refused, never truncated.
Images accept JPEG or PNG; video accepts MP4 or 3GPP; audio accepts AAC,
AMR, MPEG, MP4 or Ogg; stickers accept WebP; documents accept text/plain,
application/pdf, the legacy Word/Excel/PowerPoint media types, and the
three Open XML Word/Excel/PowerPoint media types. The media type must
match the kind; an invented vendor suffix is not accepted.
Upload media
curl https://whatsapp.messages.api.linqapp.com/v1/media \
-H 'Content-Type: */*' \
-H "Authorization: Bearer $LINQ_WHATSAPP_API_KEY" \
-d '{}'{
"byte_size": 0,
"kind": "image",
"mime_type": "mime_type",
"sha256": "sha256",
"upload_ref": "upload_ref"
}Returns Examples
{
"byte_size": 0,
"kind": "image",
"mime_type": "mime_type",
"sha256": "sha256",
"upload_ref": "upload_ref"
}