WhatsApp Cloud API media ID expiry: 30 days, URL 5 minutes
WhatsApp media IDs from the API expire after 30 days, webhook IDs after 7, and a media URL works for 5 minutes. Keep your own durable source, not the ID.

A WhatsApp Cloud API media ID returned by the API expires after 30 days, an ID received in a webhook after 7 days, and the media URL you get from an ID is valid for 5 minutes. Treat the ID as a short-lived handle, and keep the original file at a URL you control, for example a Sume media.sume.com artifact.
Numbers are from Meta's media reference, read 2026-10-01; Sume artifact behavior from its Image generation docs.
What are the WhatsApp expiry windows?
| Item | Lifetime |
|---|---|
| Media ID returned by the API | 30 days |
| Media ID in a webhook | 7 days |
| Uploaded files | Persist 30 days unless deleted earlier |
| Media URL from an ID | 5 minutes |
Why not store the media ID?
Because it stops working. After 30 days (7 for webhook IDs) you must upload the file again, which requires that you still have it. And the URL for downloading an inbound file is only valid for 5 minutes, so fetch it right away and save the bytes.
What should be the durable source?
The Sume docs for image generation show results as public HTTPS URLs on media.sume.com, and the Sume docs describe results as media.sume.com artifacts. Those pages do not give a retention period, so confirm that against your own needs. Store that URL with your message record, and on each send upload from it to WhatsApp for a fresh ID.
What should I do next?
Keep three values per message: source URL, WhatsApp media ID, and upload time. If the ID is older than your safe window, upload again. Format and size limits for audio are in WhatsApp audio message formats.
Sources
Related posts
More in Developers
- X Ads API video_total_views: new 3-second 100% in-view rule
X redefined video_total_views as 100% in-view for 3 seconds plus manual plays. What that means for your first 3 seconds, and how to check and re-cut them.
- X animated GIF limit: 15 MB, 350 frames, and the MP4 alternative
X allows an animated GIF up to 15 MB and recommends 1280x1080 and 350 frames or fewer. Sume makes MP4 video, not GIF, so attach a short MP4 instead.
- X API 403 "not allowed to post a video longer than N minutes"
The 403 means the clip exceeds the posting account's cap: 20 minutes by default, 125 for Premium or verified. Cut the video to that cap before you post.
- X Articles API: draft, publish and a generated cover image
The X Articles API has POST /2/articles/draft and a publish call, with optional cover media. Make the cover with a Sume image call, then upload it to X.
Written by Sume