Get a list of tags

POST https://secure.usedesk.com/uapi/tags

Warning. If you use the server version of Usedesk, you will have a different URL of methods. Check the URL for the API with our team — support@usedesk.com.

The method returns a list of tags.
The method implements a page breakdown. The response has a maximum of 100 entries, the offset parameter is used.

* — required fields

api_token* Channel API token
offset

Offset

Does not accept null

Offset by 1 will show the next 100 entries

query String to search

The search is performed by the text of the tag


PHP request example
$data = array(
    'api_token'=> 'e1cbe1c1c9d910ef2ae975215644cb53dd555de4',
    'offset'=>0,
);
$mch_api = curl_init(); // initialize cURL connection
curl_setopt($mch_api, CURLOPT_URL, 'https://secure.usedesk.com/uapi/tags');
curl_setopt($mch_api, CURLOPT_RETURNTRANSFER, true);
curl_setopt($mch_api, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($mch_api, CURLOPT_TIMEOUT, 10);
curl_setopt($mch_api, CURLOPT_POST, true);
curl_setopt($mch_api, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($mch_api, CURLOPT_POSTFIELDS, $data);
$result = curl_exec($mch_api);
return $result;
        

Example of a response from server
[
    {
        "ticket_tag_id":130,
        "tag_company_id":153909,
        "name":"tag1",
        "ticket_count":2
    },
    {
        "ticket_tag_id":374,
        "tag_company_id":153909,
        "name":"example",
        "ticket_count":25
    }
]
        

Server response parameters

ParameterDescription
ticket_tag_idTag ID
tag_company_idCompany ID
nameTag value
ticket_countNumber of tickets with the matching tag