Creates a label in the organization’s label catalog and returns its identifier.
https://api.doboard.com/{account_id}/label_add
account_id is the numeric organization identifier associated with the user session.
GET, POST.
For GET, send parameters in the query string. For POST, use application/x-www-form-urlencoded.
POST is recommended because the method creates a record.
Requires a valid user session_id. Guest sessions are not supported.
The method does not require administrator or project manager permissions.
Public task tokens, public project tokens and MCP tokens do not provide access to this method.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
session_id |
string | Yes | — | Authenticated session ID. |
name |
string | Yes | — | Label name. Truncated to the first 16 characters. |
color |
string | Yes | — | Exactly six hexadecimal characters, without a leading #. Example: 0066FF. |
name is rejected.color accepts digits 0–9 and letters a–f in either case.data.archived_label_ids.ACTIVE.The archived-label conflict check does not reject matching names belonging only to active or removed labels.
POST /42/label_add HTTP/1.1
Host: api.doboard.com
Content-Type: application/x-www-form-urlencoded
session_id=YOUR_SESSION_ID&name=Bug&color=0066FF
Equivalent cURL request:
curl --request POST 'https://api.doboard.com/42/label_add' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'session_id=YOUR_SESSION_ID' \
--data-urlencode 'name=Bug' \
--data-urlencode 'color=0066FF'
All identifiers in examples are illustrative.
{
"data": {
"operation_status": "SUCCESS",
"label_id": "301"
}
}
| Field | Description |
|---|---|
data.operation_status |
SUCCESS when creation succeeds. |
data.label_id |
Identifier of the created label. Returned as a numeric string by the current implementation. |
The response does not contain the complete label object. Use label_get with the returned identifier to retrieve it.
| HTTP Code | error_no |
Message | Description |
|---|---|---|---|
401 |
401 |
session_id Unknown |
Missing or invalid session. |
403 |
403 |
Permission denied |
The authentication context is not permitted to call this method, including guest sessions. |
200 |
2701 |
name is required |
Label name is missing or empty. |
200 |
2702 |
color must be between 000000 and FFFFFF |
Color is not exactly six hexadecimal characters. |
200 |
2703 |
color is required |
Color is missing or empty. |
200 |
2704 |
An archived label with this name exists |
An archived label matches the resulting name. |
200 |
0 |
Internal API Error |
The label could not be created. |
{
"data": {
"operation_status": "FAILED",
"operation_message": "An archived label with this name exists",
"archived_label_ids": [205]
},
"error_message": "An archived label with this name exists",
"error_no": 2704
}
archived_label_ids contains matching archived label identifiers in ascending order. No new label is created when this error is returned.
"0" as missing.