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

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

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

# NetworkUserUpdatedPayload `network.user.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.user.updated.v1.json`](/docs/contracts/network.user.updated.json)

network.user.updated v1 (OpenVibe.Network server/identity/profile-events.js; roadmap WS-B task 2). What other services may know about a person changed: their username, display name, picture, colour, role or ban. The payload is the person's whole current profile, not a diff, so a consumer keeps a projection by writing it over the one it has, and ignores one whose revision is not newer (events can arrive out of order). Emitted in the transaction of the change: a profile edit, a rename, a role grant or removal, a ban or unban. Consumers use it instead of their own copies: roles go both ways (a downgrade too), and a ban arrives even for someone who never comes back. Envelope: subject { type: user, id }, visibility internal, actor the person (their own edit) or the staff member.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `subject` | object | yes | The person (identity.subject-ref@1, a user). | - `no other fields` |
| `subject.type` | const | yes |  | - `= "user"` |
| `subject.id` | string | yes |  | - `pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$` |
| `network_user_id` | integer | yes | Network's numeric user id (the legacy id services linked before subjects). | - `minimum 1` |
| `revision` | integer | yes | Grows with every change to this person's profile; a consumer keeps the highest it has seen. | - `minimum 1` |
| `username` | string | yes |  | - `minLength 1`<br>- `maxLength 64` |
| `display_name` | string \| null |  |  | - `maxLength 120` |
| `avatar_url` | string \| null |  |  | - `maxLength 500` |
| `profile_color` | string \| null |  |  | - `maxLength 32` |
| `role` | enum | yes | The staff map's role (policy.staff-map); capabilities follow from it. | - `one of "user", "streamer", "global_mod", "admin"` |
| `banned` | boolean | yes |  |  |
| `changed` | array of enum | yes | What this change touched ('created' for a new account), so a consumer can skip work it does not need. | - `minItems 1`<br>- `unique items`<br>- `items: one of "username", "display_name", "avatar_url", "profile_color", "role", "banned", "created"` |

## Examples

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

 Valid: renamed-and-banned

~~~~
{
  "subject": {
    "type": "user",
    "id": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3"
  },
  "network_user_id": 7,
  "revision": 9,
  "username": "alex_new",
  "display_name": "Alex",
  "avatar_url": "https://openvibe.media/avatar/alex_new",
  "profile_color": null,
  "role": "streamer",
  "banned": true,
  "changed": [
    "username",
    "banned"
  ]
}
~~~~

Valid: role-removed

~~~~
{
  "subject": {
    "type": "user",
    "id": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3"
  },
  "network_user_id": 7,
  "revision": 4,
  "username": "alex",
  "display_name": "Alex",
  "avatar_url": null,
  "profile_color": "#8b5cf6",
  "role": "user",
  "banned": false,
  "changed": [
    "role"
  ]
}
~~~~

Rejected: nothing-changed

~~~~
{
  "subject": {
    "type": "user",
    "id": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3"
  },
  "network_user_id": 7,
  "revision": 1,
  "username": "alex",
  "role": "user",
  "banned": false,
  "changed": []
}
~~~~

Rejected: unknown-role

~~~~
{
  "subject": {
    "type": "user",
    "id": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3"
  },
  "network_user_id": 7,
  "revision": 1,
  "username": "alex",
  "role": "owner",
  "banned": false,
  "changed": [
    "role"
  ]
}
~~~~

## Validate

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