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

# events.event-envelope@1 · OpenVibe.Services

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

# EventEnvelope `events.event-envelope@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.0.0
- Owner: events
- Visibility: public
- Status: active
- Compatibility: backward
- Decision: [ADR-004](/docs/adr/ADR-004)
- Schema: [`https://openvibe.network/contracts/events/event-envelope.v1.json`](/docs/contracts/events.event-envelope.json)

Durable platform event (OpenVibe.Events, Wave 3). Producers write it to an outbox in the same transaction as the domain change.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `event_id` | string | yes |  | - `pattern ^evt_[0-9A-HJKMNP-TV-Z]{26}$` |
| `trace_id` | string |  |  | - `pattern ^[0-9a-f]{32}$` |
| `event_type` | string | yes |  | - `pattern ^[a-z][a-z0-9_]*(\.[a-z0-9_]+){1,}$` |
| `version` | integer | yes |  | - `minimum 1` |
| `source` | string | yes |  | - `pattern ^[a-z][a-z0-9-]{1,39}$` |
| `actor` | [identity.subject-ref](/docs/contracts/identity.subject-ref) | yes |  |  |
| `on_behalf_of` | [identity.subject-ref](/docs/contracts/identity.subject-ref) |  |  |  |
| `timestamp` | string | yes |  | - `format date-time` |
| `priority` | enum |  |  | - `one of "critical", "important", "low"`<br>- `default "important"` |
| `visibility` | enum |  |  | - `one of "public", "subject", "internal"`<br>- `default "internal"` |
| `subject` | object | yes |  | - `no other fields` |
| `subject.type` | string | yes |  |  |
| `subject.id` | string | yes |  |  |
| `subject.revision` | integer |  |  | - `minimum 0` |
| `payload` | object | yes |  |  |

## Examples

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

 Valid: app-event

~~~~
{
  "event_id": "evt_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "event_type": "app.p01jab2c3d4e5f6g7h8j9k0mnpq.order.created",
  "version": 1,
  "source": "app-01jab2c3d4e5f6g7h8j9k0mnps",
  "actor": {
    "type": "app",
    "id": "app_01JAB2C3D4E5F6G7H8J9K0MNPS"
  },
  "timestamp": "2026-09-23T12:00:00Z",
  "visibility": "internal",
  "subject": {
    "type": "order",
    "id": "42"
  },
  "payload": {
    "total": 3
  }
}
~~~~

Valid: vod-ready

~~~~
{
  "event_id": "evt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
  "event_type": "media.vod.ready",
  "version": 1,
  "source": "media",
  "actor": {
    "type": "service",
    "id": "media"
  },
  "timestamp": "2026-09-22T12:00:00Z",
  "priority": "important",
  "visibility": "internal",
  "subject": {
    "type": "vod",
    "id": "1203",
    "revision": 4
  },
  "payload": {
    "duration": 3600
  }
}
~~~~

Rejected: bad-event-type

~~~~
{
  "event_id": "evt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "event_type": "vision.Alert",
  "version": 1,
  "source": "media",
  "actor": {
    "type": "service",
    "id": "media"
  },
  "timestamp": "2026-09-22T12:00:00Z",
  "subject": {
    "type": "vod",
    "id": "1"
  },
  "payload": {}
}
~~~~

Rejected: local-user-actor

~~~~
{
  "event_id": "evt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "event_type": "media.vod.ready",
  "version": 1,
  "source": "media",
  "actor": {
    "type": "user",
    "id": "42"
  },
  "timestamp": "2026-09-22T12:00:00Z",
  "subject": {
    "type": "vod",
    "id": "1"
  },
  "payload": {}
}
~~~~

## Validate

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