Invalidation API
Create invalidation requests via API
Last updated
Create invalidation requests via API
The Invalidation API is a REST API that lets you remove cached images from the CDN and Cloudimage resizing servers.
Your API key is available in the Cloudimage admin console, under Invalidation:

Body:
For Cloudimage tokens created before November 2021, the invalidated URL should include "/v7/". Example: /v7/https://img.domain.com/image2.jpg
For Cloudimage tokens created after November 2021, the invalidated URL should not include "/v7/". Example: https://img.domain.com/image2.jpg
If you are using the Origin prefix, its value should not be included. Example: images/image1.jpg
If you are using an alias, the alias should be invalidated (not the original value behind it). Example: _alias_/images/image1.jpg
If you are using Invalidation with scope 'original', please do not append any Cloudimage query string parameters at the end of the invalidated URL. Example:
correct URL format: https://img.domain.com/image2.jpg
incorrect URL format: https://img.domain.com/image2.jpg?w=600
Flushing all images will result in Cloudimage downloading all your images from your origin image storage again. This will result in slower image loading times for the first times the images are downloaded.
Contact us if you have more than 1 TB of monthly CDN traffic or 1 TB of storage.
Try it out with the doc token
You can use our sample image showing the time it is resized the first time:
Last updated
POST https://api.cloudimage.com/invalidateX-Client-Key: your_API_KEY
Content-Type: application/json{
"scope": "original",
"urls": ["/sample.li/birds.jpg",
"/sample.li/boat.jpg", ...
]
}{
"scope": "all"
}