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

# vision.alert@1 · OpenVibe.Services

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

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

vision.alert v1 (OpenVibe.Vision): an owner-granted camera alert. Envelope: source vision, subject { type: user, id: <source owner> }, visibility subject. The payload names the watched source reference and the classes found with their confidence; it carries no image bytes and no person's identity.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `kind` | enum | yes |  | - `one of "object", "scene_change", "face"` |
| `source_ref` | string | yes |  | - `minLength 1`<br>- `maxLength 160` |
| `classes` | array of string | yes |  | - `minItems 1`<br>- `maxItems 20`<br>- `items: maxLength 60` |
| `confidence` | number \| null | yes |  | - `minimum 0`<br>- `maximum 1` |
| `previous_ref` | string \| null |  |  | - `maxLength 160` |
| `detected_at` | string | yes |  | - `format date-time` |

## Examples

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

 Valid: one

~~~~
{
  "kind": "object",
  "source_ref": "cam:front-door",
  "classes": [
    "package"
  ],
  "confidence": 0.88,
  "detected_at": "2026-10-29T10:00:00.000Z"
}
~~~~

Rejected: one

~~~~
{
  "kind": "motion",
  "source_ref": "cam:front-door",
  "classes": [],
  "confidence": 2,
  "detected_at": "2026-10-29T10:00:00.000Z"
}
~~~~

## Validate

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