Client Labels

Create Client Label

Creates a custom client label. The `code` is derived from `name` and is not accepted from the request: it is the stable identifier logic keys off, so it never changes once assigned.

POST
/api/v2/client-labels

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Writable fields of a custom label. code and kind are not writable: code is derived from name at creation and then fixed, and only custom labels can be written at all.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v2/client-labels" \  -H "Content-Type: application/json" \  -d '{    "name": "VIP",    "colour": "#8E44AD"  }'
{  "code": "deposited",  "name": "Deposited",  "kind": "system",  "colour": "#8E44AD",  "id": 1}
{  "error": {    "message": "Bad Request",    "code": 0,    "details": [      {        "issue": "The selected value is invalid.",        "field": "parameter"      }    ]  }}
{  "error": {    "message": "Unauthorized"  }}
{  "error": {    "message": "Forbidden"  }}
{  "error": {    "message": "Unprocessable Entity"  }}
{  "error": {    "message": "Too Many Requests"  }}
{  "error": {    "message": "Service Unavailable"  }}