Add Label to File/Folder
This API helps in adding labels to the required files and folders.
Endpoints
OAuth Scope
WorkDrive.files.CREATECopied!
curl --request POST \
--url https://www.zohoapis.com/workdrive/api/v1/labels/{label_id}/relationships/files \
--header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
--header 'content-type: application/vnd.api+json' \
--data '{"data":{"attributes":{"resource_id":"ly9zm1d1ee3b833c1438a9232ad6ac77bc8f2"},"id":"ly9zm1d1ee3b833c1438a9232ad6ac77bc8f2","type":"files"}}'Path Parameters
label_idstring(Required)
The unique ID of a label
Request Body
application/vnd.api+jsondataJSON Object(Required)
Hide Sub-Attributes
attributesJSON Object(Required)
Hide Sub-Attributes
resource_idstring(Required)
A unique ID of the file or folder
idstring(Required)
A unique ID of the file or folder
typestring(Required)
The JSON:API resource type. Always "files".
Allowed Values :
Show Values ▾
filesCopied!
Copy all as JSON Array
{
"data": {
"attributes": {
"resource_id": "ly9zm1d1ee3b833c1438a9232ad6ac77bc8f2"
},
"id": "ly9zm1d1ee3b833c1438a9232ad6ac77bc8f2",
"type": "files"
}
}
204 No Content {
"errors": [
{
"id": "L010",
"title": "Cannot apply labels for more than 20 files at a time"
}
]
}
{
"errors": [
{
"id": "L011",
"title": "Maximum labels applied for this file"
}
]
}
© 2026, Zoho Corporation Pvt. Ltd. All Rights Reserved.