Remove tags (bulk)

Remove tags in bulk API

POST https://api.imagekit.io/v1/files/removeTags

Remove tags from multiple files in a single request.

Headers

NameTypeDescription

Authorization

string

base64 encoding of your_private_api_key:

Note the colon in the end.

Request Body

NameTypeDescription

fileIds

array

Each value should be a unique fileId of the uploaded file. fileId is returned in the list files API and upload API. Tags can only be removed from the current version of the file.

tags

array

An array of tags to remove from these files.

{
    "successfullyUpdatedFileIds": [
        "5e21880d5efe355febd4bccd",
        "5e1c13c1c55ec3437c451403",
        "5f4abf6fae77ae7f0acda3d1", 
        "5f207bd1bd2741182ceadd55"
    ]
}

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 -X POST "https://api.imagekit.io/v1/files/removeTags" \
-H 'Content-Type: application/json' \
-u your_private_key: -d '
{
	"fileIds" : [
		"file_id_1",
		"file_id_2"
	],
	"tags" : [
		"tag_to_remove_1", 
		"tag_to_remove_2"
	]
}
'

Last updated