Labels API
Labels help categorize and organize resources in Kordon. Labels can optionally belong to label groups for better organization.
POST /labels/
Section titled “POST /labels/”Create a new label.
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Display name of the label. Must be unique across all labels. |
color | string | No | Hex color code for the label (e.g., #FFC0CB, #008080). |
label_group_id | UUID/null | No | ID of the label group this label belongs to. Set to null or omit for ungrouped labels. |
position | integer | No | Sort order within the group or globally. If omitted, label will be added at the end. |
curl --location 'https://YOUR_KORDON_DOMAIN/api/v1/labels/' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer YOUR-TOKEN' \--data '{ "title": "High Priority", "color": "#FF5733", "label_group_id": "018ad4a2-5f71-4758-a652-86dcf2ecc003"}'Example response:
Status 200
{ "data": { "id": "c2e8f3a1-9b4d-4c7e-a5f2-1d3e8b9c0a7f", "color": "#FF5733", "group": { "id": "018ad4a2-5f71-4758-a652-86dcf2ecc003", "title": "Applicability" }, "group_title": "Applicability", "label_group_id": "018ad4a2-5f71-4758-a652-86dcf2ecc003", "permissions": { "update": true, "destroy": true, "connect": true, "changelog": true }, "position": 3, "title": "High Priority", "updated_at": "2026-01-29T10:15:30+00:00" }}GET /labels/
Section titled “GET /labels/”List all labels in your organization.
Fields
| Field | Type | Description |
|---|---|---|
id | UUID | Unique identifier for the label. |
title | string | Display name of the label. |
color | string | Hex color code for the label (e.g., #FFC0CB). |
position | integer | Sort order within the group (or globally if ungrouped). |
label_group_id | UUID/null | ID of the parent label group, or null if ungrouped. |
group_title | string/null | Title of the parent label group, or null if ungrouped. |
group | object/array | Label group details containing id and title, or empty array if ungrouped. |
permissions | object | User permissions: update, destroy, connect, changelog. |
updated_at | timestamp | ISO 8601 timestamp of last update. |
curl --location --request GET 'https://YOUR_KORDON_DOMAIN/api/v1/labels/' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer YOUR-TOKEN'Example response
Status: 200
{ "data": [ { "id": "81bb6227-005f-4b1e-bf11-fbb9b96adb4d", "color": "#FFC0CB", "group": { "id": "018ad4a2-5f71-4758-a652-86dcf2ecc003", "title": "Applicability" }, "group_title": "Applicability", "label_group_id": "018ad4a2-5f71-4758-a652-86dcf2ecc003", "permissions": { "update": true, "destroy": true, "connect": true, "changelog": true }, "position": 1, "title": "Applicable", "updated_at": "2024-10-02T12:41:49+00:00" }, { "id": "74a5222a-f559-486b-9201-10311d479d2c", "color": "#008080", "group": { "id": "a27a3db8-1fc9-4be0-b65c-a55ea9b984da", "title": "Risk type" }, "group_title": "Risk type", "label_group_id": "a27a3db8-1fc9-4be0-b65c-a55ea9b984da", "permissions": { "update": true, "destroy": true, "connect": true, "changelog": true }, "position": 1, "title": "Information security", "updated_at": "2025-01-14T14:30:22+00:00" }, { "id": "f5ce9c4a-b4d9-4fbb-bc8a-623e4691e431", "color": "#707B89", "group": { "id": "1d677e65-aafe-450b-9a4f-1850f616f15c", "title": "Asset type" }, "group_title": "Asset type", "label_group_id": "1d677e65-aafe-450b-9a4f-1850f616f15c", "permissions": { "update": true, "destroy": true, "connect": true, "changelog": true }, "position": 1, "title": "Information asset", "updated_at": "2025-04-03T09:23:42+00:00" }, { "id": "e78fc07b-e9c0-48a1-84dc-ead4f6313c00", "color": "#707B89", "group": { "id": "018ad4a2-5f71-4758-a652-86dcf2ecc003", "title": "Applicability" }, "group_title": "Applicability", "label_group_id": "018ad4a2-5f71-4758-a652-86dcf2ecc003", "permissions": { "update": true, "destroy": true, "connect": true, "changelog": true }, "position": 2, "title": "Not applicable", "updated_at": "2024-10-02T12:41:55+00:00" }, { "id": "aa755ff4-ea06-4007-a5b8-35293796981e", "color": "#A52A2A", "group": { "id": "1d677e65-aafe-450b-9a4f-1850f616f15c", "title": "Asset type" }, "group_title": "Asset type", "label_group_id": "1d677e65-aafe-450b-9a4f-1850f616f15c", "permissions": { "update": true, "destroy": true, "connect": true, "changelog": true }, "position": 2, "title": "Physical asset", "updated_at": "2025-04-03T09:23:45+00:00" }, { "id": "f20d7c86-5fdc-4cb8-800c-bd3f36bfef78", "color": "#00FF00", "group": { "id": "a27a3db8-1fc9-4be0-b65c-a55ea9b984da", "title": "Risk type" }, "group_title": "Risk type", "label_group_id": "a27a3db8-1fc9-4be0-b65c-a55ea9b984da", "permissions": { "update": true, "destroy": true, "connect": true, "changelog": true }, "position": 2, "title": "Environmental", "updated_at": "2025-01-14T14:30:25+00:00" }, { "id": "271b6c2a-ca70-4ca8-900c-ec52b4d4e683", "color": "#0000FF", "group": { "id": "a27a3db8-1fc9-4be0-b65c-a55ea9b984da", "title": "Risk type" }, "group_title": "Risk type", "label_group_id": "a27a3db8-1fc9-4be0-b65c-a55ea9b984da", "permissions": { "update": true, "destroy": true, "connect": true, "changelog": true }, "position": 3, "title": "Quality", "updated_at": "2025-01-14T14:30:28+00:00" }, { "id": "b67bea5a-fc23-416d-824b-04c5609633e3", "color": "#FFA500", "group": { "id": "a27a3db8-1fc9-4be0-b65c-a55ea9b984da", "title": "Risk type" }, "group_title": "Risk type", "label_group_id": "a27a3db8-1fc9-4be0-b65c-a55ea9b984da", "permissions": { "update": true, "destroy": true, "connect": true, "changelog": true }, "position": 4, "title": "Compliance", "updated_at": "2025-01-14T14:30:31+00:00" }, { "id": "8cc259df-01fe-43c6-80ef-d0449d78afc1", "color": "#707B89", "group": [], "group_title": null, "label_group_id": null, "permissions": { "update": true, "destroy": true, "connect": true, "changelog": true }, "position": 1, "title": "Single label that is not in a group", "updated_at": "2025-12-19T14:23:13+00:00" } ], "meta": { "total_count": 9, "page": 1, "permissions": { "create": true } }}Meta Fields
| Field | Type | Description |
|---|---|---|
total_count | integer | Total number of labels in the organization. |
page | integer | Current page number. |
permissions.create | boolean | Whether the current user can create new labels. |
PATCH /labels/:id
Section titled “PATCH /labels/:id”Update an existing label. Only include the fields you want to update.
Updatable Fields
| Field | Type | Description |
|---|---|---|
title | string | Display name of the label. Must be unique across all labels. |
color | string | Hex color code for the label. |
label_group_id | UUID/null | ID of the label group. Set to null to remove from group. |
position | integer | Sort order within the group or globally. |
curl --location --request PATCH 'https://YOUR_KORDON_DOMAIN/api/v1/labels/c2e8f3a1-9b4d-4c7e-a5f2-1d3e8b9c0a7f' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer YOUR-TOKEN' \--data '{ "title": "Critical Priority", "color": "#FF0000"}'Example response:
Status 200
{ "data": { "id": "c2e8f3a1-9b4d-4c7e-a5f2-1d3e8b9c0a7f", "color": "#FF0000", "group": { "id": "018ad4a2-5f71-4758-a652-86dcf2ecc003", "title": "Applicability" }, "group_title": "Applicability", "label_group_id": "018ad4a2-5f71-4758-a652-86dcf2ecc003", "permissions": { "update": true, "destroy": true, "connect": true, "changelog": true }, "position": 3, "title": "Critical Priority", "updated_at": "2026-01-29T11:30:15+00:00" }}DELETE /labels/:id
Section titled “DELETE /labels/:id”Delete a label.
curl --location --request DELETE 'https://YOUR_KORDON_DOMAIN/api/v1/labels/c2e8f3a1-9b4d-4c7e-a5f2-1d3e8b9c0a7f' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer YOUR-TOKEN'Example response:
Status 200
{ "data": { "id": "c2e8f3a1-9b4d-4c7e-a5f2-1d3e8b9c0a7f", "title": "Critical Priority", "deleted": true }}