Create a release label
POST/api/v1/workspaces/{workspace_slug}/releases/labels/
Creates a new release label in the workspace label catalog. The label name must be unique per workspace (or per project, when scoped to one), otherwise the request fails with a 400 RELEASE_LABEL_NAME_ALREADY_EXISTS error.
Path Parameters
workspace_slug:requiredstringThe workspace_slug represents the unique workspace identifier for a workspace in Plane. It can be found in the URL. For example, in the URL https://app.plane.so/my-team/projects/, the workspace slug is my-team.
Body Parameters
name:requiredstringName of the release label.
color:optionalstringHex color code for the label. Defaults to #4E5355.
sort_order:optionalnumberSort order for the label. Defaults to 0.
project:optionalstringID of the project to scope the label to. When omitted, the label is workspace-wide. This cannot be changed after creation.
Scopes
releases.labels:write
Create a release label
bash
curl -X POST \
"https://api.plane.so/api/v1/workspaces/my-workspace/releases/labels/" \
-H "X-API-Key: $PLANE_API_KEY" \
# Or use -H "Authorization: Bearer $PLANE_OAUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Breaking change",
"color": "#FF5630",
"sort_order": 10
}'python
import requests
response = requests.post(
"https://api.plane.so/api/v1/workspaces/my-workspace/releases/labels/",
headers={"X-API-Key": "your-api-key"},
json={
'name': 'Breaking change',
'color': '#FF5630',
'sort_order': 10
}
)
print(response.json())javascript
const response = await fetch(
"https://api.plane.so/api/v1/workspaces/my-workspace/releases/labels/",
{
method: "POST",
headers: {
"X-API-Key": "your-api-key",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Breaking change",
color: "#FF5630",
sort_order: 10,
}),
},
);
const data = await response.json();Response201
json
{
"id": "f6a7b8c9-d0e1-2345-fabc-678901234567",
"name": "Breaking change",
"color": "#FF5630",
"sort_order": 10,
"workspace": "cd4ab5a2-1a5f-4516-a6c6-8da1a9fa5be4",
"project": null
}
