> ## Documentation Index
> Fetch the complete documentation index at: https://docs.goyappr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Trigger events

> Every event a workflow's After section can trigger on, and how it maps from the agent-level webhook fields.

An After trigger names one `event` and runs its steps only for that exact event — see
[Follow-up triggers](https://docs.goyappr.com/api-reference/workflows/save.md#follow-up-triggers) for how a trigger is
authored and what its steps receive. This page is the event reference: what each one means,
when it fires, and — for anyone moving an agent off `webhook_url` / `webhook_events` — which
legacy value it replaces.

## Event reference

| Event | Fires when | Legacy `webhook_events` equivalent |
| - | - | - |
| `call.answered` | The call is picked up — the leg answered on a phone call, the browser peer accepted on a web call. The **only** event published while the call is still going; its follow-up runs beside the live conversation. | `call.answered`, `call.started` |
| `call.ended` | The call finished normally (`call.status` is `completed`). | `call.ended` |
| `call.failed` | The call could not be connected. | `call.failed` |
| `call.no_answer` | Nobody picked up. | `call.no_answer` |
| `any_end` | Authoring shortcut for "however the call stopped" — expands to `call.ended`, `call.failed` and `call.no_answer`, so it includes the call nobody answered. Not a wire event: a delivered payload never names it, and `call.status` says which of the three it was. | *(no single legacy value — subscribe to all three individually instead)* |
| `request.failed` | The request itself died before anything was dialled — no call ever existed. The only trigger that runs for it. | `call.dnc_blocked` |
| `transcript.ready` | The call's transcript was produced. | `transcript.ready` |
| `analysis.ready` | The call's AI analysis (summary, extracted fields, disposition) was produced. | `call.analyzed` |
| `lead.ready` | A lead record was created or updated from the call. | `lead.created`, `lead.updated` |
| `recording.ready` | The call recording finished processing. | *(new — the legacy webhook never sent this on its own; you fetched `recording_url` from `GET /calls/{id}`)* |
| `billing.ready` | The call's billing was finalized. | *(new)* |
| `transfer.accepted` | A warm or cold transfer was accepted: the call is bridged and still going. | *(new)* |
| `transfer.answered`, `transfer.failed` | Accepted by the schema, but nothing in the platform publishes them yet, so a follow-up on either never starts. The dashboard no longer offers them; do not author them. | *(new)* |
| `ai_session.ended` | The AI portion of a call ended (distinct from the call itself ending, e.g. after a transfer hands off to a human). | *(new)* |

A trigger that waits for a produced result (`transcript.ready`, `analysis.ready`,
`recording.ready`, `lead.ready`, `billing.ready`) starts its follow-up only for a result that
was actually produced — a call nobody answered settles those producers without producing
anything, and a follow-up waiting on one never starts.

Every follow-up whose event matches, and whose "Only if" holds, runs. There is no "first match" and no implicit "otherwise":
`any_end` and `call.no_answer` on the same agent both run on a call nobody answered, and two
follow-ups on the same event both run. The dashboard says so when it sees the first case; a
Check on the document does not, because both are legitimate. To do something different per
ending, add one follow-up per ending, or give each an "Only if" — see
[A different follow-up for each ending](https://docs.goyappr.com/api-reference/workflows/save.md#a-different-follow-up-for-each-ending).

## What each event can have

An ending decides what a follow-up can know. A call nobody answered has a result, a time and a
reason it stopped, and never a transcript, analysis, recording, lead or billing. A normal ending
gets those a little later, so a step that needs them waits for them with `requires`. This is the
table a step's `requires` (and an `artifact` input) is held to:

| Event | Call facts in `call` | Results a step can wait for (`requires`) | Never available |
| - | - | - | - |
| `call.answered` | The before-call members plus `call_id`, `started_at` and a live `status` (`ringing`, `in_progress`). | None: the call is still going. | `ended_at`, `duration_seconds`, `ended_by`, `close_reason`, every result. |
| `call.ended` | Everything above, ended: `status` `completed`, `ended_at`, `duration_seconds`, `ended_by`, `close_reason`. | `transcript`, `analysis`, `recording`, `lead`, `billing`. Each arrives a little after the call; a producer that settles without producing blocks the step. | `disposition` until the analysis is ready. |
| `call.failed` | As `call.ended`, with `status` `failed`. | None offered. When the AI never ran (the usual case) nothing is ever produced; when it did, results can exist, but a publish refuses `transcript`, `analysis` and `recording` here. | `disposition`, unless the workspace has one labelled exactly `Failed`: it is written after the event, so the package may not have it yet. |
| `call.no_answer` | As `call.ended`, with `status` `no_answer`. | None. A publish refuses all five. | Every result. `disposition` only if the workspace has one labelled exactly `No Answer`, written after the event. |
| `any_end` | The facts every ending shares: `status`, `ended_at`, `duration_seconds`, `ended_by`, `close_reason`. | None: it includes `call.no_answer`, where every wait would block the step. Check warns with `after_any_end_waits`. | The results of an unanswered call. |
| `request.failed` | No call exists. | None. A publish refuses all five. | Everything that lives on a call. |
| `ai_session.ended`, `transfer.accepted` | Whatever the call has at that moment. | None. | The ended-call members, every result. |
| `transcript.ready`, `recording.ready`, `lead.ready`, `billing.ready` | The ended call, with that result ready. | The other four: that result itself is implied. | The results that are still being produced. |
| `analysis.ready` | The ended call, with the analysis and the `disposition` (written in the same step as the analysis, so it is always present here). | `transcript`, `recording`, `lead`, `billing`. | The results that are still being produced. |

The facts are read when the follow-up starts, not when the event fired, so a member written
after the event (`recording_url`, a lead id) can appear in the package even though the event
was not about it. `disposition` is the one place to read the call's outcome in the platform's
own words: take it from `analysis.ready`, where it is guaranteed.

Two rules follow, and the publisher enforces the first:

* **Refused** — a step on `call.no_answer` or `request.failed` waiting for any result, and a step on
  `call.failed` waiting for `transcript`, `analysis` or `recording`, is
  [`artifact_never_produced`](https://docs.goyappr.com/api-reference/workflows/validate#tool-input-issues).
* **Advised** — a step on `any_end` with anything in `requires` raises the
  [`after_any_end_waits`](https://docs.goyappr.com/api-reference/workflows/validate) warning on Check. It is not a refusal,
  because `any_end` also covers a finished call, where the wait is right, and workflows already
  published that way keep working. Move such a step to `analysis.ready` (or the result's own
  `.ready` event), or leave `requires` empty and let it run on every ending.

## What an "Only if" can read on each event

A trigger can carry a `when` condition so its follow-up runs for some calls only
([how it is written](https://docs.goyappr.com/api-reference/workflows/save.md#running-a-follow-up-only-for-some-calls)).
It can read only what the event guarantees, so a follow-up never decides on a fact that is
still being written:

| Event | Facts the condition can read |
| - | - |
| `any_end` | result (`/status`), who ended it (`/ended_by`), duration (`/duration_seconds`), direction, channel |
| `call.ended`, `call.failed`, `call.no_answer` | who ended it, duration, direction, channel |
| `analysis.ready` | disposition (`/disposition/id`, `/disposition/label`), collected fields (`/analysis/extracted_data/<name>`), direction, channel |
| `call.answered`, `ai_session.ended`, `transfer.*`, `transcript.ready`, `recording.ready`, `lead.ready`, `billing.ready` | direction, channel |
| `request.failed` | channel — no call row exists to read a direction from |

A condition on `analysis.ready` never sees a call whose analysis never settled: that call opens no
`analysis.ready` follow-up at all, an "otherwise" sibling included.

## What a trigger's step sends

A trigger's step is an ordinary HTTP tool binding, so it reads the [call package](https://docs.goyappr.com/api-reference/tools/create-revision.md#what-your-endpoint-receives)
the same way any other workflow tool does — the call is under `call`, at `"phase": "after"`
(or, for `call.answered`, at the live phase — see the members note on the save page). The
body your endpoint receives is `{"call": {…}}` plus the step's own inputs. A follow-up you
write yourself carries **no `event` member**, and no `X-Webhook-Event` header either (that
header is set only on a tool test). A follow-up created for you when an agent was moved to the
workflow engine adds one fixed input, `event`, naming the event the way it was spelled before
(`call.analyzed`), so an endpoint that reads `event` still finds it at the top level. Read `call.status` (`completed`, `failed` or `no_answer`) to tell how the call ended;
from `analysis.ready` also `call.analysis` and `call.disposition`. A tool that declines the call
package sends only its declared inputs. To know which follow-up fired without reading the
call, give each follow-up its own step with its own URL or a fixed input naming it.

Every settled delivery is written to the same delivery log as any other webhook, beside your
tool webhooks and, for an agent not yet on the workflow engine, its legacy event webhooks. Read
that log with [`GET /deliveries`](https://docs.goyappr.com/api-reference/deliveries/list) — across calls, filtered by
tool, agent, status or window — or one call at a time in its
[timeline](https://docs.goyappr.com/api-reference/calls/get.md). Both return the same row shape.

## Moving off `webhook_url` / `webhook_events`

Once an agent is on the workflow engine, `webhook_url`, `webhook_events` and `webhook_headers`
on the agent are cleared — see the note on [Update Agent](https://docs.goyappr.com/api-reference/agents/update.md) — and
its notifications become one HTTP tool (your endpoint, your headers) plus one After trigger per
event you were subscribed to, using this page's mapping. Your endpoint has to read the new
envelope shape documented above: the call is under `call`, and `call.status` says how the call
ended. The follow-ups created for you keep the event name as a top-level `event`; the `data`
wrapper, `timestamp` and the per-event extras (a failure's `error`, a blocked call's reason) are
gone. For a follow-up you write yourself, give its step a fixed input named `event` if the
endpoint needs to tell events apart.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.