Create a new label

POST {{api-server}}/{{Filerobot-Token}}/v5/labels

This API endpoint creates a new label in the project's structure.

Body parameters:

Name:Description:Syntax:Value/Example:
nameName of the new label"name": "Fashion"
colorColor of the new labelThe value is in Hex color code."color": "#9580E9"
shapeShape of the new labelOptional parameter"shape": "pin"
is_pinnedSpecifies if the label should appear at the top of the listDefault value is false"is_pinned": false
permissionsDefines who has rights to see and use this label

vewing defines who is able to see this Label

attaching defines who is eligible to attach the label to assets
"scope": "SK_ORG" - gives access to all Users in the projects

ids - specific user_ids can be defined to have access to this label
"permissions": { "viewing": { "scope": "SK_ORG", "ids": null }, "attaching": { "scope": "SK_ORG", "ids": null } }

Request Body

{"label"=>{"name"=>"Fashion", "color"=>"#9580E9", "shape"=>"pin", "is_pinned"=>false, "permissions"=>{"viewing"=>{"scope"=>"SK_ORG", "ids"=>nil}, "attaching"=>{"scope"=>"SK_ORG", "ids"=>nil}}}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
X-Filerobot-Keystring

RESPONSES

status: OK

{"status":"success","duration":0.4325568675994873,"api_version":{"hash":"b0d23b8fa1ae371a4966d57ae5237d65ced42d32","datetime":"2024-06-19T11:07:33+07:00","module":"elastic_v2"},"label":{"uuid":"791c5d9d-0ed8-4f2b-97c1-a768d79bf8eb","sid":"#lbjh69fya","name":"Fashion","created_at":"2024-06-19T16:25:16Z","updated_at":"2024-06-19T16:25:16Z"}}