{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/deadsimple-email/json-schema/deadsimple-email-identity-claims-schema.json",
  "title": "IdentityClaims",
  "description": "Claims in the id_token and from /userinfo. Which ones appear depends on the granted scopes and on whether the client is registered.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/deadsimple-email-openapi.json#/components/schemas/IdentityClaims",
  "type": "object",
  "properties": {
    "sub": {
      "type": "string",
      "description": "The inbox_id. Stable for the life of the inbox; use it as the user id."
    },
    "inbox_id": {
      "type": "string"
    },
    "agent": {
      "type": "boolean",
      "description": "Always true."
    },
    "owner_verified": {
      "type": "boolean",
      "description": "True when a verified human owns the account behind the inbox; false for unclaimed agent-signup (trial) accounts."
    },
    "email": {
      "type": "string",
      "description": "The inbox address (scope email)."
    },
    "email_verified": {
      "type": "boolean",
      "description": "Always true (scope email)."
    },
    "name": {
      "type": "string",
      "description": "Inbox display name, falling back to the local part (scope profile)."
    },
    "preferred_username": {
      "type": "string",
      "description": "Local part of the inbox address (scope profile)."
    },
    "org": {
      "type": "string",
      "description": "Account id that owns the inbox (scope org, registered clients)."
    },
    "plan": {
      "type": "string",
      "description": "Account plan (scope org, registered clients).",
      "enum": [
        "trial",
        "free",
        "hobby",
        "pro",
        "scale",
        "enterprise"
      ]
    },
    "owner_email": {
      "type": [
        "string",
        "null"
      ],
      "description": "Verified owner email (scope owner_email, registered clients). Returned from /userinfo only, never inside the id_token. Null when owner_verified is false."
    }
  }
}