Documentation

Help & Knowledgebase

APIs

Image invalidation API

This API invalidates a single, multiple or all image URLs associated to your Cloudimage Token. To use it, please request an API key from hello@cloudimage.io or by sending a request via the form at the bottom of this page.

POST http://api.cloudimg.io/invalidate/

HTTP Headers:

X-Client-Token: {client_cloudimage_api_token : contact us}
Content-Type: application/json

HTTP JSON data for a single image:

{
  "invalidation": {
    "scope": "url",
    "url": "sample.li/paris.jpg"
  }
}

HTTP JSON data for a invalidating multiple image URLs:

{
    "invalidation": {
        "scope": "urls",
        "urls": ["sample.li/paris.jpg", "sample.li/boat.jpg", ...]
    }
}

HTTP JSON data for a invalidating all image URLs:

{
    "invalidation": {
        "scope": "all"
    }
}

HTTP Response:

  • HTTP 200 with invalidation information
  • HTTP 403 if you used a wrong token
  • HTTP 400 if the JSON input format was wrong
This API call will invalidate the image(s) on (1) Cloudimage's resizing servers and on (2) all CDN Points of Presense (POPs).
It might take up to few minutes to have the image(s) invalidated on all servers listed above. You should also clear your browser's cache to see the new image.