List User Segments

GET {{baseUrl}}/api/v2/help_center/user_segments?built_in=<boolean>

Some user segments can only be applied to sections and topics on certain Guide plans. For instance, user segments with a user_type of "staff" cannot be applied to sections and topics on accounts on the Guide Lite plan or the Suite Team plan. To request only user segments applicable on the account's current Suite plan, use the /api/v2/help_center/user_segments/applicable.json endpoint.

The /api/v2/help_center/users/{user_id}/user_segments.json endpoint returns the list of user segments that a particular user belongs to. This is the only list endpoint that agents have access to. When an agent makes a request to this endpoint with another user's id, the response only includes user segments that the requesting agent also belongs to.

These endpoints support pagination, as described in the pagination documentation.

Allowed for

  • Help Center managers
  • Agents

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

Request Params

KeyDatatypeRequiredDescription
built_instringOnly built_in user segments if true, only custom user segments if false

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{&quot;user_segments&quot;:[{&quot;user_type&quot;:&quot;\u003cstring\u003e&quot;,&quot;built_in&quot;:&quot;\u003cboolean\u003e&quot;,&quot;created_at&quot;:&quot;\u003cstring\u003e&quot;,&quot;group_ids&quot;:[&quot;\u003cinteger\u003e&quot;,&quot;\u003cinteger\u003e&quot;],&quot;id&quot;:&quot;\u003cinteger\u003e&quot;,&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;or_tags&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;organization_ids&quot;:[&quot;\u003cinteger\u003e&quot;,&quot;\u003cinteger\u003e&quot;],&quot;tags&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;updated_at&quot;:&quot;\u003cstring\u003e&quot;},{&quot;user_type&quot;:&quot;\u003cstring\u003e&quot;,&quot;built_in&quot;:&quot;\u003cboolean\u003e&quot;,&quot;created_at&quot;:&quot;\u003cstring\u003e&quot;,&quot;group_ids&quot;:[&quot;\u003cinteger\u003e&quot;,&quot;\u003cinteger\u003e&quot;],&quot;id&quot;:&quot;\u003cinteger\u003e&quot;,&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;or_tags&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;organization_ids&quot;:[&quot;\u003cinteger\u003e&quot;,&quot;\u003cinteger\u003e&quot;],&quot;tags&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;updated_at&quot;:&quot;\u003cstring\u003e&quot;}]}