vip or escalated.
Event name: chatSpecificLabelAdded\
Required token scopes:
Create scenariosManage scenarios on behalf of user
Subscribe
Send the body below to Import Subscription. You only need to change:url(required) - Located underdata.actions[0].params.url. Replace{{yourWebhookURL}}with the destination URL that should receive the events.targetLabelId(required) - Located insidedata.conditions[0][0].params.expression(the expressioninArray(addedLabels, "{{targetLabelId}}")). Replace{{targetLabelId}}with the label ID you want to watch (e.g.vip,urgent,escalated). The subscription only fires when that exact label appears in theaddedLabelsdiff.asStatus- Keep"active"to enable the subscription immediately, or"inactive"to save it as an inactive revision.
Import body
A
201 response returns your new subscription - save its _id to manage it later. You can also add an optional authorUid root field (a Texter user UID) to attribute the subscription to a specific user.Payload
When the event fires, your URL receives an HTTPPOST with eventName: "chatSpecificLabelAdded" and the following eventData:
The chat whose labels changed.
chat.labels reflects the new label set. See the Chat object for all fields.Label IDs on the chat before the change.
Label IDs that were just added - includes your configured target label.
Label IDs that were just removed.
Example payload
Manage this subscription
| Action | Endpoint |
|---|---|
| List subscriptions | List All Subscriptions |
| Pause | Inactivate Subscription |
| Resume | Activate Subscription |
| Delete | Delete Subscription |
| Debug executions | List Scenario Runs |