Upload template media example

Uploads a sample media file — image, video, or document — that will be attached to a template submission as the example header content Meta uses for review.

Request parameters

Path parameters

KeyDescriptionValuesData TypeRequired/Optional
appIdIdentifier of the WhatsApp app the call acts on.6f414190-d45c-4671-bca1-fb6c3018cb13StringRequired

Body

KeyDescriptionValuesData TypeRequired/Optional
fileThe media, as a binary part or as a public URLhttps://example.com/image.jpeg—Required
file_typeMIME type of the mediaimage/jpeg—Required

Sample cURL — Upload template media example.

curl --request POST \
  --url 'https://partner.gupshup.io/partner/bizgate/app/6f414190-d45c-4671-bca1-fb6c3018cb13/upload/media' \
  --header 'Authorization: Bearer <UT>' \
  --header 'Accept: application/json' \
  --form 'file=@/path/to/file' \
  --form 'file_type=image/jpeg'

Sample success response (200)

{
  "status": "success",
  "data": {
    "handleId": {
      "message": "4::aW1hZ2UvanBlZw==:ARZ...:e:1634970144:100033...:ARY..."
    }
  }
}
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Identifier of the WhatsApp app the call acts on.

Body Params

Template media example file (multipart/form-data or application/octet-stream) Send file (binary) or a public media URL in the file field, plus file_type, e.g. image/jpeg.

Media upload (multipart/form-data): the file itself or a public URL to it

string
required

The media, as a binary part or as a public URL

string
required

MIME type of the media

Headers
string
enum
Defaults to multipart/form-data

Generated from available request content types

Allowed:
Responses

Language
Credentials
Bearer
Universal Token (UT)
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json