Remove tags (bulk)
post
https://api.imagekit.io
/v1/files/removeTags
Remove tags in bulk API

Response structure and status code

In case of an error, you will get an error code along with the error message. On success, you will receive a 200 status code with an array of successfully updated fileIds.

Examples

Here is the example request to understand the API usage.
cURL
Node.js
Ruby
1
curl -X POST "https://api.imagekit.io/v1/files/removeTags" \
2
-H 'Content-Type: application/json' \
3
-u your_private_key: -d '
4
{
5
"fileIds" : [
6
"file_id_1",
7
"file_id_2"
8
],
9
"tags" : [
10
"tag_to_remove_1",
11
"tag_to_remove_2"
12
]
13
}
14
'
Copied!
1
var ImageKit = require("imagekit");
2
3
var imagekit = new ImageKit({
4
publicKey : "your_public_api_key",
5
privateKey : "your_private_api_key",
6
urlEndpoint : "https://ik.imagekit.io/your_imagekit_id/"
7
});
8
9
var fileIds = ["file_id_1", "file_id_2"];
10
var tags = ["tag_to_remove_1", "tag_to_remove_2"];
11
12
imagekit.bulkRemoveTags(fileIds, tags, function(error, result) {
13
if(error) console.log(error);
14
else console.log(result);
15
});
Copied!
1
imagekitio = ImageKitIo::Client.new("your_private_key", "your_public_key", "your_url_endpoint")
2
imagekitio.delete_bulk_tags(
3
file_ids: [
4
"file_id_1",
5
"file_id_2"
6
],
7
tags: ['tag_to_remove_1', 'tag_to_remove_2']
8
)
Copied!