🏷️ Labels

Create a label

Create a new label in the specified workspace. Color must be one of color_1..color_20.

post/api/v1/workspaces/{workspace_id}/labels

Request

  • Base URL
    https://api.contentstudio.io
  • URL
    https://api.contentstudio.io/api/v1/workspaces/{workspace_id}/labels
  • Auth
    API key in header X-API-Key

Path parameters

workspace_idstring required
Example:610a1e660cb41530ca40d372

Request body

namestring required
color'color_1' | 'color_2' | 'color_3' | 'color_4' | 'color_5' | 'color_6' | 'color_7' | 'color_8' | 'color_9' | 'color_10' | 'color_11' | 'color_12' | 'color_13' | 'color_14' | 'color_15' | 'color_16' | 'color_17' | 'color_18' | 'color_19' | 'color_20' required

Example request

{
  "name": "Urgent",
  "color": "color_2"
}

Response

Label created

statusboolean
messagestring

Example response

{
  "status": true,
  "message": "Label created successfully. Use the returned `id` in `labels[]` when creating a post, or to update or delete this label.",
  "data": {
    "id": "625d06734ceb636c2f5e7743",
    "_id": "625d06734ceb636c2f5e7743",
    "name": "Urgent",
    "color": "color_2"
  }
}

Changes

No recorded changes to this operation across all 9 revisions of this API.