---
title: "news.story.flagged@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/news.story.flagged"
updated: null
---

# news.story.flagged@1 · OpenVibe.Services

HTML: [news.story.flagged@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/news.story.flagged)

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

news.story.flagged v1 (OpenVibe.News server/domain/stories.js flagEvent, from onUpstreamChange). A source item a story cites changed (source\_updated) or was removed (source\_removed) upstream in OpenVibe.Sources, inside the ingest transaction that applied it: the story has an open editorial flag and, when it has text, a pending system-prepared revision (same paragraphs, refreshed source table) for an editor to check and publish. The published revision does not change. One event per affected story; an open source\_updated flag is reused (its pending revision moves on) and announced again, an open source\_removed flag is not. Editor flags (correction, update) and retraction flags do not emit this event. Envelope: subject { type: story, id: sty\_…, revision: <pending revision, else the published revision, else 0> }, visibility internal, priority important for source\_removed and normal for source\_updated (normal is not an events.event-envelope@1 priority, so that envelope is refused until News sends low or important), actor service:news.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `flag_id` | string | yes | The news\_editorial\_flags row. | - `pattern ^flg_[0-9A-HJKMNP-TV-Z]{26}$` |
| `kind` | enum | yes |  | - `one of "source_updated", "source_removed"` |
| `status` | const | yes |  | - `= "open"` |
| `source_item_id` | string | yes | The News source item that changed or was removed. | - `pattern ^nsi_[0-9A-HJKMNP-TV-Z]{26}$` |
| `pending_revision` | integer \| null | yes | The revision News prepared for an editor; null when the story has no text yet or nothing new was prepared. | - `minimum 1` |
| `published_revision` | integer \| null | yes | The revision readers see; null when the story was never published. | - `minimum 1` |

## Examples

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

 Valid: source-removed

~~~~
{
  "flag_id": "flg_01K5S2G6J8M0P2R4T6V8X0Z2B4",
  "kind": "source_removed",
  "status": "open",
  "source_item_id": "nsi_01K5RZ3M8Q2W7T4XC9V6B1N0JD",
  "pending_revision": 2,
  "published_revision": 1
}
~~~~

Valid: source-updated-draft

~~~~
{
  "flag_id": "flg_01K5S2H7K9N1Q3S5V7X9Z1B3D5",
  "kind": "source_updated",
  "status": "open",
  "source_item_id": "nsi_01K5RZ4F0A6H3K8PQ2S5W7Y9ZE",
  "pending_revision": null,
  "published_revision": null
}
~~~~

Rejected: editor-kind

~~~~
{
  "flag_id": "flg_01K5S2G6J8M0P2R4T6V8X0Z2B4",
  "kind": "correction",
  "status": "open",
  "source_item_id": "nsi_01K5RZ3M8Q2W7T4XC9V6B1N0JD",
  "pending_revision": null,
  "published_revision": 1
}
~~~~

Rejected: missing-source-item

~~~~
{
  "flag_id": "flg_01K5S2G6J8M0P2R4T6V8X0Z2B4",
  "kind": "source_removed",
  "status": "open",
  "source_item_id": null,
  "pending_revision": 2,
  "published_revision": 1
}
~~~~

Rejected: resolved-status

~~~~
{
  "flag_id": "flg_01K5S2G6J8M0P2R4T6V8X0Z2B4",
  "kind": "source_updated",
  "status": "resolved",
  "source_item_id": "nsi_01K5RZ3M8Q2W7T4XC9V6B1N0JD",
  "pending_revision": 2,
  "published_revision": 1
}
~~~~

## Validate

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