Add tags (bulk)
post
https://api.imagekit.io
/v1/files/addTags
Add 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
Ruby
1
curl -X POST "https://api.imagekit.io/v1/files/addTags" \
2
-H 'Content-Type: application/json' \
3
-u your_private_key: -d '
4
{
5
"fileIds" : [
6
"5e21880d5efe355febd4bccd",
7
"5e1c13c1c55ec3437c451403",
8
"5f4abf6fae77ae7f0acda3d1",
9
"5f207bd1bd2741182ceadd55"
10
],
11
"tags" : [
12
"tag-to-add-1",
13
"tag-to-add-2"
14
]
15
}
16
'
Copied!
1
imagekitio = ImageKitIo::Client.new("your_private_key", "your_public_key", "your_url_endpoint")
2
imagekitio.add_bulk_tags(
3
file_ids: [
4
"5e21880d5efe355febd4bccd",
5
"5e1c13c1c55ec3437c451403",
6
"5f4abf6fae77ae7f0acda3d1",
7
"5f207bd1bd2741182ceadd55"
8
],
9
tags: ['tag-to-add-1', 'tag-to-add-2']
10
)
Copied!
Last modified 1mo ago