Guide 02 · Data Model & Scopes

Context Bundles, Categories & Scopes Reference

Complete PROTEXT/0.1 reference for the 7 context categories, 23 well-known item kinds, OIDC claim mappings, structured values, and bundle envelope fields.

SPEC.md §3SPEC.md §3.2SPEC.md §3.3SPEC.md §4SPEC.md §5
Quick answer · PROTEXT/0.1

A Protext context bundle is a JSON envelope (protext: "0.1") carrying typed items in 7 fixed categories—identity, contact, link, work, interest, memory, and pref—filtered to the intersection of requested scopes and items ticked by the user.

Scopes unlock categories, never individual secrets automatically. Plain OIDC scopes profile (identity + link) and email (contact) map directly onto Protext categories, while custom kinds matching ^[a-z]+\.[a-z][a-z0-9-]*$ are valid inside any fixed category and unknown kinds must be ignored by relying parties.

Fixed PROTEXT/0.1 categories, scopes, well-known kinds, and OIDC claim mappings

Category & ScopeWell-known kindsOIDC claim mappingMulti-valued kinds
identity (context:identity, via profile)identity.name, identity.handle, identity.avatar, identity.headline, identity.bio, identity.location, identity.birthdatename, preferred_username, picture, birthdateNone (single-valued)
contact (context:contact, via email)contact.email, contact.phoneemail (email_verified: false), phone_numberNone (single-valued)
link (context:link, via profile)link.website, link.social, link.bookingwebsite (from link.website)link.social
work (context:work)work.building, work.problem, work.looking-for, work.can-help-with, work.role, work.companyNone (Protext bundle only)work.building, work.problem, work.looking-for, work.can-help-with
interest (context:interest)interest.topicNoneinterest.topic
memory (context:memory)memory.noteNone (defaults unchecked on new grants)memory.note
pref (context:pref)pref.language, pref.timezone, pref.tonezoneinfo (from pref.timezone)None (single-valued)
Wire format & code example

PROTEXT/0.1 context bundle wire format

Exact bundle envelope and item structure defined in SPEC.md §3.1 and §5.

{
  "protext": "0.1",
  "sub": "u_9f3k...",
  "handle": "jack",
  "issued_at": "2026-09-02T09:45:12Z",
  "items": [
    {
      "id": "it_8f1c...",
      "kind": "work.looking-for",
      "value": "a CEO to take SyncedIn and run it",
      "source": {
        "provider": "teammeet.io",
        "url": "https://teammeet.io/jack",
        "imported_at": "2026-09-02T09:41:00Z",
        "evidence": "published profile item, attributed to the speaker's own microphone"
      },
      "updated_at": "2026-09-02T09:41:00Z"
    },
    {
      "id": "it_2a9d...",
      "kind": "link.social",
      "value": { "url": "https://america.co/jack", "label": "America.co" },
      "label": "America.co",
      "source": {
        "provider": "america.co",
        "url": "https://america.co/jack",
        "imported_at": "2026-09-02T09:42:00Z"
      },
      "updated_at": "2026-09-02T09:42:00Z"
    }
  ],
  "personhood": []
}

How scopes and grants intersect

PROTEXT/0.1 defines four standard OIDC scopes (openid, profile, email, offline_access), seven category scopes (context:identity, context:contact, context:link, context:work, context:interest, context:memory, context:pref), and the wildcard context:*. Relying parties should ask for the narrowest scopes required and avoid context:* unless they can explain the need clearly.

A scope only limits what may be shared on the consent screen. The stored grant records the exact item IDs the person ticked. Whenever a bundle is assembled—at token issuance, /oidc/userinfo, or GET /api/v0/context—the provider returns only items that belong to both the granted item IDs and the granted categories.

Three identical delivery paths and structured values

Every bundle is delivered identically across three channels (§5): inline as context on the POST /oidc/token response, live via GET /api/v0/context with an access token, or signed as an RS256 JWS via context_token or GET /api/v0/context?format=jwt. Standard /oidc/userinfo also embeds the bundle under the protext claim.

In 0.1, link.social and other link.* kinds may carry a structured value object of the form { url, label }, while all other well-known kinds carry strings. Providers must never place nested private transcripts, chat logs, or files inside value (§3.3).

  • Every bundle includes a reserved personhood array (empty in 0.1) so relying parties can parse the schema now without breaking changes later (§7).
  • Conformant relying parties must ignore unknown item kinds gracefully rather than failing validation (§3.2, §10).
Next step

Verify against the normative specification or register your client.

Read PROTEXT/0.1 SpecDeveloper Quickstart10 Languages
FAQ

Frequently asked questions

What does the standard OIDC profile scope unlock in Protext?

Under SPEC.md §4 and lib/context.ts, profile is an alias for context:identity plus context:link, and email is an alias for context:contact. That lets ordinary OIDC clients request standard scopes and receive mapped claims automatically.

Can providers or importers define custom item kinds?

Yes. Categories are fixed in PROTEXT/0.1, but kinds inside a category are open as long as they match the lower-case grammar ^[a-z]+\.[a-z][a-z0-9-]*$. Relying parties must ignore kinds they do not recognize.

Which well-known kinds can appear multiple times in a bundle?

Seven well-known kinds are multi-valued in SPEC.md §3.2 and lib/context.ts: link.social, work.building, work.problem, work.looking-for, work.can-help-with, interest.topic, and memory.note.

Why is personhood an empty array in PROTEXT/0.1 bundles?

SPEC.md §7 reserves the personhood array on every bundle for optional third-party proof-of-personhood credentials (such as World ID, Human Passport, EUDI wallets, or W3C Digital Credentials API). Version 0.1 defines the slot shape and issues nothing.

How should my app read structured link.* values?

Check whether item.value is a string or an object with a url property (and optional label). The browser SDK helper Protext.get() and Protext.all() automatically unwrap object values with a url field into strings.

Where do the four work.* kinds come from?

SPEC.md §3.2 notes that work.building, work.problem, work.looking-for, and work.can-help-with are borrowed from TeamMeet's profile model, where each represents a claim a person made on their own microphone.

Related guides

Continue exploring PROTEXT/0.1

Guide 06 · Consent & Provenance

Item-Level Consent, Provenance Receipts & Privacy Model

Understand how PROTEXT/0.1 enforces sentence-by-sentence consent checkboxes, provenance source receipts without private transcripts, item visibility, and access logs.

Read guide →
Guide 01 · OIDC & OAuth 2.1

OpenID Connect & OAuth 2.1 PKCE Integration

Integrate Sign in with Protext using OpenID Connect Core discovery, OAuth 2.1 authorization code flow with S256 PKCE, RFC 9207 iss checks, and RS256 ID tokens.

Read guide →
Guide 03 · Browser SDK

Browser SDK (/sdk.js) & Declarative Form Autofill

Add Sign in with Protext to any web page using public/sdk.js: zero-secret PKCE S256 in the browser, data-protext form autofill, and protext:signed-in events.

Read guide →