Zendesk Support API Tags

The Tags API allows you to manage and interact with tags within the Zendesk Support system. Tags are used to categorize and organize tickets, making it easier to manage and search through them. This guide covers the main operations you can perform with tags, including listing, searching, counting, and modifying tags associated with tickets.

What can you do with Tags in the Zendesk Support API?

The most common operations people perform on tags using the Zendesk Support API.

Action HTTP Method Endpoint
Search Tags
GET /api/v2/autocomplete/tags
List Tags
GET /api/v2/tags
Count Tags
GET /api/v2/tags/count
List Resource Tags
GET /api/v2/tickets/{ticket_id}/tags
Set Tags
POST /api/v2/tickets/{ticket_id}/tags
Add Tags
PUT /api/v2/tickets/{ticket_id}/tags
Remove Tags
DELETE /api/v2/tickets/{ticket_id}/tags

Tags in Zendesk Support are used to categorize and organize tickets, allowing for efficient management and retrieval. They are essential for filtering and searching tickets based on specific criteria.

Tags are identified by their names, which are unique strings.

To create or set tags, you need to specify the tag names. Tags can be added to tickets via the API endpoints.

Tags can be searched using the `name` query parameter, which requires at least two characters. This allows for autocomplete functionality to find tags starting with the specified substring.

Properties of a Tag

Understanding the properties of tags is crucial for effectively managing them. Here are the most important properties you need to know about. Show all properties Only show essential properties

Field Name Type Short Description
name string A name for the tag.
count integer The number of tags.
refreshed_at string The time that the count value was last refreshed.
value integer The count of tags created in the last 24 hours.
url string The URL associated with the API request.
tags array An array of tag names.
next_page string The URL of the next page.
previous_page string The URL of the previous page.

Filtering and Query Parameters

The Tags API supports filtering through query parameters to refine search results and manage tags effectively.

Parameter Type Description Example
name string A substring of a tag to search for. name=att

What to watch out for

When working with the Tags API, there are a few common pitfalls to be aware of to ensure smooth integration.

Minimum Characters for Search

The name parameter for searching tags requires at least two characters. Ensure your search queries meet this requirement to avoid errors.

Safe Updates

When adding tags to a ticket, use the updated_stamp and safe_update properties to prevent update collisions. This ensures that tags are not lost if multiple updates occur simultaneously.

Count Limitations

The value property in the tag count response is limited to 100,000 if the actual count exceeds this number. The refreshed_at property may be null during updates.

Frequently Asked Questions

Here are some frequently asked questions about the Zendesk Support Tags API and how to effectively use it.

How do I find a tag by name using the Zendesk Support API?

Use the /api/v2/autocomplete/tags endpoint with the name query parameter to search for tags by name. Ensure the name has at least two characters.

What happens if I try to update tags on a ticket that has been modified?

If a ticket has been modified, use the updated_stamp and safe_update properties to ensure your update is applied safely. If the timestamps don't match, a 409 Conflict error will be returned.

Can I delete tags from multiple tickets at once?

Yes, you can delete tags from multiple tickets using the Update Many Tickets endpoint. This allows for batch operations on tags across multiple tickets.

How often is the tag count updated in the Zendesk Support API?

The tag count is updated every 24 hours if the count exceeds 100,000. During updates, the refreshed_at property may be null.

What is the maximum number of tags I can retrieve in a single request?

You can retrieve up to 100 tags per page using the /api/v2/tags endpoint. Use pagination to navigate through more tags if needed.