{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trajectory/json-schema/trajectory-organization-list-response-schema.json",
  "title": "OrganizationListResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trajectory-organizations-api-openapi.yml#/components/schemas/OrganizationListResponse",
  "properties": {
    "items": {
      "items": {
        "$ref": "#/$defs/Organization"
      },
      "type": "array",
      "title": "Items",
      "description": "Page of organizations, ordered by creation time."
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Cursor",
      "description": "Cursor for the next page, or null if none."
    },
    "has_more": {
      "type": "boolean",
      "title": "Has More",
      "description": "True if more organizations remain beyond this page."
    }
  },
  "type": "object",
  "required": [
    "items",
    "has_more"
  ],
  "$defs": {
    "Organization": {
      "properties": {
        "organization_id": {
          "type": "string",
          "title": "Organization Id",
          "description": "Opaque `org_*` identifier."
        },
        "organization_key": {
          "type": "string",
          "title": "Organization Key",
          "description": "URL slug prefixing the organization's platform paths. Unique per environment."
        },
        "organization_name": {
          "type": "string",
          "title": "Organization Name",
          "description": "Display name for the organization."
        },
        "tier": {
          "$ref": "#/$defs/OrganizationTier",
          "description": "Plan tier the organization is on."
        },
        "referral_source": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Referral Source",
          "description": "How the founding user heard about Trajectory, when self-serve onboarded."
        },
        "created_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Created At",
          "description": "UTC timestamp the organization was created."
        }
      },
      "type": "object",
      "required": [
        "organization_id",
        "organization_key",
        "organization_name",
        "tier"
      ],
      "title": "Organization"
    },
    "OrganizationTier": {
      "type": "string",
      "enum": [
        "ORG_TIER_STANDARD"
      ],
      "title": "OrganizationTier"
    }
  }
}