Skip to main content

Source APIs

Purge Cache#

https://api.gumlet.com/v1/purge/:subdomain

You can purge cache for any image by using our cache purge API.

Path Parameters
subdomain REQUIREDstringSubdomain is same subdomain you created while creating source. If you serve image from example.gumlet.com, please enter only 'example' for this parameter.
Headers
authorization REQUIREDstringBearer Your API Key
Body Parameter
paths REQUIREDarrayAn array of path of images to purge. It should be provided without any query parameters. You can even pass multiple paths Ex,["/public/images/profile1.jpg", "/public/images/profile2.jpg"]

Example cURL request is given below.

curl -X POST -H 'Authorization:Bearer <your_api_key>' -H 'Content-Type: application/json' -d '{"paths": ["/public/images/profile.jpg"]}' https://api.gumlet.com/v1/purge/myimg

Any other response means the cache purge was unsuccessful and the server will return error message along with the reason for the same.

caution

We have deprecated our old endpoint https://www.gumlet.com/api/purge/:subdoamin