Labels
Labels
Labels are shared, colour-coded tags that group posts, media library items, and time slots inside a workspace. Use this API to list what exists, rename or recolour a label, and remove one.
Requirements
Authentication: Bearer API token
Scope:
labelsHeaders:
Authorization: Bearer-API YOUR_API_KEYPubler-Workspace-Id: YOUR_WORKSPACE_ID
Endpoint
List Labels
Retrieve every label in the workspace, ordered by name.
GET /api/v1/labelsRetrieves every label in the workspace, ordered by name.
API key authentication. Format: "Bearer-API YOUR_API_KEY"
ID of the workspace containing the labels
Successful operation
Unauthorized
Permission denied or missing required scope
GET /api/v1/labels HTTP/1.1
Host: app.publer.com
Authorization: YOUR_API_KEY
Publer-Workspace-Id: text
Accept: */*
{
"data": [
{
"id": "text",
"name": "text",
"color": "text"
}
]
}Returns every label regardless of whether anything is currently attached to it:
List Labels by Type
Retrieve only the labels currently attached to resources of a given type.
Path Parameters
type
string
Yes
One of post, medium (media library items) or timeslot
Retrieves only the labels currently attached to resources of a given type. NOTE: for this operation the path segment is a label TYPE, not a label ID.
API key authentication. Format: "Bearer-API YOUR_API_KEY"
Label type to list: post, medium (media library items) or timeslot
ID of the workspace containing the labels
Successful operation
The requested type, echoed back
Unauthorized
Forbidden - unknown label type
GET /api/v1/labels/{id} HTTP/1.1
Host: app.publer.com
Authorization: YOUR_API_KEY
Publer-Workspace-Id: text
Accept: */*
{
"data": [
{
"id": "text",
"name": "text",
"color": "text"
}
],
"type": "text"
}When type is post, this endpoint also accepts the same filters as List Posts — state, account_ids[], from, to, query, postType, member_id and others — and returns only the labels attached to posts matching that filter. This is how you answer "which labels are in use on failed posts this month".
An unrecognised type returns 403 Forbidden, not 404.
Update Label
Rename a label or change its colour.
Renames a label or changes its colour. Renaming also updates any timeslot or recycling rule that referenced the old name.
API key authentication. Format: "Bearer-API YOUR_API_KEY"
ID of the label to update
ID of the workspace containing the labels
New label name
New label colour
Label updated
Unique identifier for the label
Label name
Label colour
Unauthorized
Forbidden - requires workspace admin or owner
Unprocessable Entity - invalid attributes
PUT /api/v1/labels/{id} HTTP/1.1
Host: app.publer.com
Authorization: YOUR_API_KEY
Publer-Workspace-Id: text
Content-Type: application/json
Accept: */*
Content-Length: 30
{
"name": "text",
"color": "text"
}{
"id": "text",
"name": "text",
"color": "text"
}Delete Label
Delete a label and detach it from everything it was attached to.
Query Parameters
type
string
Yes
One of post, medium or timeslot. The request is rejected without it.
Deletes a label and detaches it from every resource it was attached to.
API key authentication. Format: "Bearer-API YOUR_API_KEY"
ID of the label to delete
Label type. Required - the request is rejected without it.
ID of the workspace containing the labels
Label deleted
Unauthorized
Forbidden - requires workspace admin or owner, or unknown label type
DELETE /api/v1/labels/{id}?type=post HTTP/1.1
Host: app.publer.com
Authorization: YOUR_API_KEY
Publer-Workspace-Id: text
Accept: */*
{
"id": "text",
"type": "text"
}Deleting removes the label everywhere at once — it is not scoped to the type you pass. The type parameter is required for the request to be accepted and is echoed back in the response.
Notes
Permissions.
List LabelsandList Labels by Typeare available to any member of the workspace. Update and Delete require workspace admin or owner — other roles receive403 Forbidden.The path segment means different things per method. On
GETit is a label type; onPUTandDELETEit is a label ID. They share one path template because a type listing and a label lookup occupy the same position in the URL.Label names are unique per workspace. Attaching an existing name reuses that label rather than creating a duplicate.
Colours are free-form strings; the apps use hex values such as
#E8613C.
Related Resources
Post Labels — Attaching labels when creating posts
List Posts — Filter posts by label
Media — Filter the library by label
Last updated
Was this helpful?

