Media

Upload Image

This request uploads an image as .jpeg. The parameters are specified as form-data in the request body.

post/{Version}/{Phone-Number-ID}/media

Request

  • Base URL
    https://graph.facebook.com
  • URL
    https://graph.facebook.com/{Version}/{Phone-Number-ID}/media
  • Auth
    HTTP bearer

Path parameters

Versionstring required
Phone-Number-IDstring required

Headers

User-Agentstring
Example:Meta-Business-Messaging-OpenAPI/1.0.0;spec=2025-10-21

The user agent string identifying the client software making the request.

Authorizationstring required
Example:Bearer EAABwzLixnjYBOzYmNMJJGfHq9DgNh...

Bearer token for API authentication. This should be a valid access token obtained through the appropriate OAuth flow or system user token.

Request body

filestring
messaging_productstring

Example request

{
  "file": "@/local/path/file.ogg;type=ogg",
  "messaging_product": "whatsapp"
}

Response

Upload Image JSON / Upload Sticker File (form-data) / Upload Sticker File JSON / Upload Audio (form-data) / Upload Audio JSON

idstring

Example response

{
  "id": "4490709327384033"
}

Changes

No recorded changes to this operation across all 5 revisions of this API.