Skip to main content
POST
/
labels
curl -X POST https://app.trypost.it/api/labels \
  -H "Authorization: Bearer tp_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Product Launch",
    "color": "#4f46e5"
  }'
{
  "data": {
    "id": "c3d4e5f6-a7b8-9c0d-1e2f-3a4b5c6d7e8f",
    "name": "Product Launch",
    "color": "#4f46e5",
    "created_at": "2025-01-10 08:00:00",
    "updated_at": "2025-01-10 08:00:00"
  }
}

Request

name
string
required
The label name. Maximum 255 characters.
color
string
required
Hex color code (e.g., #FF5733). Must match the format #RRGGBB.

Response

Returns the created label.
curl -X POST https://app.trypost.it/api/labels \
  -H "Authorization: Bearer tp_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Product Launch",
    "color": "#4f46e5"
  }'
{
  "data": {
    "id": "c3d4e5f6-a7b8-9c0d-1e2f-3a4b5c6d7e8f",
    "name": "Product Launch",
    "color": "#4f46e5",
    "created_at": "2025-01-10 08:00:00",
    "updated_at": "2025-01-10 08:00:00"
  }
}