---
title: "vip.policy-rule@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/vip.policy-rule"
updated: null
---

# vip.policy-rule@1 · OpenVibe.Services

HTML: [vip.policy-rule@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/vip.policy-rule)

# VipPolicyRule `vip.policy-rule@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: vip
- Visibility: first-party
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/vip/policy-rule.v1.json`](/docs/contracts/vip.policy-rule.json)

vip.policy-rule@1: a gated-resource rule on OpenVibe.VIP (server/domain/policies.js present): resource R (an EntityRef the product owns) is for members of creator C (requirement member), members of one plan (plan, plan\_id), or members whose plan version includes a perk (perk, perk\_key). sensitive rules always ask Billing, never the projection. A rule that was replaced or removed is disabled.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `id` | string | yes |  | - `pattern ^vgr_[0-9A-HJKMNP-TV-Z]{26}$` |
| `creator` | one of | yes |  |  |
| `creator_id` | string | yes |  | - `pattern ^vcr_[0-9A-HJKMNP-TV-Z]{26}$` |
| `resource` | [common.entity-ref](/docs/contracts/common.entity-ref) | yes |  |  |
| `requirement` | enum | yes |  | - `one of "member", "plan", "perk"` |
| `plan_id` | string \| null | yes |  |  |
| `perk_key` | string \| null | yes |  |  |
| `sensitive` | boolean | yes |  |  |
| `status` | enum | yes |  | - `one of "active", "disabled"` |
| `updated_at` | string | yes |  | - `format date-time` |

## Examples

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

 Valid: perk

~~~~
{
  "id": "vgr_01JAB2C3D4E5F6G7H8J9K0MNPY",
  "creator": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "creator_id": "vcr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "resource": {
    "service": "blog",
    "type": "post",
    "id": "pst_01JAB2C3D4E5F6G7H8J9K0MNPZ"
  },
  "requirement": "perk",
  "plan_id": null,
  "perk_key": "chat-badge",
  "sensitive": false,
  "status": "active",
  "updated_at": "2026-09-20T18:04:11.402Z"
}
~~~~

Rejected: bad-requirement

~~~~
{
  "id": "vgr_01JAB2C3D4E5F6G7H8J9K0MNPY",
  "creator": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "creator_id": "vcr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "resource": {
    "service": "blog",
    "type": "post",
    "id": "pst_01JAB2C3D4E5F6G7H8J9K0MNPZ"
  },
  "requirement": "follower",
  "plan_id": null,
  "perk_key": "chat-badge",
  "sensitive": false,
  "status": "active",
  "updated_at": "2026-09-20T18:04:11.402Z"
}
~~~~

## Validate

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