Upload Media
Uploads a file to Meta’s resumable upload API and returns a media handle.
Two endpoints consume that handle: Create Template uses it as the header example for an IMAGE, VIDEO, or DOCUMENT header, and Update Business Profile uses it as profilePictureReference. Neither accepts raw file bytes or a public URL.
The endpoint runs both Meta steps in one call: it creates an upload session for the file length and content type, then uploads the bytes and reads back the handle. Content type is derived from the uploaded part, validated against the allowed list, and checked against the size limit for its media type — all before anything reaches Meta.
Limits. Image (image/jpeg, image/png) up to 5 MB, video (video/mp4) up to 16 MB, document (application/pdf) up to 100 MB. Anything else is rejected with 422.
A handle is single-use. It is consumed by the first request that references it and cannot be replayed. The same image used in two templates needs two uploads. Never cache or share handles.
This is the one Public API endpoint that is not JSON — the body is multipart/form-data.
Authorizations
Secret key in Bearer sk_... format. Server-to-server only — never embed it in a browser or mobile client. The organization is resolved from the key, so organization_id is never passed explicitly.
Path Parameters
Application ID. Must belong to the organization resolved from your secret key, otherwise the request returns 404 with APPLICATION_004.
"app_7poyXj8GXuv76e"
Body
The file part. Its MIME type must be one of image/jpeg, image/png, video/mp4, application/pdf, and its size must stay within that media type's limit. Both the media type and the size are resolved from the uploaded part, so they are not sent separately.