{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/User",
  "title": "User",
  "type": "object",
  "description": "Represents a user account in an Atlassian organization.",
  "properties": {
    "account_id": {
      "type": "string",
      "description": "The unique Atlassian account identifier.",
      "example": "500123"
    },
    "account_type": {
      "type": "string",
      "description": "The type of account.",
      "enum": [
        "atlassian",
        "customer",
        "app"
      ],
      "example": "atlassian"
    },
    "account_status": {
      "type": "string",
      "description": "The current status of the account.",
      "enum": [
        "active",
        "inactive",
        "closed"
      ],
      "example": "active"
    },
    "name": {
      "type": "string",
      "description": "The display name of the user.",
      "example": "Example Title"
    },
    "email": {
      "type": "string",
      "format": "email",
      "description": "The email address of the user.",
      "example": "user@example.com"
    },
    "picture": {
      "type": "string",
      "format": "uri",
      "description": "URL of the user's profile picture.",
      "example": "https://www.example.com"
    },
    "nickname": {
      "type": "string",
      "description": "The nickname of the user.",
      "example": "example_value"
    },
    "last_active": {
      "type": "string",
      "format": "date-time",
      "description": "The last time the user was active.",
      "example": "2026-01-15T10:30:00Z"
    },
    "created": {
      "type": "string",
      "format": "date-time",
      "description": "When the user account was created.",
      "example": "2026-01-15T10:30:00Z"
    },
    "product_access": {
      "type": "array",
      "description": "Products the user has access to.",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "The product key."
          },
          "name": {
            "type": "string",
            "description": "The product name."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The URL of the product site."
          },
          "last_active": {
            "type": "string",
            "format": "date-time",
            "description": "Last time the user accessed this product."
          }
        }
      },
      "example": []
    }
  }
}