Delete media by media ID

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
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
📘

Rate limit: 10 requests per hour

Request Parameters

KeyDescriptionValueData typeRequired/OptionalConstraints
AuthorizationAccess Token for the application{{PARTNER_APP_TOKEN}}StringRequiredShould be a valid Partner App Access Token
appIdApp ID to fetch the access token{{APP_ID}}StringRequired
  • The Id should be a valid app Id of Gupshup.
  • The App must be associated with the account that owns the PARTNER_APP_TOKEN being used
mediaIdMedia ID of the media which is being deleted{{MEDIA_ID}}StringRequiredValid 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 CodeResponseComments
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
Path Params
uuid
required

Unique app identifier

string
required

Media Identifier which will be deleted

Headers
string
required

Partner App Access Token. Include as: Bearer <token>

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json