NetworkConsentChoice network.consent-choice@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

Version
1.0.0
Owner
network
Visibility
public
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/network/consent-choice.v1.json

network.consent-choice@1 (L24): the body of PUT /api/v1/me/consent/:purpose on OpenVibe.Network — the signed-in person turns a purpose on or off. Turning on records the wording they saw (text_version, which must be the current one) and, for the adults-only purposes, that they confirmed they are 18 or older. Turning off revokes the active choice. An app's choice (app.data) is made on its consent screen, not here.

Fields

FieldTypeRequiredDescriptionConstraints
onbooleanyes
kindsarray of enum
  • maxItems 8
  • unique items
  • items: one of "streams", "vods", "clips", "voice", "chat", "posts", "pictures", "code"
optionsobject
  • no other fields
options.licenceenum
  • one of "cc-by-4.0", "cc0-1.0"
options.featuresarray of enum
  • maxItems 4
  • unique items
  • items: one of "verify", "find", "cast", "library"
text_versionstringThe wording the page showed. Required to turn on; a stale one is refused (consent.stale_text) so the page shows the new words first.
  • pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}\.[0-9]{1,3}$
adultbooleanThe person confirmed they are 18 or older. Required (true) to turn on face.recognize, ai.looks, ai.train or data.public.

Examples

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

Valid: turn-off
{
  "on": false
}
Valid: turn-on
{
  "on": true,
  "kinds": [
    "chat"
  ],
  "text_version": "2026-10-31.1",
  "adult": true
}
Rejected: extra-key
{
  "on": true,
  "text_version": "2026-10-31.1",
  "subject": "usr_01K6R2Z8C4V7M9Q3T5W1X2Y3Z4"
}

Validate

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