Zernio
Zernio
OverviewWebhooksPost webhooksInbox webhooksAutomation webhooksSupport run webhooksAccount webhooksAnalytics webhooksAds webhooksCall webhooksWhatsApp webhooksPhone number webhooksSMS registration webhooksBranded Calling webhooks
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
Webhooks

Support run webhooks

Receive an event when an Ana support run finishes or fails, instead of polling for the answer.


Support run events report how a question you asked Ana, the Zernio support agent, ended. Start a run with Create support run, then receive the answer here instead of polling. Subscribe with POST /v1/webhooks/settings and the event names below (first event); delivery, retries and signatures are the same for every event (how webhooks behave).

Private beta: returns 403 feature_not_available unless enabled for your account.

Events

EventDescription
support.run.completedA run finished with an answer, or handed the question to a person.
support.run.failedA run failed or expired. It is not billed.

How it behaves

One event per run

Each run fires exactly one of the two events, when it reaches a final status. completed and needs_human fire support.run.completed; failed fires support.run.failed. If a delivery is missed, read the run with Get support run: it returns the same object.

The payload is the run

Next to the envelope fields id (the dedupe key), event and timestamp, run is exactly what Get support run returns: runId, threadId, status, stopReason, answer, usage, costUsd, maxCostUsd, createdAt, startedAt and finishedAt. costUsd is the amount billed for the run. pollAfterSeconds is not sent, since a delivered run is never in progress.

Delivered only to unscoped endpoints

An answer can quote anything Ana read across your whole team, so it belongs to no single profile or account. An endpoint scoped to profiles or accounts never receives these events. They belong to the messages resource group, so a restricted API key without messages cannot subscribe to them.


support.run.completed

A run finished. run.status is completed, or needs_human when Ana handed the question to a person instead of answering. run.answer holds Ana's answer and run.stopReason says why the run stopped (answered or human_review, among others).


Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

Example Requests

POST/support.run.completed


support.run.failed

A run failed or expired. run.status is failed and run.answer is null. run.stopReason is expired when the run never finished, and the other failure reasons otherwise. A failed run is billed $0, so run.costUsd is 0.


Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

Example Requests

POST/support.run.failed

Related

  • Webhooks: create an endpoint, retries, signatures.
  • Create support run: start a run.
  • Get support run: read a run, the fallback if a delivery is missed.
Was this page helpful?

Automation webhooks

Receive an event when a contact's tags or custom fields change, a contact enters or leaves a sequence, or a workflow run starts, ends or fails.

Account webhooks

Receive an event when an account is connected to a profile or stops working, and know how fast each disconnect path reaches you.

On this page

EventsHow it behavesOne event per runThe payload is the runDelivered only to unscoped endpointssupport.run.completedsupport.run.failedRelated
id*string

Event id, the dedupe key.

event*string

Value in

  • "support.run.completed"
  • "support.run.failed"
timestamp*string
Formatdate-time
run*
id*string

Event id, the dedupe key.

event*string

Value in

  • "support.run.completed"
  • "support.run.failed"
timestamp*string
Formatdate-time
run*