Skip to content

Rest API

Get conversation tags

GET
/api/v1/ai/conversations/tags
curl --request GET \
--url 'https://api.unless.com/api/v1/ai/conversations/tags?includeConversationCount=false' \
--header 'x-account-id: example' \
--header 'x-api-key: example' \
--header 'x-user-email: example' \
--header 'x-website-id: example'

Every conversation tag created in the workspace, with its id and name. Use it to turn the tags__id numbers returned by GET /api/v1/visitors/conversations into tag names.

Notes

  • Tags belong to one workspace, so the same name in two workspaces has two different ids
  • Pass includeConversationCount=true to also get how many conversations carry each tag
x-api-key
required
string

Your API key from account settings.

x-user-email
required
string

The email address of your user.

x-account-id
required
string

The ID of your account. You can find this in the account settings.

x-website-id
required
string

The ID of the workspace you want to use.

includeConversationCount
boolean

Also return conversationsCount, the number of conversations each tag is attached to.

The workspace’s tags.

Media typeapplication/json
object
tags
Array<object>
object
id

The tag’s id, as found in tags__id on a conversation.

integer
name
string
accountId
string
websiteId
string
fullCount

The total number of tags in the workspace.

integer
conversationsCount

Number of conversations carrying the tag. Only present with includeConversationCount=true.

integer

Example

{
"tags": [
{
"id": 42,
"name": "Billing",
"accountId": "6c1f2d3e-0000-4000-8000-000000000001",
"websiteId": "9a8b7c6d-0000-4000-8000-000000000002",
"fullCount": 2,
"conversationsCount": 118
},
{
"id": 43,
"name": "Login issue",
"accountId": "6c1f2d3e-0000-4000-8000-000000000001",
"websiteId": "9a8b7c6d-0000-4000-8000-000000000002",
"fullCount": 2,
"conversationsCount": 37
}
]
}

Bad request - missing websiteId.

Unauthorized - invalid API key.