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

# events.subscription@1 · OpenVibe.Services

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

# EventsSubscription `events.subscription@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: first-party
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/events/subscription.v1.json`](/docs/contracts/events.subscription.json)

events.subscription@1: one push subscription as OpenVibe.Events shows it to its consumer (server/store.js subscriptionView). The signing secret appears only in the answer that creates it (and in a rotation's). A developer app's subscription also names its project and environment.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `id` | string | yes |  | - `pattern ^sub_` |
| `consumer` | string | yes | The calling service, or app:app\_<ULID>. |  |
| `topic_pattern` | string | yes |  |  |
| `endpoint` | string | yes |  |  |
| `enabled` | boolean | yes |  |  |
| `retry_policy` | object \| null | yes |  |  |
| `created_at` | string | yes |  | - `format date-time` |
| `updated_at` | string | yes |  | - `format date-time` |
| `project_id` | string |  |  |  |
| `env` | string |  |  |  |
| `secret` | string |  | Only when the subscription is created: shown once. |  |

## Examples

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

 Valid: service

~~~~
{
  "id": "sub_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "consumer": "live",
  "topic_pattern": "media.vod.*",
  "endpoint": "http://127.0.0.1:3000/internal/media-events",
  "enabled": true,
  "retry_policy": null,
  "created_at": "2026-09-25T18:00:00.000Z",
  "updated_at": "2026-09-25T18:00:00.000Z"
}
~~~~

Rejected: enabled-not-boolean

~~~~
{
  "id": "sub_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "consumer": "live",
  "topic_pattern": "media.vod.*",
  "endpoint": "http://127.0.0.1:3000/x",
  "enabled": "yes",
  "retry_policy": null,
  "created_at": "2026-09-25T18:00:00.000Z",
  "updated_at": "2026-09-25T18:00:00.000Z"
}
~~~~

## Validate

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