TfP Docs

OrganizationAdmin schema

Generated from the canonical schema schemas/organization-admin.schema.json by scripts/generate-schema-docs.mjs — do not edit this page by hand.

An administrative capability on an Organization, separate from membership: an admin is normally a member who has additionally been granted this capability. Not a role system — OrganizationMembership.role stays descriptive and never confers authority. Revocation rules (v0): an admin may revoke a grant they themselves issued or voluntarily step down from an ordinary grant; a DNS-controller admin (granted_via dns_verification) may revoke any non-controller grant — DNS control is the recovery authority. Controller grants are not permanent: a current controller may remove another controller grant (stale controllers can be rotated out), but never the last one — the Organization is never left with zero active controllers. Ending a User's membership ends their ordinary admin grants; DNS-controller grants persist as recovery authority.

Schema version: 1.0.0 · $id: https://tokensforprogress.org/schemas/organization-admin.schema.json

Fields

id

Type: string · Required: yes · Mutable: no · Pattern: ^oad_[0-9a-z]{10,32}$

Stable opaque identifier for this grant.

Example: "oad_01jf92aa1grnt"

organization_id

Type: string · Required: yes · Mutable: no · Pattern: ^org_[0-9a-z]{10,32}$

The Organization administered.

Example: "org_01jf90aa1mit0"

user_id

Type: string · Required: yes · Mutable: no · Pattern: ^usr_[0-9a-z]{10,32}$

The User holding the capability.

Example: "usr_01jf8xw3tempo"

granted_via

Type: creator | email_verification | dns_verification | admin_grant · Required: yes · Mutable: no

How the capability was obtained. dns_verification marks the domain controller — the recovery authority.

Example: "admin_grant"

granted_by_user_id

Type: string \| null · Required: no · Mutable: no · Pattern: ^usr_[0-9a-z]{10,32}$

The admin who issued this grant for admin_grant; the user themself for self-derived grants (creator, email/DNS verification). Null on records predating provenance.

Example: "usr_01jf8xw3tempo"

created_at

Type: string · Required: yes · Mutable: no

RFC 3339 UTC timestamp the capability was granted.

Example: "2026-08-31T18:00:00Z"

ended_at

Type: string \| null · Required: no · Mutable: yes

RFC 3339 UTC timestamp the capability ended (revoked, stepped down, or membership ended), or null while active.

Example: null

JSON Schema source

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://tokensforprogress.org/schemas/organization-admin.schema.json",
  "title": "OrganizationAdmin",
  "description": "An administrative capability on an Organization, separate from membership: an admin is normally a member who has additionally been granted this capability. Not a role system — OrganizationMembership.role stays descriptive and never confers authority. Revocation rules (v0): an admin may revoke a grant they themselves issued or voluntarily step down from an ordinary grant; a DNS-controller admin (granted_via dns_verification) may revoke any non-controller grant — DNS control is the recovery authority. Controller grants are not permanent: a current controller may remove another controller grant (stale controllers can be rotated out), but never the last one — the Organization is never left with zero active controllers. Ending a User's membership ends their ordinary admin grants; DNS-controller grants persist as recovery authority.",
  "x-tfp-version": "1.0.0",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "organization_id",
    "user_id",
    "granted_via",
    "created_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^oad_[0-9a-z]{10,32}$",
      "x-mutable": false,
      "description": "Stable opaque identifier for this grant.",
      "examples": [
        "oad_01jf92aa1grnt"
      ]
    },
    "organization_id": {
      "type": "string",
      "pattern": "^org_[0-9a-z]{10,32}$",
      "x-mutable": false,
      "description": "The Organization administered.",
      "examples": [
        "org_01jf90aa1mit0"
      ]
    },
    "user_id": {
      "type": "string",
      "pattern": "^usr_[0-9a-z]{10,32}$",
      "x-mutable": false,
      "description": "The User holding the capability.",
      "examples": [
        "usr_01jf8xw3tempo"
      ]
    },
    "granted_via": {
      "type": "string",
      "enum": [
        "creator",
        "email_verification",
        "dns_verification",
        "admin_grant"
      ],
      "x-mutable": false,
      "description": "How the capability was obtained. dns_verification marks the domain controller — the recovery authority.",
      "examples": [
        "admin_grant"
      ]
    },
    "granted_by_user_id": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^usr_[0-9a-z]{10,32}$",
      "x-mutable": false,
      "description": "The admin who issued this grant for admin_grant; the user themself for self-derived grants (creator, email/DNS verification). Null on records predating provenance.",
      "examples": [
        "usr_01jf8xw3tempo"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "x-mutable": false,
      "description": "RFC 3339 UTC timestamp the capability was granted.",
      "examples": [
        "2026-08-31T18:00:00Z"
      ]
    },
    "ended_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "x-mutable": true,
      "description": "RFC 3339 UTC timestamp the capability ended (revoked, stepped down, or membership ended), or null while active.",
      "examples": [
        null
      ]
    }
  }
}