{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cloudtruth/json-schema/cloudtruth-user-schema.json",
  "title": "User",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cloudtruth-users-api-openapi.yml#/components/schemas/User",
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "format": "uri",
      "readOnly": true
    },
    "id": {
      "type": "string",
      "description": "The unique identifier of a user.",
      "maxLength": 256
    },
    "type": {
      "type": "string",
      "description": "The type of user record.",
      "maxLength": 12
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "readOnly": true
    },
    "organization_name": {
      "type": [
        "string",
        "null"
      ],
      "readOnly": true,
      "description": "The user's organization name."
    },
    "membership_id": {
      "type": [
        "string",
        "null"
      ],
      "readOnly": true,
      "description": "Membership identifier for user."
    },
    "chatgpt_threads": {
      "type": "object",
      "additionalProperties": {},
      "readOnly": true,
      "description": "The threads this user is participating in with ChatGPT."
    },
    "role": {
      "type": [
        "string",
        "null"
      ],
      "readOnly": true,
      "description": "The user's role in the current organization (defined by the request authorization header)."
    },
    "email": {
      "type": [
        "string",
        "null"
      ],
      "readOnly": true
    },
    "picture_url": {
      "type": [
        "string",
        "null"
      ],
      "readOnly": true
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "modified_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "readOnly": true
    }
  },
  "required": [
    "chatgpt_threads",
    "created_at",
    "email",
    "id",
    "membership_id",
    "modified_at",
    "name",
    "organization_name",
    "picture_url",
    "role",
    "url"
  ]
}