דלג לתוכן הראשי
Subscribe to events in your Texter environment - new messages, chat status changes, label changes, channel health problems - and receive an HTTP POST at your URL whenever they happen. Under the hood, subscriptions are Scenarios (Texter’s automation feature). You never need to build one from scratch: every event in the sidebar has a ready-made template you import once.

The payload envelope

Every delivery is a POST with a JSON body in the same envelope:
{
  "eventName": "newIncomingMessage",
  "eventData": {
    "message": { "...": "see The Message object" },
    "chat": { "...": "see The Chat object" }
  }
}
  • eventName - which event fired (each event page lists its name)
  • eventData - the event’s data; the exact fields are documented per event
Respond with any 2xx status to acknowledge. Write one generic handler that switches on eventName, and add subscriptions over time.

Subscribe in three steps

1

Pick an event

Open the event’s page in the sidebar - e.g. New Incoming Messages or Chat Resolved. Each page contains the full import body.
2

Fill in your values

Replace {{yourWebhookURL}} with your endpoint, plus any template-specific placeholders (each page tells you exactly what to change and where it sits in the JSON).
3

Import it

Send the body to Import Subscription with a token holding the scopes Create scenarios and Manage scenarios on behalf of user. A 201 returns your subscription - save its _id.

Manage subscriptions

ActionEndpoint
List all (templates are prefixed (SUB))List All Subscriptions
PauseInactivate Subscription
Resume / revert to a versionActivate Subscription
Delete permanentlyDelete Subscription
Debug deliveriesList Scenario Runs - see whether the event fired, conditions matched, and the webhook request succeeded

Customizing filters

Some templates filter with filtrex expressions you can adapt:
  • Single keyword: text == "help"
  • Multiple keywords (OR): text == "buy" or text == "purchase"
  • Complex logic with and, or, not, parentheses: (text == "urgent" and text == "error") or text == "critical"
  • Whole sentences match exactly: text == "I want to speak to a human"
  • Field existence: exists(agent.uid) / not exists(agent.uid)
  • Array membership: inArray(addedLabels, "vip")
If the provided templates don’t satisfy your needs, contact Texter Support - we’ll gladly help modify any triggers, conditions or actions for your webhook.