delete
https://partner.gupshup.io/partner/app//media/
Permanently deletes a media file from WhatsApp servers using the mediaId. Once deleted, the operation cannot be undone.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Rate limit: 10 requests per hour
Request Parameters
| Key | Description | Value | Data type | Required/Optional | Constraints |
|---|---|---|---|---|---|
| Authorization | Access Token for the application | {{PARTNER_APP_TOKEN}} | String | Required | Should be a valid Partner App Access Token |
| appId | App ID to fetch the access token | {{APP_ID}} | String | Required |
|
| mediaId | Media ID of the media which is being deleted | {{MEDIA_ID}} | String | Required | Valid media ID associated with the given app ID |
Sample Request
curl --location --request DELETE 'https://partner.gupshup.io/partner/app/{{APP_ID}}/media/{{MEDIA_ID}}' \
--header 'Authorization: {{PARTNER_APP_TOKEN}}'Sample Responses
| Status Code | Response | Comments |
|---|---|---|
| Success | ||
| 200 | { "message": "Media deleted successfully", "status": "success" } | Media successfully deleted from WhatsApp servers |
| Error | ||
| 400 | { "message": "Failed to delete media", "status": "error" } | Bad Request - Invalid media ID or deletion failed |
| 400 | { "message": "Delete media operations are temporarily blocked for this app due to previous errors. Please try again later.", "status": "error" } | Temporary block due to previous errors |
| 500 | { "status": "error","message": "Internal Server Error"} | For any Internal Error |