List labels of user

GET {{baseUrl}}/api/v1/users/:user_id/labels

This API lists a particular number of labels associated with a user, based on the limit defined.

OAuth Scope

  • Desk.contacts.READ
  • Desk.settings.READ

Request Params

KeyDatatypeRequiredDescription
isPrimarystringKey that filters the primary label assigned to the user
fromstringIndex number, starting from which the labels must be fetched. The default value is 1
limitstringNumber of labels to list. The default value and the maximum value allowed is 50
sortBystringKey that sorts the list of labels by a particular attribute: -(assignedTime)
searchBystringSearch keyword to use for finding a particular user. The keyword must contain at least two characters.
helpCenterIdstringID of the help center from which the labels must be fetched

HEADERS

KeyDatatypeRequiredDescription
Authorizationstring

RESPONSES

status: OK

{"data":[{"preferences":{"shape":"ROUNDED","bgColor":"#5787E0","textColor":"#FFFFFF"},"isPrimary":false,"name":"Prime Customer","id":"24073000002958013","helpCenterId":"24073000002886005","logoUrl":null,"assignedTime":"2020-04-06T05:55:13.000Z"},{"preferences":{"shape":"RECTANGLE","bgColor":"#39B54A","textColor":"#FFFFFF"},"isPrimary":false,"name":"Zoho One","id":"24073000002958023","helpCenterId":"24073000002886005","logoUrl":null,"assignedTime":"2020-04-06T05:55:13.000Z"},{"preferences":{"shape":"RECTANGLE","bgColor":"#CE6785","textColor":"#FFFFFF"},"isPrimary":false,"name":"MVP","id":"24073000002958029","helpCenterId":"24073000002886005","logoUrl":null,"assignedTime":"2020-04-06T05:55:13.000Z"}]}