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

# events.redaction-directive@1 · OpenVibe.Services

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

# RedactionDirective `events.redaction-directive@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-026](/docs/adr/ADR-026)
- Schema: [`https://openvibe.network/contracts/events/redaction-directive.v1.json`](/docs/contracts/events.redaction-directive.json)

payload.redacts (ADR-026): a producer takes back events it published earlier. Any event may carry it, normally the producer's own \*.deleted event. It names event\_ids, or subject\_type + subject\_ids, or both, never an empty list. event\_ids names events directly; subject\_type + subject\_ids names every stored event of the same source (for an app, the same project and environment) about those subjects. OpenVibe.Events rewrites each target into a tombstone (events.tombstone-payload@1) in the transaction that stores the directive. Naming another source's event is 403 events.redaction\_not\_allowed (the whole batch is refused); a malformed directive is 422 events.invalid\_redaction. An event that carries a directive is never redacted itself.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `event_ids` | array of string |  | Events to redact by id. Duplicates are ignored. | - `minItems 1`<br>- `maxItems 1000`<br>- `items: pattern ^evt_[0-9A-HJKMNP-TV-Z]{26}$` |
| `subject_type` | string |  | Envelope subject.type of the events to redact (chat\_message, post…). Goes with subject\_ids. | - `pattern ^[a-z][a-z0-9_]{0,63}$` |
| `subject_ids` | array of string |  | Envelope subject.id values; every not-yet-redacted event of the same source about each one is redacted. | - `minItems 1`<br>- `maxItems 1000`<br>- `items: minLength 1`<br>- `items: maxLength 200` |

## Examples

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

 Valid: by-event-id

~~~~
{
  "event_ids": [
    "evt_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  ]
}
~~~~

Valid: by-subject

~~~~
{
  "subject_type": "chat_message",
  "subject_ids": [
    "1201",
    "1202"
  ]
}
~~~~

Rejected: empty-lists

~~~~
{
  "event_ids": [],
  "subject_type": "post",
  "subject_ids": []
}
~~~~

Rejected: names-nothing

~~~~
{}
~~~~

Rejected: type-without-ids

~~~~
{
  "subject_type": "chat_message"
}
~~~~

Rejected: unknown-field

~~~~
{
  "event_ids": [
    "evt_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  ],
  "reason": "spam"
}
~~~~

## Validate

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