{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/buildworkpro-com/json-schema/buildworkpro-com-oauth-userinfo-schema.json",
  "title": "OauthUserinfo",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/buildworkpro-com-oauth-api-openapi.yml#/components/schemas/OauthUserinfo",
  "type": "object",
  "properties": {
    "sub": {
      "type": "string",
      "description": "Stringified user id of the resource owner."
    },
    "tenant_id": {
      "type": "integer",
      "description": "Tenant the access token is scoped to."
    },
    "email": {
      "type": "string",
      "format": "email",
      "description": "Email address of the resource owner."
    },
    "name": {
      "type": "string",
      "description": "`firstName lastName`, trimmed. Empty string when both names are missing — never null."
    },
    "role": {
      "type": "string",
      "description": "The user's tenant role at the moment the request was authenticated."
    },
    "scopes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The scopes carried by the presented access token."
    }
  },
  "required": [
    "sub",
    "tenant_id",
    "email",
    "name",
    "role",
    "scopes"
  ]
}