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

Create Label

Creates a new label to help categorize and organize your social media posts. Labels can be used to group related content together for better organization and filtering.

Request

workspace_id
integer
required
The ID of the workspace where the label will be created
name
string
required
The name of the label
color
string
required
Hex color code for the label (e.g., “#ff0000” for red)
{
  "workspace_id": 1,
  "name": "Product Launch",
  "color": "#ff0000"
}

Response

id
integer
Unique identifier for the created label
name
string
The name of the label
color
string
The 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": "Product Launch",
  "color": "#ff0000",
  "workspace": {
      "id": 12,
      "name": "abdulmejidshemsuawel",
      "slug": "abdulmejidshemsuawel",
      "type": "PERSONAL",
      "logo": null,
      "timezone": "Africa/Addis_Ababa",
      "language": "en"
  } 
}

Code Examples

curl -X POST "https://postsyncer.com/api/v1/labels" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "workspace_id": 1,
    "name": "Product Launch",
    "color": "#ff0000"
  }'

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
Workspace not found or user does not have access to the workspace
422
Unprocessable Entity
Validation errors in request data