Source APIs

Purge Cache API

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

post
Purge Cache

https://api.gumlet.com/v1/purge/:subdomain
You can purge cache for any image by using our cache purge API.
Request
Response
Request
Path Parameters
subdomain
required
string
Subdomain 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
required
string
Bearer <Your API Key>
Body Parameters
paths
required
array
An 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"]
Response
200: OK
{success: true}

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.