Tags

List Tags

GET /api/v2/tags.json

Lists the most popular recent tags in decreasing popularity

Allowed For:

  • Admins

Using curl

curl https://{subdomain}.zendesk.com/api/v2/tags.json \
  -v -u {email_address}:{password}

Example Response

Status: 200 OK

{
  "tags": [
    {
      "name":  "important",
      "count": 47
    },
    {
      "name":  "customer",
      "count": 11
    }
  ]
}

Show Tags

GET /api/v2/tickets/{id}/tags.json

GET /api/v2/topics/{id}/tags.json

GET /api/v2/organizations/{id}/tags.json

Allowed For:

  • Agents

Using curl

curl https://{subdomain}.zendesk.com/api/v2/tickets/{id}/tags.json \
  -v -u {email_address}:{password}

Example Response

Status: 200 OK

{
  "tags": [
    "important",
    "customer"
  ]
}

Set Tags

POST /api/v2/tickets/{id}/tags.json

POST /api/v2/topics/{id}/tags.json

POST /api/v2/organizations/{id}/tags.json

Allowed For:

  • Agents

Using curl

curl https://{subdomain}.zendesk.com/api/v2/tickets/{id}/tags.json \
  -X POST -d '{ "tags": ["important"] }' \
  -v -u {email_address}:{password}

Example Response

Status: 200 OK

{
  "tags": [
    "important"
  ]
}

Add Tags

PUT /api/v2/tickets/{id}/tags.json

PUT /api/v2/topics/{id}/tags.json

PUT /api/v2/organizations/{id}/tags.json

Allowed For:

  • Agents

Using curl

curl https://{subdomain}.zendesk.com/api/v2/tickets/{id}/tags.json \
  -X PUT -d '{ "tags": ["customer"] }' \
  -H "Content-Type: application/json" -v -u {email_address}:{password}

Example Response

Status: 200 OK

{
  "tags": [
    "important",
    "customer"
  ]
}

Remove Tags

DELETE /api/v2/tickets/{id}/tags.json

DELETE /api/v2/topics/{id}/tags.json

DELETE /api/v2/organizations/{id}/tags.json

Allowed For:

  • Agents

Using curl

curl https://{subdomain}.zendesk.com/api/v2/tickets/{id}/tags.json \
  -X DELETE -d '{ "tags": ["customer"] }' \
  -H "Content-Type: application/json" -v -u {email_address}:{password}

Example Response

Status: 200 OK

{
  "tags": [
    "important"
  ]
}

comments powered by Disqus