---
title: "events.hook-delivery@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/events.hook-delivery"
updated: null
---

# events.hook-delivery@1 · OpenVibe.Services

HTML: [events.hook-delivery@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/events.hook-delivery)

# EventsHookDelivery `events.hook-delivery@1`

Generated at 2026-11-13 06:25:48 UTC from [`openvibe-contracts v0.419.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.419.0) and [`openvibe-sdk v0.161.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.161.0).

- Version: 1.0.0
- Owner: events
- Visibility: public
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/events/hook-delivery.v1.json`](/docs/contracts/events.hook-delivery.json)

events.hook-delivery@1: one attempt by OpenVibe.Events to deliver an event to a hook. It carries the outcome, timing, size and hash of the payload, never the payload itself, its headers, the signature or the hook's secret. A delivery is retried inside its hook's window and dead-lettered after it; replay creates a new attempt that names the one it replays.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `id` | string | yes |  | - `pattern ^whd_[0-9A-HJKMNP-TV-Z]{26}$` |
| `hook_id` | string | yes |  | - `pattern ^hok_[0-9A-HJKMNP-TV-Z]{26}$` |
| `event_id` | string | yes |  | - `pattern ^evt_[0-9A-HJKMNP-TV-Z]{26}$` |
| `event_type` | string | yes |  | - `pattern ^[a-z][a-z0-9_]*(\.[a-z0-9_]+){2,}$` |
| `attempt` | integer | yes |  | - `minimum 1`<br>- `maximum 100` |
| `status` | enum | yes | failed is a retryable attempt; dead is the last, after the hook's window. A 2xx answer marks delivered. | - `one of "queued", "delivering", "delivered", "failed", "dead"` |
| `request_id` | string \| null |  | The delivery request id, for tracing; not a secret. | - `maxLength 64` |
| `response_code` | integer \| null |  |  | - `minimum 100`<br>- `maximum 599` |
| `latency_ms` | integer \| null |  |  | - `minimum 0` |
| `payload_bytes` | integer | yes |  | - `minimum 0`<br>- `maximum 1048576` |
| `payload_sha256` | string | yes | The SHA-256 of the signed body, so a consumer can check it without the body being stored here. | - `pattern ^[0-9a-f]{64}$` |
| `signature_version` | const |  |  | - `= "v2"` |
| `next_attempt_at` | string \| null |  |  | - `format date-time` |
| `attempted_at` | string \| null |  |  | - `format date-time` |
| `completed_at` | string \| null |  |  | - `format date-time` |
| `dead_at` | string \| null |  |  | - `format date-time` |
| `error` | string \| null |  | A short transport or status reason; never a response body. | - `maxLength 400` |
| `replay_of` | string \| null |  | The failed or dead attempt this one replays. | - `pattern ^whd_[0-9A-HJKMNP-TV-Z]{26}$` |
| `created_at` | string | yes |  | - `format date-time` |

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: dead

~~~~
{
  "id": "whd_01J8Z3Q4R5S6T7V8W9X0Y1Z2B1",
  "hook_id": "hok_01J8Z3Q4R5S6T7V8W9X0Y1Z2A9",
  "event_id": "evt_01J8Z3Q4R5S6T7V8W9X0Y1Z2B0",
  "event_type": "github.push.received",
  "attempt": 30,
  "status": "dead",
  "response_code": null,
  "latency_ms": null,
  "payload_bytes": 2048,
  "payload_sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "next_attempt_at": null,
  "attempted_at": "2026-11-05T09:00:00.000Z",
  "completed_at": "2026-11-05T09:00:01.000Z",
  "dead_at": "2026-11-05T09:00:01.000Z",
  "error": "share offline",
  "replay_of": null,
  "created_at": "2026-10-29T09:00:00.000Z"
}
~~~~

Valid: delivered

~~~~
{
  "id": "whd_01J8Z3Q4R5S6T7V8W9X0Y1Z2B1",
  "hook_id": "hok_01J8Z3Q4R5S6T7V8W9X0Y1Z2A9",
  "event_id": "evt_01J8Z3Q4R5S6T7V8W9X0Y1Z2B0",
  "event_type": "github.push.received",
  "attempt": 1,
  "status": "delivered",
  "request_id": "req_01J8Z3Q4R5S6T7V8W9",
  "response_code": 202,
  "latency_ms": 84,
  "payload_bytes": 2048,
  "payload_sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "signature_version": "v2",
  "next_attempt_at": null,
  "attempted_at": "2026-10-29T09:00:00.000Z",
  "completed_at": "2026-10-29T09:00:00.084Z",
  "dead_at": null,
  "error": null,
  "replay_of": null,
  "created_at": "2026-10-29T09:00:00.000Z"
}
~~~~

Rejected: bad-hash

~~~~
{
  "id": "whd_01J8Z3Q4R5S6T7V8W9X0Y1Z2B1",
  "hook_id": "hok_01J8Z3Q4R5S6T7V8W9X0Y1Z2A9",
  "event_id": "evt_01J8Z3Q4R5S6T7V8W9X0Y1Z2B0",
  "event_type": "github.push.received",
  "attempt": 1,
  "status": "delivered",
  "payload_bytes": 2048,
  "payload_sha256": "not-a-sha256",
  "created_at": "2026-10-29T09:00:00.000Z"
}
~~~~

Rejected: body-field

~~~~
{
  "id": "whd_01J8Z3Q4R5S6T7V8W9X0Y1Z2B1",
  "hook_id": "hok_01J8Z3Q4R5S6T7V8W9X0Y1Z2A9",
  "event_id": "evt_01J8Z3Q4R5S6T7V8W9X0Y1Z2B0",
  "event_type": "github.push.received",
  "attempt": 1,
  "status": "delivered",
  "payload_bytes": 2048,
  "payload_sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "body": "{\"ref\":\"refs/heads/main\"}",
  "created_at": "2026-10-29T09:00:00.000Z"
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('events.hook-delivery@1', value);   // { valid, errors: [{ path, message }] }
~~~~
