Whats App

Uploading Media (file)

POST
/conversation/wab/v1/media

Use the media node to upload, retrieve, or delete media.

If you use the media upload process rather than linking to a media URL, the file must be uploaded to the media volume. Once the upload is complete, you can send a message using the media ID.

The POST body of the API request must contain the binary media data and the Content-Type header must be set to the type of the media being uploaded. See the Supported Content-Types section below for information about supported Content-Types you can upload.

Authorization

bearerAuth
AuthorizationBearer <token>

JWT access token returned by Signing In (POST /auth/v1/tokens/).

In: header

Header Parameters

Content-Type?string

Content-Type header must be set to the type of the media being uploaded. Supported Content- Types can be (image/jpeg, image/png, image/webp, video/mp4, video/3gpp, audio/aac, audio/mp4, audio/amr, audio/mpeg, audio/ogg; codecs=opus)

Response Body

application/json

application/json

curl -X POST "https://example.com/conversation/wab/v1/media"
"{\n    \"media\": [\n        {\n            \"id\": \"<generated id>\"\n        }\n    ]\n}"