{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/avala-ai/json-schema/avala-ai-organization-detail-schema.json",
  "title": "OrganizationDetail",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/avala-ai-openapi.json#/components/schemas/OrganizationDetail",
  "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
    },
    "description": {
      "title": "Description",
      "type": "string",
      "maxLength": 1024
    },
    "readme": {
      "title": "Readme",
      "type": "string",
      "maxLength": 65536
    },
    "logo": {
      "title": "Logo",
      "type": [
        "string",
        "null"
      ],
      "readOnly": true,
      "format": "uri"
    },
    "website": {
      "title": "Website",
      "type": "string",
      "format": "uri",
      "maxLength": 200
    },
    "x_url": {
      "title": "X url",
      "type": "string",
      "format": "uri",
      "maxLength": 500
    },
    "hugging_face_url": {
      "title": "Hugging face url",
      "type": "string",
      "format": "uri",
      "maxLength": 500
    },
    "github_url": {
      "title": "Github url",
      "type": "string",
      "format": "uri",
      "maxLength": 500
    },
    "linkedin_url": {
      "title": "Linkedin url",
      "type": "string",
      "format": "uri",
      "maxLength": 500
    },
    "organization_type": {
      "title": "Organization type",
      "type": "string",
      "enum": [
        "",
        "company",
        "university",
        "classroom",
        "non_profit",
        "government",
        "community"
      ]
    },
    "industry": {
      "title": "Industry",
      "type": "string",
      "enum": [
        "robotics",
        "autonomous_vehicle",
        "ai_ml",
        "other"
      ]
    },
    "email": {
      "title": "Email",
      "description": "Contact email for the organization.",
      "type": "string",
      "format": "email",
      "maxLength": 254
    },
    "phone": {
      "title": "Phone",
      "description": "Contact phone number for the organization.",
      "type": "string",
      "maxLength": 50
    },
    "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
    },
    "dataset_count": {
      "title": "Dataset count",
      "description": "Number of datasets in the organization",
      "type": "integer",
      "readOnly": true
    },
    "project_count": {
      "title": "Project count",
      "description": "Number of projects in the organization",
      "type": "integer",
      "readOnly": true
    },
    "slice_count": {
      "title": "Slice count",
      "description": "Number of slices in the organization",
      "type": "integer",
      "readOnly": true
    },
    "role": {
      "title": "Role",
      "description": "Current user's role in this organization",
      "type": [
        "string",
        "null"
      ],
      "readOnly": true
    },
    "allowed_domains": {
      "description": "Allowed email domains for auto-enrollment (owner/admin/staff only)",
      "type": "array",
      "items": {
        "type": "string"
      },
      "readOnly": true
    },
    "slug_edits_remaining": {
      "title": "Slug edits remaining",
      "description": "Number of remaining slug edits allowed (max 3)",
      "type": "integer",
      "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
    },
    "updated_at": {
      "title": "Updated at",
      "type": "string",
      "format": "date-time",
      "readOnly": true
    }
  }
}