---
title: "identity.subject-ref@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/identity.subject-ref"
updated: null
---

# identity.subject-ref@1 · OpenVibe.Services

HTML: [identity.subject-ref@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/identity.subject-ref)

# SubjectRef `identity.subject-ref@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: public
- Status: active
- Compatibility: backward
- Decision: [ADR-001](/docs/adr/ADR-001)
- Schema: [`https://openvibe.network/contracts/identity/subject-ref.v1.json`](/docs/contracts/identity.subject-ref.json)

The one cross-platform reference to an actor. Issued by OpenVibe.Network. Never a service-local integer id.

## Fields

This schema has no named fields.

## Examples

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

 Valid: agent

~~~~
{
  "type": "agent",
  "id": "agt_01J0000000000000000000000A"
}
~~~~

Valid: guest

~~~~
{
  "type": "guest",
  "id": "gst_01JAB2C3D4E5F6G7H8J9K0MNPQ"
}
~~~~

Valid: service

~~~~
{
  "type": "service",
  "id": "live"
}
~~~~

Valid: user

~~~~
{
  "type": "user",
  "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
}
~~~~

Rejected: extra-field

~~~~
{
  "type": "user",
  "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "username": "x"
}
~~~~

Rejected: integer-id

~~~~
{
  "type": "user",
  "id": 42
}
~~~~

Rejected: live-local-id

~~~~
{
  "type": "user",
  "id": "123"
}
~~~~

Rejected: service-uppercase

~~~~
{
  "type": "service",
  "id": "Live"
}
~~~~

Rejected: unknown-type

~~~~
{
  "type": "bot",
  "id": "x1"
}
~~~~

Rejected: wrong-prefix

~~~~
{
  "type": "user",
  "id": "gst_01JAB2C3D4E5F6G7H8J9K0MNPQ"
}
~~~~

## Validate

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