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

# network.principal\_grant.changed@1 · OpenVibe.Services

HTML: [network.principal\_grant.changed@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/network.principal_grant.changed)

# NetworkPrincipalGrantChangedPayload `network.principal_grant.changed@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.principal_grant.changed.v1.json`](/docs/contracts/network.principal_grant.changed.json)

network.principal\_grant.changed v1 (OpenVibe.Network server/identity/grants-admin.js; roadmap WS-D task 3). A first-party service principal's capability grant was given, changed (namespaces or expiry), revoked by the owner, or expired. The seeded default grants are not announced. Written to Network's outbox in the transaction that changes principal\_grants, beside an audit row. A service's next token (at most 5 minutes later) carries the change. Envelope: subject { type: grant, id: <client\_id>:<capability>@<audience> }, visibility internal, actor the owner who changed it (or the system for an expiry). (A developer app's grant is network.grant.changed.)

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `client_id` | string | yes | The service principal (oauth client id). | - `pattern ^[a-z][a-z0-9_-]{0,63}$` |
| `capability` | string | yes |  | - `pattern ^[a-z][a-z0-9_]*\.[a-z][a-z0-9_]*\.[a-z][a-z0-9_]*$` |
| `audience` | string | yes |  | - `pattern ^openvibe\.[a-z][a-z0-9_-]{0,63}$` |
| `change` | enum | yes |  | - `one of "granted", "updated", "revoked", "expired"` |
| `namespaces` | array of string |  |  | - `maxItems 100`<br>- `items: maxLength 200` |
| `expires_at` | string \| null |  |  | - `format date-time` |
| `reason` | string \| null |  |  | - `maxLength 500` |
| `actor_subject` | string \| null |  | The owner who made the change; null for an expiry. |  |

## Examples

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

 Valid: expired

~~~~
{
  "client_id": "tools",
  "capability": "media.object.write",
  "audience": "openvibe.media",
  "change": "expired",
  "namespaces": [],
  "expires_at": "2026-09-25T00:00:00.000Z",
  "reason": null,
  "actor_subject": null
}
~~~~

Valid: granted

~~~~
{
  "client_id": "live",
  "capability": "network.modules.write",
  "audience": "openvibe.network",
  "change": "granted",
  "namespaces": [
    "live.profile"
  ],
  "expires_at": "2026-12-31T00:00:00.000Z",
  "reason": "profile summaries",
  "actor_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
}
~~~~

Rejected: bad-change

~~~~
{
  "client_id": "live",
  "capability": "network.modules.write",
  "audience": "openvibe.network",
  "change": "deleted"
}
~~~~

## Validate

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