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

# Events and payloads

> The event types Openlayer emits and the structure of each webhook payload.

When you [create a subscription](/security/webhooks/manage-webhooks), you choose
which event types it receives. This page describes the available events and the
shape of their payloads.

## Event types

| Event type             | Triggered when…                                                            |
| ---------------------- | -------------------------------------------------------------------------- |
| `test.created`         | A test is created.                                                         |
| `test.updated`         | A test's configuration is updated.                                         |
| `test.deleted`         | A test is deleted.                                                         |
| `tests.result.updated` | A test suite finishes a run, summarizing how many tests passed and failed. |

## Payload structure

Every webhook request body shares the same envelope:

```json theme={null}
{
  "type": "test.created",
  "timestamp": "2026-01-21T10:30:00Z",
  "data": {}
}
```

| Field       | Description                                                    |
| ----------- | -------------------------------------------------------------- |
| `type`      | The [event type](#event-types) that triggered this delivery.   |
| `timestamp` | The ISO 8601 (UTC) time at which the event was generated.      |
| `data`      | An object whose contents depend on the event type (see below). |

<Note>
  Alongside the body, every request carries signature headers (`webhook-id`,
  `webhook-timestamp`, and `webhook-signature`). Always [verify the
  signature](/security/webhooks/verify-signatures) before trusting a payload.
</Note>

## `test.created`

Sent when a test is created. The `data.test` object contains the full test
definition.

```json theme={null}
{
  "type": "test.created",
  "timestamp": "2026-01-21T10:30:00Z",
  "data": {
    "test": {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "number": 1,
      "name": "No duplicate rows",
      "description": "This test checks for duplicate rows in the dataset.",
      "type": "integrity",
      "subtype": "duplicateRowCount",
      "dateCreated": "2026-01-21T10:30:00Z",
      "dateUpdated": "2026-01-21T10:30:00Z",
      "creatorId": "589ece63-49a2-41b4-98e1-10547761d4b0",
      "originProjectVersionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "thresholds": [
        {
          "measurement": "duplicateRowCount",
          "insightName": "duplicateRowCount",
          "insightParameters": [],
          "operator": "<=",
          "value": 0
        }
      ],
      "evaluationWindow": 3600,
      "delayWindow": 0,
      "suggested": false,
      "archived": false
    }
  }
}
```

## `test.updated`

Sent when a test's configuration changes. The `data.test` object has the same
structure as [`test.created`](#test-created), reflecting the test's new state.

```json theme={null}
{
  "type": "test.updated",
  "timestamp": "2026-01-21T10:30:00Z",
  "data": {
    "test": {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "number": 1,
      "name": "No duplicate rows",
      "type": "integrity",
      "subtype": "duplicateRowCount",
      "dateUpdated": "2026-01-21T10:35:00Z"
    }
  }
}
```

## `test.deleted`

Sent when a test is deleted. To keep the payload meaningful after deletion, only
the test `id` is included.

```json theme={null}
{
  "type": "test.deleted",
  "timestamp": "2026-01-21T10:30:00Z",
  "data": {
    "test": {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    }
  }
}
```

## `tests.result.updated`

Sent once per test suite run, after the suite finishes evaluating. Rather than
one event per test, Openlayer emits a single event that summarizes the run. This
is the event to subscribe to if you want to alert when tests start failing.

```json theme={null}
{
  "type": "tests.result.updated",
  "timestamp": "2026-01-21T10:30:00Z",
  "data": {
    "tests": {
      "projectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "projectVersionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "inferencePipelineId": null,
      "total": 6,
      "passing": 4,
      "failing": 1,
      "skipped": 1,
      "running": 0
    }
  }
}
```

| Field                 | Description                                                                    |
| --------------------- | ------------------------------------------------------------------------------ |
| `projectId`           | The project the test suite belongs to.                                         |
| `projectVersionId`    | The project version (commit) that was evaluated. May be `null`.                |
| `inferencePipelineId` | The inference pipeline that was evaluated, for monitoring runs. May be `null`. |
| `total`               | Total number of tests in the run.                                              |
| `passing`             | Number of tests that passed.                                                   |
| `failing`             | Number of tests that failed.                                                   |
| `skipped`             | Number of tests that were skipped.                                             |
| `running`             | Number of tests still running.                                                 |

<Tip>
  Payloads include identifiers rather than every related object. When you need
  more detail than the payload provides, call the [REST
  API](/api-reference/rest/overview) with the IDs from the event.
</Tip>
