Upload media
POST/v1/:phone_number_id/media
Uploads a file to Meta's infrastructure and returns an id you can reuse across
many sends. The file stays available for 30 days.
Sending by id is faster and more reliable than by public URL when the same file
goes to many recipients — Meta downloads it once.
This route has its own rate limit: 60 requests per minute.
Request
Responses
- 200
- 401
- 403
- 429
- 502
Meta Cloud API's response, passed through unchanged. The shape depends on the endpoint — see Meta's documentation.
Response Headers
Which rate limit category applied — send, media or default.
Which bucket the other headers describe — key (the API key), session (the dashboard) or account (the account ceiling).
Request ceiling for this category in the current window.
Requests left in the current window.
Missing, malformed, unknown or revoked token (authentication), or a suspended
account (tenant_inactive).
The resource does not belong to your account (forbidden), or the path is on the
mirror's block list (forbidden_endpoint), or your API key is limited to some numbers and
the operation covers the whole account (forbidden).
Rate limit exceeded (rate_limit).
Response Headers
Seconds to wait before retrying.
Which rate limit category applied — send, media or default.
Which bucket the other headers describe — key (the API key), session (the dashboard) or account (the account ceiling).
Request ceiling for this category in the current window.
Requests left in the current window.
Could not reach Meta (upstream_error), Meta answered with a 5xx (meta_error),
or it took longer than 30 seconds.