Skip to main content

create-label

restish dci create-label

Creates a new label.

Request

Content-Type: application/json

Schema

{
"required": [
"name",
"color"
],
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the label"
},
"color": {
"type": "string",
"enum": [
"blue",
"skyBlue",
"teal",
"mint",
"lime",
"softYellow",
"apricot",
"lavendar",
"purple",
"rosePink",
"slateGrey"
],
"description": "The color of the label"
}
}
}

Responses

201 (application/json)

Created - Label created successfully.

{
"required": [
"id",
"name",
"color"
],
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the label"
},
"name": {
"type": "string",
"description": "The name of the label"
},
"color": {
"type": "string",
"enum": [
"blue",
"skyBlue",
"teal",
"mint",
"lime",
"softYellow",
"apricot",
"lavendar",
"purple",
"rosePink",
"slateGrey"
],
"description": "The color of the label"
},
"type": {
"type": "string",
"enum": [
"custom",
"preset"
],
"description": "The type of the label (custom or preset)"
},
"createTime": {
"type": "string",
"format": "date-time",
"description": "The time when the label was created"
},
"updateTime": {
"type": "string",
"format": "date-time",
"description": "The time when the label was last updated"
}
}
}

400 (application/json)

Bad Request - The server cannot process the request, often due to a malformed request.

{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}

401 (application/json)

Unauthorized - Invalid API key.

{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}

403 (application/json)

Forbidden - The client is not authorized to perform the request.

{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}

404 (application/json)

Not Found - The requested resource does not exist.

{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}

Aliases: create-label, createlabel