WhatsApp webhook media IDs expire in 7 days: download and store

WhatsApp webhook media IDs expire after 7 days and media URLs after 5 minutes. Download inbound media promptly, then import it into Sume to edit it.

4 min readSume
All posts

Media you receive through a WhatsApp Cloud API webhook has a media ID that expires after 7 days, and the media URL you resolve from it expires after 5 minutes. So retrieve the URL and download the bytes as soon as the webhook arrives, then keep your own copy. To edit it with Sume, import the stored file with the media-imports endpoint.

How do the expiry windows differ?

Meta's media reference distinguishes uploads you make from media you receive. Uploads made through the API persist for 30 days, as another post covers. Inbound media IDs in webhooks last 7 days, and every media URL expires after 5 minutes.

WhatsApp media expiry (read 2026-10-02)
ItemLifetime
Media uploaded via API30 days
Media ID in a webhook7 days
Media URL5 minutes

What should the webhook handler do?

  • Acknowledge the webhook quickly.
  • Resolve the media ID to a URL and download at once, with your access token.
  • Store the bytes under your own key.
  • Process later from your copy, never from the WhatsApp URL.

How do I bring the file into Sume?

Sume tools read only Sume-hosted media, so import first: POST /v1/media-imports is the documented import step. Once the import returns a Sume-hosted URL, call the trim, filter or frames tools on that URL. The tool pages in the docs link to the import step; check them for accepted sources and the exact body, which this post does not repeat.

What should I verify?

Meta can change lifetimes, so read the media reference at integration time. The API reference covers authentication on the Sume side.

Sources

Related posts

More in Integrations

All Integrations posts

Written by Sume