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

# network.module.updated@1 · OpenVibe.Services

HTML: [network.module.updated@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/network.module.updated)

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

network.module.updated v1 (OpenVibe.Network server/identity/module-events.js buildEnvelope, called from server/identity/modules.js). One event per change to one person's user-module record (modules.module-record@1): a write (created or updated), a delete by the person (delete) or by the owning service (owner\_delete, also the retention sweep of a retired owner's delete-after-retention namespace), account removal (subject\_removed: every record of the account is deleted) and account merge (subject\_merged: the absorbed account's records are deleted, merged\_into; a record moved to the surviving account is created there, merged\_from; where the survivor already has one, the survivor's is kept and unchanged). Written into Network's event outbox in the transaction that makes the change. revision grows by one on every change to (owner, namespace), deletes included, and never restarts: a consumer keeps the highest revision it applied and ignores anything lower. Values of private fields never leave Network: keys names the changed fields, public carries only the new values of changed public fields. Envelope: subject { type: user\_module, id: <owner id>:<namespace>, revision }, visibility internal, actor the person, the owning service or system:network.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `owner` | one of | yes | The person the record belongs to (identity.subject-ref@1, a user or a guest). |  |
| `namespace` | string | yes | e.g. chat.preferences (modules.namespace@1). | - `pattern ^[a-z][a-z0-9_]*(\.[a-z0-9_]+)+$` |
| `namespace_owner` | string | yes | The service that owns the namespace when the change was made. | - `pattern ^[a-z][a-z0-9-]{1,39}$` |
| `schema_version` | integer | yes | The namespace version the record was written under. | - `minimum 1` |
| `revision` | integer | yes | The record's revision after this change (the envelope subject revision). | - `minimum 1` |
| `change` | enum | yes |  | - `one of "created", "updated", "deleted"` |
| `reason` | enum | yes |  | - `one of "write", "delete", "owner_delete", "subject_removed", "subject_merged"` |
| `keys` | array of string | yes | Top-level fields added, changed or removed, names only, sorted. A deleted record lists every field it held. | - `unique items`<br>- `items: minLength 1` |
| `public` | object |  | The new values of the changed fields the namespace declares public; null for one that was removed. Absent when no public field changed, for a namespace without public fields and for a deleted record. |  |
| `merged_into` | one of |  | On the absorbed account's deleted record (reason subject\_merged): the account that survives. |  |
| `merged_from` | one of |  | On a record moved to the surviving account (created, reason subject\_merged): the account it came from. |  |

## Examples

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

 Valid: account-removed

~~~~
{
  "owner": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "namespace": "live.profile",
  "namespace_owner": "live",
  "schema_version": 1,
  "revision": 5,
  "change": "deleted",
  "reason": "subject_removed",
  "keys": [
    "followers",
    "is_streamer"
  ]
}
~~~~

Valid: merge-absorbed-side

~~~~
{
  "owner": {
    "type": "guest",
    "id": "gst_01JAB2C3D4E5F6G7H8J9K0MNPR"
  },
  "namespace": "chat.tts_defaults",
  "namespace_owner": "live",
  "schema_version": 1,
  "revision": 2,
  "change": "deleted",
  "reason": "subject_merged",
  "keys": [
    "rate"
  ],
  "merged_into": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  }
}
~~~~

Valid: merge-surviving-side

~~~~
{
  "owner": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "namespace": "chat.tts_defaults",
  "namespace_owner": "live",
  "schema_version": 1,
  "revision": 1,
  "change": "created",
  "reason": "subject_merged",
  "keys": [
    "rate"
  ],
  "merged_from": {
    "type": "guest",
    "id": "gst_01JAB2C3D4E5F6G7H8J9K0MNPR"
  }
}
~~~~

Valid: private-namespace

~~~~
{
  "owner": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "namespace": "chat.preferences",
  "namespace_owner": "chat",
  "schema_version": 1,
  "revision": 1,
  "change": "created",
  "reason": "write",
  "keys": [
    "compact",
    "timestamps"
  ]
}
~~~~

Valid: public-field-changed

~~~~
{
  "owner": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "namespace": "live.profile",
  "namespace_owner": "live",
  "schema_version": 1,
  "revision": 3,
  "change": "updated",
  "reason": "write",
  "keys": [
    "followers",
    "stream_minutes_30d"
  ],
  "public": {
    "followers": 4
  }
}
~~~~

Valid: public-field-removed

~~~~
{
  "owner": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "namespace": "live.profile",
  "namespace_owner": "live",
  "schema_version": 1,
  "revision": 4,
  "change": "updated",
  "reason": "write",
  "keys": [
    "last_live_at"
  ],
  "public": {
    "last_live_at": null
  }
}
~~~~

Rejected: carries-data

~~~~
{
  "owner": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "namespace": "live.profile",
  "namespace_owner": "live",
  "schema_version": 1,
  "revision": 3,
  "change": "updated",
  "reason": "write",
  "keys": [
    "followers",
    "stream_minutes_30d"
  ],
  "public": {
    "followers": 4
  },
  "data": {
    "followers": 4,
    "stream_minutes_30d": 12
  }
}
~~~~

Rejected: deleted-with-values

~~~~
{
  "owner": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "namespace": "live.profile",
  "namespace_owner": "live",
  "schema_version": 1,
  "revision": 5,
  "change": "deleted",
  "reason": "delete",
  "keys": [
    "followers"
  ],
  "public": {
    "followers": 4
  }
}
~~~~

Rejected: merged-into-on-a-write

~~~~
{
  "owner": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "namespace": "live.profile",
  "namespace_owner": "live",
  "schema_version": 1,
  "revision": 3,
  "change": "updated",
  "reason": "write",
  "keys": [
    "followers",
    "stream_minutes_30d"
  ],
  "public": {
    "followers": 4
  },
  "merged_into": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  }
}
~~~~

Rejected: revision-zero

~~~~
{
  "owner": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "namespace": "live.profile",
  "namespace_owner": "live",
  "schema_version": 1,
  "revision": 0,
  "change": "updated",
  "reason": "write",
  "keys": [
    "followers",
    "stream_minutes_30d"
  ],
  "public": {
    "followers": 4
  }
}
~~~~

Rejected: service-owner

~~~~
{
  "owner": {
    "type": "service",
    "id": "live"
  },
  "namespace": "live.profile",
  "namespace_owner": "live",
  "schema_version": 1,
  "revision": 3,
  "change": "updated",
  "reason": "write",
  "keys": [
    "followers",
    "stream_minutes_30d"
  ],
  "public": {
    "followers": 4
  }
}
~~~~

Rejected: unknown-reason

~~~~
{
  "owner": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "namespace": "live.profile",
  "namespace_owner": "live",
  "schema_version": 1,
  "revision": 3,
  "change": "updated",
  "reason": "expired",
  "keys": [
    "followers",
    "stream_minutes_30d"
  ],
  "public": {
    "followers": 4
  }
}
~~~~

## Validate

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