Skip to main content
When you create a subscription, you choose which event types it receives. This page describes the available events and the shape of their payloads.

Event types

Event typeTriggered when…
test.createdA test is created.
test.updatedA test’s configuration is updated.
test.deletedA test is deleted.
tests.result.updatedA test suite finishes a run, summarizing how many tests passed and failed.

Payload structure

Every webhook request body shares the same envelope:
{
  "type": "test.created",
  "timestamp": "2026-01-21T10:30:00Z",
  "data": {}
}
FieldDescription
typeThe event type that triggered this delivery.
timestampThe ISO 8601 (UTC) time at which the event was generated.
dataAn object whose contents depend on the event type (see below).
Alongside the body, every request carries signature headers (webhook-id, webhook-timestamp, and webhook-signature). Always verify the signature before trusting a payload.

test.created

Sent when a test is created. The data.test object contains the full test definition.
{
  "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, reflecting the test’s new state.
{
  "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.
{
  "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.
{
  "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
    }
  }
}
FieldDescription
projectIdThe project the test suite belongs to.
projectVersionIdThe project version (commit) that was evaluated. May be null.
inferencePipelineIdThe inference pipeline that was evaluated, for monitoring runs. May be null.
totalTotal number of tests in the run.
passingNumber of tests that passed.
failingNumber of tests that failed.
skippedNumber of tests that were skipped.
runningNumber of tests still running.
Payloads include identifiers rather than every related object. When you need more detail than the payload provides, call the REST API with the IDs from the event.