Permanently deletes a media file from WhatsApp servers using the mediaId. Once deleted, the operation cannot be undone.
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 |
| Media successfully deleted from WhatsApp servers |
Error | ||
400 |
| Bad Request - Invalid media ID or deletion failed |
400 |
| Temporary block due to previous errors |
500 | { "status": "error","message": "Internal Server Error"} | For any Internal Error |
