Skip to main content
POST
/
labels
Create or find a label
curl --request POST \
  --url https://slog.ai/labels \
  --header 'Content-Type: application/json' \
  --header 'slog-api-key: <api-key>' \
  --data '
{
  "name": "bug",
  "color": "#ff0000"
}
'
{
  "label": {
    "id": "label_01jqlabel001",
    "name": "bug",
    "color": "#EF4444"
  }
}

Authorizations

slog-api-key
string
header
required

API key obtained from the Slog dashboard or returned by the signup/invite-redeem flows. Pass as the slog-api-key header.

Body

application/json
name
string
required

Label name. Must be unique within the workspace.

Minimum string length: 1
Example:

"bug"

color
string | null

Hex color code for the label.

Example:

"#ff0000"

Response

Label created or found.

label
object