Create project label ​
POST/api/v1/workspaces/{slug}/project-labels/
Create a new project label in the workspace with name, color, and description.
Path Parameters ​
slug:requiredstringWorkspace slug
Body Parameters ​
name:requiredstringName.
description:optionalstringDescription.
color:optionalstringColor.
sort_order:optionalnumberSort order.
Scopes ​
projects.labels:write
Create project label
bash
curl -X POST \
"https://api.plane.so/api/v1/workspaces/my-workspace/project-labels/" \
-H "X-API-Key: $PLANE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Example Name",
"color": "#ff0000",
"description": "Example description"
}'python
import requests
response = requests.post(
"https://api.plane.so/api/v1/workspaces/my-workspace/project-labels/",
headers={"X-API-Key": "your-api-key"},
json={
"name": "Example Name",
"color": "#ff0000",
"description": "Example description"
}
)
print(response.json())javascript
const response = await fetch("https://api.plane.so/api/v1/workspaces/my-workspace/project-labels/", {
method: "POST",
headers: {
"X-API-Key": "your-api-key",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Example Name",
color: "#ff0000",
description: "Example description",
}),
});
const data = await response.json();Response201
json
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Example Name",
"color": "#f39c12",
"description": "Example description",
"sort_order": 65535,
"workspace": "550e8400-e29b-41d4-a716-446655440000",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"created_by": "550e8400-e29b-41d4-a716-446655440000",
"updated_by": "550e8400-e29b-41d4-a716-446655440000"
}
