Skip to main content

Get the tags of a conversation

Get the tags a conversation has right now, including the ones added from the live chat or by a flow.

Endpoint​

GET https://api.p.2chat.io/open/tags/sessions/<session-key>

<session-key> is the session_key of the conversation, e.g. WA-WAN8fd3442f-e111-4fed-9323-1824fd7546c9-14085550176. See where to get it.

Authentication​

Include your API key in the X-User-API-Key header. Learn more about authentication.

Invocation​

curl --location 'https://api.p.2chat.io/open/tags/sessions/WA-WAN8fd3442f-e111-4fed-9323-1824fd7546c9-14085550176' \
--header 'X-User-API-Key: your_api_key_here'

Response​

Success (HTTP 200 OK)​

data is an empty list when the conversation has no tags, and also when the session_key doesn't match any conversation of your account.

{
"success": true,
"data": [
{
"uuid": "TAGd37f22fa-fe01-4a90-b57d-7e83ccc6a05a",
"name": "Hot lead",
"color": "#378ADD",
"exclude_from_campaigns": false,
"created_at": "2026-10-28T17:55:04Z",
"updated_at": "2026-10-28T18:02:11Z",
"created_by_user_id": 4809
},
{
"uuid": "TAG84e188bf-b78c-4edb-8c4f-4b1b25b7edf6",
"name": "Do not contact",
"color": "#E24B4A",
"exclude_from_campaigns": true,
"created_at": "2026-10-26T19:41:19Z",
"updated_at": "2026-10-26T19:45:58Z",
"created_by_user_id": 4809
}
]
}
FieldDescription
successtrue when the request succeeded
dataThe tags of the conversation. See the tag object.