{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/avala-ai/json-schema/avala-ai-organization-list-schema.json",
  "title": "OrganizationList",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/avala-ai-openapi.json#/components/schemas/OrganizationList",
  "required": [
    "name",
    "slug"
  ],
  "type": "object",
  "properties": {
    "uid": {
      "title": "Uid",
      "type": "string",
      "format": "uuid",
      "readOnly": true
    },
    "name": {
      "title": "Name",
      "type": "string",
      "maxLength": 1024,
      "minLength": 1
    },
    "slug": {
      "title": "Slug",
      "type": "string",
      "format": "slug",
      "pattern": "^[-a-zA-Z0-9_]+$",
      "maxLength": 255,
      "minLength": 1
    },
    "handle": {
      "title": "Handle",
      "description": "Unique handle for the organization (e.g., 'irobot'). Used in URLs and mentions.",
      "type": [
        "string",
        "null"
      ],
      "pattern": "^[a-zA-Z0-9_]+$",
      "maxLength": 50
    },
    "logo": {
      "title": "Logo",
      "type": [
        "string",
        "null"
      ],
      "readOnly": true,
      "format": "uri"
    },
    "industry": {
      "title": "Industry",
      "type": "string",
      "enum": [
        "robotics",
        "autonomous_vehicle",
        "ai_ml",
        "other"
      ]
    },
    "visibility": {
      "title": "Visibility",
      "description": "Whether the organization profile is publicly visible.",
      "type": "string",
      "enum": [
        "public",
        "private"
      ]
    },
    "plan": {
      "title": "Plan",
      "description": "Subscription plan for the organization.",
      "type": "string",
      "enum": [
        "basic",
        "pro",
        "enterprise"
      ]
    },
    "is_verified": {
      "title": "Is verified",
      "description": "Whether the organization has been verified by staff.",
      "type": "boolean"
    },
    "is_active": {
      "title": "Is active",
      "description": "Whether the organization is active. Inactive organizations cannot be accessed.",
      "type": "boolean"
    },
    "member_count": {
      "title": "Member count",
      "description": "Number of members in the organization",
      "type": "integer",
      "readOnly": true
    },
    "team_count": {
      "title": "Team count",
      "description": "Number of teams in the organization",
      "type": "integer",
      "readOnly": true
    },
    "role": {
      "title": "Role",
      "description": "Current user's role in this organization",
      "type": [
        "string",
        "null"
      ],
      "readOnly": true
    },
    "billing_status": {
      "title": "Billing status",
      "description": "Billing subscription status: active, past_due, canceled, trialing, inactive, or null",
      "type": [
        "string",
        "null"
      ],
      "readOnly": true
    },
    "created_at": {
      "title": "Created at",
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "joined_at": {
      "title": "Joined at",
      "description": "When the current user joined this organization",
      "type": [
        "string",
        "null"
      ],
      "readOnly": true
    },
    "public_slug": {
      "title": "Public slug",
      "description": "Canonical slug for URL rendering. Coworker viewers receive the organization's codename; others receive the real slug.",
      "type": "string",
      "readOnly": true
    }
  }
}