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

# Workflow Webhook Events and Payloads

> Receive webhook events from Youverify workflows: alerts, evaluation results, case and alert resolutions and AML checks. Includes signature verification, delivery and retries, and every payload.

When a workflow runs in your account, Youverify can tell your server what happened. This page describes the six workflow webhook events, what your receiver must set up to consume them, how delivery and retries work, and the exact fields of every payload. Subscribe to these events to build real-time fraud and compliance responses in your own systems.

Workflow webhooks are sent for runs you start with the Send an Event endpoint (`POST /v2/api/workflows/events`) and for runs your workflows start themselves.

> [!NOTE]
>
> The JSON examples on this page use illustrative values. They are not captures from a live run.

## Event catalogue

There are six events. Every name has the form `object.action`, and the object tells you what `data` is. Youverify never sends an event name that is not in this table.

| Event | `data.object` | Sent when |
| - | - | - |
| `alert.created` | `alert` | A Generate Alert node fires while the evaluation is still running. Sent once per alert node. |
| `alert.resolved` | `alert` | An analyst resolves an alert the evaluation raised. |
| `case.resolved` | `case` | An analyst resolves a case the evaluation raised. |
| `evaluation.completed` | `evaluation` | A live evaluation finished successfully. |
| `evaluation.failed` | `evaluation` | A live evaluation ended in failure. |
| `aml_check.completed` | `aml_check` | A PEP and Sanction Screening or Adverse Media node, placed after an action node, finished its queued check. |

### Rules that apply to every event

* **Live runs only.** A shadow run never sends a webhook, including for its screening checks and failures.
* **No URL, no webhook.** If your business has no webhook URL registered for the environment, nothing is sent.
* **At least once, unordered.** The same event can arrive more than once, and events can arrive out of order. De-duplicate on the `x-youverify-event-id` header.
* **Best effort publishing.** If Youverify cannot queue a webhook, the failure is logged and the workflow run is not affected.

## What you need to connect

Your receiver needs two things from Youverify for each environment. There is no API key, bearer token or OAuth on the outbound call. Youverify authenticates itself to you with a signature.

| Credential | What it is |
| - | - |
| **Webhook URL** | The public HTTPS endpoint Youverify sends a `POST` to. Register the final URL. Redirects are not followed. |
| **Signing secret** | The shared secret that keys the HMAC-SHA256 signature. Keep it on your server and never expose it to a browser or app. |

* **Each environment is separate.** Sandbox and production each have their own webhook URL and their own signing secret.
* **Registration is done for you.** Contact your account manager or [support@youverify.co](mailto:support@youverify.co) to register your URL. They also give you the signing secret. There is no self-service endpoint for this.
* **Both are required.** If no URL is registered for the environment, the delivery is skipped. Without a signing secret the signature cannot be computed, so a URL without a secret does not work.

> [!WARNING]
>
> This is separate from the callback URL you set under **Settings → API KEY / Webhook** for KYC events. Workflow events use their own URL and signing secret, and the signature scheme described below.

## What your receiver must do

**1. Expose an HTTPS endpoint**

Accept `POST` requests with `Content-Type: application/json`.

**2. Read the raw body**

Read the raw body bytes before any JSON parsing. A body that has been parsed and serialised again breaks the signature.

**3. Check the timestamp**

The `x-youverify-timestamp` header must be within 5 minutes of your own clock. This protects you against replayed requests.

**4. Verify the signature**

Compute the hex HMAC-SHA256 of `<x-youverify-timestamp>.<raw body>` with your signing secret. Compare it with the `x-youverify-signature-v2` header in constant time. Answer `401` on a mismatch.

**5. De-duplicate, queue and acknowledge**

Skip any `x-youverify-event-id` you have already handled, put the body on a queue, and answer with a `2xx` status within 30 seconds.

### Reference verification (Node.js)

```typescript theme={null}
import { createHmac, timingSafeEqual } from "node:crypto";

export const verify = (
  secret: string,
  timestamp: string,
  signature: string,
  rawBody: Buffer,
  toleranceSec = 300,
) => {
  if (!timestamp || !signature) return false;
  if (Math.abs(Date.now() / 1000 - Number(timestamp)) > toleranceSec) return false;

  const expected = createHmac("sha256", secret)
    .update(`${timestamp}.`)
    .update(rawBody)
    .digest("hex");

  const a = Buffer.from(expected);
  const b = Buffer.from(signature);
  return a.length === b.length && timingSafeEqual(a, b);
};
```

## What Youverify sends

```http theme={null}
POST <your webhook URL>
Content-Type: application/json
x-youverify-event-id: evt_6aeb1d628cae1179877dab80_evaluation_completed
x-youverify-timestamp: 1790000000
x-youverify-signature-v2: <hex hmac of "<timestamp>.<body>">
x-youverify-signature: <hex hmac of "<body>">   (legacy)

{ "event": "evaluation.completed", "apiVersion": "v2", "data": { } }
```

### Envelope

Every event has the same envelope. Only `data` changes.

```json theme={null}
{
  "event": "evaluation.completed",
  "apiVersion": "v2",
  "data": { "object": "evaluation", "businessId": "...", "id": "..." }
}
```

| Field | Meaning |
| - | - |
| `event` | One of the six event names. |
| `apiVersion` | Always `v2`. |
| `data` | The payload. It always has `object` and `businessId`. |

### Headers

| Header | Meaning |
| - | - |
| `x-youverify-event-id` | `evt_<evaluationId>_<object>_<action>[_<discriminator>]`. It is the same on every delivery attempt. The discriminator is the node id for an alert and for `aml_check.completed`, and the resolution time (epoch milliseconds) for a resolution. |
| `x-youverify-timestamp` | Unix seconds at which this attempt was signed. |
| `x-youverify-signature-v2` | Hex HMAC-SHA256 of `<timestamp>.<raw body>` with your signing secret. **Use this one.** |
| `x-youverify-signature` | Hex HMAC-SHA256 of the raw body only. Legacy, with no replay protection. |

### Delivery and retries

Success is any `2xx` response, and the timeout is 30 seconds. A failed delivery is retried after 1, 6, 12, 18 and 24 hours, which makes six attempts in all. After that the event is dropped.

| Attempt | When |
| - | - |
| 1 | Immediately |
| 2 | After 1 hour |
| 3 | After 6 hours |
| 4 | After 12 hours |
| 5 | After 18 hours |
| 6 | After 24 hours (last attempt) |

> [!WARNING]
>
> There is no manual resend. If your receiver is down for longer than the retry window, you lose those events, and Youverify does not replay them. Read the missed results with the Workflow Events Management endpoints in the API Reference instead, for example `GET /v2/api/workflows/evaluations/{evaluationId}`.

### Public IDs

IDs such as `entityId` and `workflowId` in `data` use their public form (`ent_...`, `wfw_...`), the same as in API responses.

### Linking an event back to its evaluation

* For `evaluation.*` events, the evaluation ID is `data.id`.
* For `alert.*`, `case.resolved` and `aml_check.completed`, it is `data.evaluationId`.

## Payloads

### `alert.created`

Sent the moment an alert node fires, before the run ends. The decision at this point is never final. `data` is the alert body. It carries the event's own data in `eventData`.

| Field | Description |
| - | - |
| `object` | `alert` |
| `alertId` | The alert's identifier. Can be null. |
| `alertReference` | A reference derived from the run and the node. It is the same when that node is re-run. Can be null. |
| `evaluationId`, `businessId` | The run and the business. |
| `firedAt` | ISO timestamp. |
| `isShadow` | Always `false`. |
| `eventContext` | `{ eventId, eventType, workflowType, eventCategory, externalEventId, lifecycleId }`. `eventType` is `ONBOARDING`, `TRANSACTION` or `ACCOUNT_ACTIVITY`. `workflowType` is `CO_WORKFLOW` or `TM_WORKFLOW`. Each field is null when the run had no event. |
| `classification` | `{ severity, categories[], score, message }`. `severity` is `LOW`, `MEDIUM`, `HIGH` or `CRITICAL`. `score` is 0 to 100, or null. |
| `entityContext` | `{ entityId, entityType, entityName, parentId, sessionId, targetEntityIds[], matchedEntityIds[] }`. `entityId` is the party the alert is raised on. `entityType` is `INDIVIDUAL`, `BUSINESS` or null. `matchedEntityIds` is for transaction monitoring only and lists the parties the matched rules hit. |
| `amountAtRisk` | The sender's total amount, in the transaction's own currency. Null for a non-transaction event. |
| `eventData` | The event's stored `data`, whole: the transaction with its enrichment, the account activity, or the onboarding data. Null when it cannot be read. |
| `screeningContext` | `[{ role, name, reportId, report }]`, the AML reports from upstream screening. `report` is the whole report. Empty when none ran. `role` is `customer`, or `sender` or `beneficiary` for a transaction monitoring run. |
| `executionTrace` | `{ evaluationId, nodeId, workflowId, workflowName?, workflowVersion?, stepName, ruleIds[], ruleLabel, triggeringData }`. |
| `remediation` | `{ assignedQueue, requiredAction, accountStatus, alertInvestigatorId, systemActions[], freeze }`. `systemActions` is what the business is told to do: `BLOCK`, `FREEZE`, `HOLD`, `MANUAL_REVIEW`, `CREATE_CASE` and so on. A custom action keeps the text as typed. `freeze` is `{ scope, duration }` when `FREEZE` is listed, otherwise null. `scope` is account, transaction or both. `duration` is 24h, 48h, 72h, 5bd or until\_reviewed. |
| `decisionState` | `{ decision, decisionReason, decisionFinal, outcome }`. `decisionFinal` is always `false`. `outcome` is `{ result, flagged[] }`. On a transaction monitoring run with no decision beyond the alert, `result` is `no_action_defined`. It is never `pending`. |
| `metadata` | The `metadata` you sent on the event, or null. |

```json Example: alert.created theme={null}
{
  "event": "alert.created",
  "apiVersion": "v2",
  "data": {
    "object": "alert",
    "alertId": "6aeb1d628cae1179877dab90",
    "alertReference": "9f2c1b7e5a4d3c2b1a0f9e8d7c6b5a49",
    "evaluationId": "6aeb1d628cae1179877dab80",
    "businessId": "6a0001000000000000000001",
    "firedAt": "2026-10-30T10:04:13.150Z",
    "isShadow": false,
    "eventContext": {
      "eventId": "6aeb1d628cae1179877dab7f",
      "eventType": "TRANSACTION",
      "workflowType": "TM_WORKFLOW",
      "eventCategory": "finance",
      "externalEventId": "EVT-20261030-0001",
      "lifecycleId": "LC-5521-session-88"
    },
    "classification": {
      "severity": "HIGH",
      "categories": ["RISK_SCORE_THRESHOLD"],
      "score": null,
      "message": "Total Transaction Amount is greater than 1000000"
    },
    "entityContext": {
      "entityId": "ent_6ae459c0b99fb556a487f12f",
      "entityType": "INDIVIDUAL",
      "entityName": "Chinedu Okafor",
      "parentId": null,
      "sessionId": "...",
      "targetEntityIds": ["ent_6ae459c0b99fb556a487f12f"],
      "matchedEntityIds": ["ent_6ae459c0b99fb556a487f12f"]
    },
    "amountAtRisk": 4950000,
    "eventData": {
      "transactionReference": "TXN-0001",
      "paymentType": { "channel": "TRANSFER", "direction": "OUTBOUND" },
      "financials": { "totalAmount": 4950000, "currency": "NGN" },
      "parties": { "sender": { "name": "Chinedu Okafor" }, "beneficiaries": [] }
    },
    "screeningContext": [],
    "executionTrace": {
      "evaluationId": "6aeb1d628cae1179877dab80",
      "nodeId": "review",
      "workflowId": "wfw_6aeb1d628cae1179877dab01",
      "stepName": "Review",
      "ruleIds": ["6aeb1d628cae1179877dab10"],
      "ruleLabel": "Large transfer",
      "triggeringData": {}
    },
    "remediation": {
      "assignedQueue": null,
      "requiredAction": null,
      "accountStatus": null,
      "alertInvestigatorId": null,
      "systemActions": ["MANUAL_REVIEW"],
      "freeze": null
    },
    "decisionState": {
      "decision": "REVIEW",
      "decisionReason": "Total Transaction Amount is greater than 1000000",
      "decisionFinal": false,
      "outcome": { "result": "no_action_defined", "flagged": [] }
    },
    "metadata": { "source": "mobile-app" }
  }
}
```

### `evaluation.completed` and `evaluation.failed`

Both events have the same shape. `data` is the run's record plus its full node-by-node process.

| Field | Description |
| - | - |
| `object` | `evaluation` |
| `id` | The evaluation ID. |
| `workflowId`, `workflowType`, `executionMode` | The workflow. `workflowType` is `TM` or `CO`. `executionMode` is `real_time` or `T+1 Monitoring`. |
| `businessId`, `parentId`, `runMode` | The business. `runMode` is `LIVE`. |
| `status` | On `evaluation.completed`: `SUCCESS`, `SUCCESS_PENDING_AML_CHECK` (an `aml_check.completed` follows) or `SUCCESS_PENDING_CASE_RESOLUTION` (a `case.resolved` follows). On `evaluation.failed`: `FAILED`. |
| `createdAt`, `startedAt`, `finishedAt`, `executionTimeMs` | Timing. |
| `priority`, `enrichmentDegraded` | Run flags carried on the record. |
| `externalEventId`, `eventCategory`, `metadata` | The event that was sent. `eventCategory` is for transaction monitoring only. |
| `entityId`, `entityType`, `entityName` | Who was evaluated. For onboarding they come from the identity check node, so they are null until it ran. `entityType` is null for a transaction run. `entityName` is present on onboarding runs only. |
| `decision`, `decisionReason`, `decisionFinal` | The final decision. `decisionFinal` is always `true`. |
| `outcome` | `{ result, flagged[] }`. `result` is `approved`, `denied`, `manual_review`, `pending`, `no_action_defined`, or null on a failed run. |
| `actionsApplied`, `alertCount`, `flagged` | What the run did. |
| Transaction monitoring only | `riskScore`, `valueAtRisk`, `valueAtRiskCurrency`, `linkedTransactionReferences`, `executionMode`. |
| Onboarding only | `onboardingDecision`, `riskRating`, `onboarding`. An onboarding payload carries nothing about transactions, and the reverse. |
| `counterparties` | Each counterparty's screening result. `[]` when there are none. |
| `nodes` | `[{ nodeId, status, outcome, error, startedAt, finishedAt, input, output }]` in start order. Nodes that were never reached are left out. |
| `failureReason` | `evaluation.failed` only, and only when a failed node had an error: the first failed node's error. |

```json Example: evaluation.completed theme={null}
{
  "event": "evaluation.completed",
  "apiVersion": "v2",
  "data": {
    "object": "evaluation",
    "id": "6aeb1d628cae1179877dab80",
    "workflowId": "wfw_6aeb1d628cae1179877dab01",
    "workflowType": "TM",
    "executionMode": "real_time",
    "businessId": "6a0001000000000000000001",
    "parentId": null,
    "runMode": "LIVE",
    "status": "SUCCESS",
    "createdAt": "2026-10-30T10:04:12.900Z",
    "startedAt": "2026-10-30T10:04:12.950Z",
    "finishedAt": "2026-10-30T10:04:13.400Z",
    "executionTimeMs": 450,
    "externalEventId": "EVT-20261030-0001",
    "eventCategory": "finance",
    "metadata": { "source": "mobile-app" },
    "entityId": "ent_6ae459c0b99fb556a487f12f",
    "entityType": null,
    "decision": "REVIEW",
    "decisionReason": "Total Transaction Amount is greater than 1000000",
    "decisionFinal": true,
    "outcome": { "result": "manual_review", "flagged": [] },
    "riskScore": 0,
    "flagged": true,
    "valueAtRisk": 4950000,
    "valueAtRiskCurrency": "NGN",
    "linkedTransactionReferences": ["TXN-0001"],
    "actionsApplied": ["manual_review"],
    "alertCount": 1,
    "counterparties": [],
    "nodes": [
      {
        "nodeId": "review",
        "status": "SUCCESS",
        "outcome": null,
        "error": null,
        "startedAt": "2026-10-30T10:04:13.100Z",
        "finishedAt": "2026-10-30T10:04:13.160Z",
        "input": {},
        "output": {}
      }
    ]
  }
}
```

#### How `evaluation.failed` differs

* `status` is `FAILED`.
* `outcome` is `{ "result": null, "flagged": [] }`.
* `failureReason` is set when a failed node had an error, for example "a screening node had no name to screen and a detection condition needs its result".

### `alert.resolved` and `case.resolved`

Sent when an analyst resolves the alert or the case. `data.object` is `alert` or `case`.

| Field | Description |
| - | - |
| `object` | `alert` or `case`. |
| `id` | The reference of the alert or case that was resolved. Can be null. |
| `evaluationId`, `businessId` | The run and the business. |
| `resolution` | `{ outcome, resolvedAt, detail }`. `outcome` is `approved`, `rejected` or `closed`. `resolvedAt` is ISO. `detail` is what the resolving service recorded. For a case it is `isResolved`, `reason` and `resolutionNote`. Can be null. |
| `outcome` | The evaluation's outcome after the resolution, as `{ result, flagged[] }`. `approved` makes `result` `approved`. `rejected` makes it `denied`. `closed` leaves it unchanged. |
| `workflowId`, `workflowType`, `entityId`, `entityType`, `eventCategory`, `externalEventId`, `parentId`, `metadata` | What was evaluated. Null where unknown. An onboarding run also carries `entityName`. |

```json Example: case.resolved theme={null}
{
  "event": "case.resolved",
  "apiVersion": "v2",
  "data": {
    "object": "case",
    "id": "CASE-1042",
    "evaluationId": "6aeb1d628cae1179877dab80",
    "businessId": "6a0001000000000000000001",
    "resolution": {
      "outcome": "approved",
      "resolvedAt": "2026-10-30T14:20:00.000Z",
      "detail": {
        "isResolved": true,
        "reason": "Verified with customer",
        "resolutionNote": "Source of funds confirmed"
      }
    },
    "outcome": { "result": "approved", "flagged": [] },
    "workflowId": "wfw_6aeb1d628cae1179877dab01",
    "workflowType": "TM",
    "entityId": "ent_6ae459c0b99fb556a487f12f",
    "entityType": null,
    "eventCategory": "finance",
    "externalEventId": "EVT-20261030-0001",
    "parentId": null,
    "metadata": { "source": "mobile-app" }
  }
}
```

### `aml_check.completed`

Sent after an `evaluation.completed` event that carried `status: SUCCESS_PENDING_AML_CHECK`, when the queued PEP, sanction or adverse media check finishes. The result cannot change the decision.

| Field | Description |
| - | - |
| `object` | `aml_check` |
| `evaluationId`, `businessId`, `nodeId` | The run, the business and the node. |
| `eventId`, `externalEventId`, `transactionReference` | The event that was evaluated. `transactionReference` is the first linked transaction reference for transaction events, otherwise null. |
| `checkType` | `pep_sanction_screening` or `adverse_media`. This is the node's type. |
| `status` | Always `completed`. |
| `completedAt` | ISO timestamp. |
| `evaluationStatus` | The evaluation's status now: `SUCCESS`, or still pending a case resolution. |
| `results` | One entry per screened party: `{ role, name, entityId, externalEntityId, ... }`, its derived statuses, and the raw screening `response`. `[]` if none. |
| `workflowId`, `workflowType`, `entityId`, `entityType`, `eventCategory`, `parentId`, `metadata` | What was evaluated. Onboarding runs also carry `entityName`. |

```json Example: aml_check.completed theme={null}
{
  "event": "aml_check.completed",
  "apiVersion": "v2",
  "data": {
    "object": "aml_check",
    "evaluationId": "6aeb1d628cae1179877dab80",
    "businessId": "6a0001000000000000000001",
    "eventId": "6aeb1d628cae1179877dab7f",
    "transactionReference": "TXN-0001",
    "nodeId": "pep-check",
    "checkType": "pep_sanction_screening",
    "status": "completed",
    "completedAt": "2026-10-30T10:05:02.000Z",
    "evaluationStatus": "SUCCESS",
    "results": [
      {
        "role": "sender",
        "name": "Chinedu Okafor",
        "entityId": "ent_6ae459c0b99fb556a487f12f",
        "externalEntityId": "CUST-1",
        "response": {}
      }
    ],
    "workflowId": "wfw_6aeb1d628cae1179877dab01",
    "workflowType": "TM",
    "entityId": "ent_6ae459c0b99fb556a487f12f",
    "entityType": null,
    "externalEventId": "EVT-20261030-0001",
    "eventCategory": "finance",
    "parentId": null,
    "metadata": null
  }
}
```

## Typical sequences

| Scenario | Events, in the order they are normally sent |
| - | - |
| Plain run, no alert | `evaluation.completed` |
| Run with an alert node | `alert.created` (once per alert node), then `evaluation.completed` |
| Run that fails | `evaluation.failed` |
| Alert, then analyst review | `alert.created`, `evaluation.completed`, `alert.resolved` |
| Action node, then PEP or adverse media | `evaluation.completed` (`SUCCESS_PENDING_AML_CHECK`), `aml_check.completed` |
| Create Case action | `evaluation.completed` (`SUCCESS_PENDING_CASE_RESOLUTION`), `case.resolved` |

> [!NOTE]
>
> Order is not guaranteed on the wire. Do not depend on it. Use `data.evaluationId` (or `data.id` for `evaluation.*`) to correlate events, and use the `status` field of `evaluation.completed` to know whether a follow-up event is expected.

### Which follow-up event to expect

| `evaluation.completed` status | Follow-up event |
| - | - |
| `SUCCESS` | None from the evaluation itself. An `alert.resolved` can still arrive if alerts were raised. |
| `SUCCESS_PENDING_AML_CHECK` | `aml_check.completed` |
| `SUCCESS_PENDING_CASE_RESOLUTION` | `case.resolved` |

## Go-live checklist

* Your HTTPS URL is registered, and you hold the signing secret for each environment. Sandbox and production are separate.
* Your endpoint reads the raw body bytes and verifies `x-youverify-signature-v2` over `<timestamp>.<raw body>` in constant time.
* The 5 minute timestamp tolerance is enforced, and a mismatch returns `401`.
* Events are de-duplicated on `x-youverify-event-id`, and your handling is idempotent.
* Your handler queues the work and returns a `2xx` well inside 30 seconds.
* Your logic does not depend on event order. Correlation uses the evaluation ID.
* You expect live runs only. Shadow runs never produce webhooks.
* Your outage plan covers the retry window, which ends after the 24 hour attempt. There is no manual resend.

## Related

> [card] [Webhooks overview](https://doc.youverify.co/webhooks/overview.md)
>
> Registration and signatures for KYC events.

> [card] [KYC webhooks](https://doc.youverify.co/webhooks/kyc-webhooks.md)
>
> Identity and address verification events.


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