Skip to main content
PUT
https://postsyncer.com/api/v1
labels
/
{id}
{
  "name": "Updated Product Launch",
  "color": "#00ff00"
}
{ 
  "id": 16,
  "name": "Updated Product Launch",
  "color": "#00ff00"
  "workspace": {
      "id": 12,
      "name": "abdulmejidshemsuawel",
      "slug": "abdulmejidshemsuawel",
      "type": "PERSONAL",
      "logo": null,
      "timezone": "Africa/Addis_Ababa",
      "language": "en"
  } 
}

Update Label

Updates an existing label with new name or color information.

Request

id
integer
required
The ID of the label to update
name
string
required
The name of the label
color
string
required
Hex color code for the label (e.g., “#ff0000” for red)
{
  "name": "Updated Product Launch",
  "color": "#00ff00"
}

Response

id
integer
Unique identifier for the updated label
name
string
The updated name of the label
color
string
The updated hex color code of the label
workspace
object
Information about the label’s workspace
created_at
string
Creation timestamp in workspace timezone
updated_at
string
Last update timestamp in workspace timezone
{ 
  "id": 16,
  "name": "Updated Product Launch",
  "color": "#00ff00"
  "workspace": {
      "id": 12,
      "name": "abdulmejidshemsuawel",
      "slug": "abdulmejidshemsuawel",
      "type": "PERSONAL",
      "logo": null,
      "timezone": "Africa/Addis_Ababa",
      "language": "en"
  } 
}

Code Examples

curl -X PUT "https://postsyncer.com/api/v1/labels/123" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Product Launch",
    "color": "#00ff00"
  }'

Error Codes

400
Bad Request
Validation errors or invalid parameters
401
Unauthorized
Missing or invalid API token
403
Forbidden
Token does not have ‘labels’ permission
404
Not Found
Label not found or user does not have access to the label’s workspace
422
Unprocessable Entity
Validation errors in request data