Article Labels

Article labels are only available on the Professional and Enterprise plans.

JSON Format

Article Labels are represented as JSON objects with the following properties:

Name Type Read-only Mandatory Description
created_at string true false The time at which the label was created
id integer true false Automatically assigned when the label is created
name string false true The actual name of the label
updated_at string true false The time at which the label was last updated
url string true false The API url of this label
Example
{
  "created_at": "2012-04-04T09:14:57Z",
  "id": 2003,
  "name": "instructions"
}

List All Labels

  • GET /api/v2/help_center/articles/labels
  • GET /api/v2/help_center/{locale}/articles/labels

Lists all the labels in the articles in Help Center.

Allowed for
  • Agents
Parameters
Name Type In Required Description
locale string Path false The locale that the category is displayed in
Using curl
curl https://{subdomain}.zendesk.com/api/v2/help_center/{locale}/articles/labels.json \
  -v -u {email_address}:{password}
Example Response
Status 200 OK

{
  "labels": [
    {
      "created_at": "2012-04-04T09:14:57Z",
      "id": 2003,
      "name": "instructions",
      "updated_at": "2012-04-04T09:14:57Z",
      "url": "https://{subdomain}.zendesk.com/api/v2/help_center/en-us/articles/labels/42.json"
    }
  ]
}

Show Label

  • GET /api/v2/help_center/articles/labels/{label_id}

Shows the properties of the specified label.

Allowed for
  • Agents
Parameters
Name Type In Required Description
label_id integer Path true The unique ID of this Label
Using curl
curl https://{subdomain}.zendesk.com/api/v2/help_center/{locale}/articles/labels/{label_id}.json \
  -v -u {email_address}:{password}
Example Response
Status 200 OK

{
  "label": {
    "created_at": "2012-04-04T09:14:57Z",
    "id": 2003,
    "name": "instructions",
    "updated_at": "2012-04-04T09:14:57Z",
    "url": "https://{subdomain}.zendesk.com/api/v2/help_center/en-us/articles/labels/42.json"
  }
}

Delete Label

  • DELETE /api/v2/help_center/articles/labels/{label_id}

Removes the label from all articles and deletes it.

Allowed for
  • Agents
Parameters
Name Type In Required Description
label_id integer Path true The unique ID of this Label
Using curl
curl https://{subdomain}.zendesk.com/api/v2/help_center/articles/labels/{label_id}.json \
  -v -u {email_address}:{password} -X DELETE
Example Response
Status 204 No Content

List Article Labels

  • GET /api/v2/help_center{/locale}/articles/{article_id}/labels

Lists all the labels in a given article.

Allowed for
  • Agents
Parameters
Name Type In Required Description
article_id integer Path true The unique ID of this Article
locale string Path false The locale that the category is displayed in
Using curl
curl https://{subdomain}.zendesk.com/api/v2/help_center/{locale}/articles/{article_id}/labels.json \
  -v -u {email_address}:{password}
Example Response
Status 200 OK

{
  "labels": [
    {
      "created_at": "2012-04-04T09:14:57Z",
      "id": 2003,
      "name": "instructions",
      "updated_at": "2012-04-04T09:14:57Z",
      "url": "https://{subdomain}.zendesk.com/api/v2/help_center/en-us/articles/labels/42.json"
    }
  ]
}

Create Label

  • POST /api/v2/help_center{/locale}/articles/{article_id}/labels
Allowed for
  • Agents
Parameters
Name Type In Required Description
article_id integer Path true The unique ID of this Article
locale string Path false The locale that the category is displayed in
Using curl
curl https://{subdomain}.zendesk.com/api/v2/help_center/articles/{article_id}/labels.json \
  -d '{"label": {"name": "instructions"}}' \
  -v -u {email_address}:{password} -X POST -H "Content-Type: application/json"
Example Response
Status 201 Created

{
  "label": {
    "created_at": "2012-04-04T09:14:57Z",
    "id": 2003,
    "name": "instructions",
    "updated_at": "2012-04-04T09:14:57Z",
    "url": "https://{subdomain}.zendesk.com/api/v2/help_center/en-us/articles/labels/42.json"
  }
}

Delete Label from Article

  • DELETE /api/v2/help_center{/locale}/articles/{article_id}/labels/{label_id}

Removes the label from the specified article's list of labels.

Allowed for
  • Agents
Parameters
Name Type In Required Description
article_id integer Path true The unique ID of this Article
label_id integer Path true The unique ID of this Label
locale string Path false The locale that the category is displayed in
Using curl
curl https://{subdomain}.zendesk.com/api/v2/help_center/articles/{article_id}/labels/{label_id}.json \
  -v -u {email_address}:{password} -X DELETE
Example Response
Status 204 No Content