{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nudg3-ai/json-schema/nudg3-ai-company-workspace-response-schema.json",
  "title": "CompanyWorkspaceResponse",
  "description": "Workspace response for company users with additional stats.",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nudg3-ai-openapi.json#/components/schemas/CompanyWorkspaceResponse",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Updated At"
    },
    "name": {
      "type": "string",
      "title": "Name"
    },
    "brand_name": {
      "type": "string",
      "title": "Brand Name"
    },
    "brand_domain": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Brand Domain"
    },
    "brand_keywords": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Brand Keywords"
    },
    "brand_aliases": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Brand Aliases",
      "description": "Alternative brand names"
    },
    "industry": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Industry"
    },
    "brand_description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Brand Description"
    },
    "target_market": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Target Market"
    },
    "provider_configs": {
      "additionalProperties": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "object",
      "title": "Provider Configs",
      "description": "Provider configurations"
    },
    "max_prompts": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Prompts",
      "description": "DEPRECATED: Use unified quota system (WorkspaceQuota) instead.",
      "deprecated": true
    },
    "settings": {
      "additionalProperties": true,
      "type": "object",
      "title": "Settings"
    },
    "is_active": {
      "type": "boolean",
      "title": "Is Active"
    },
    "is_pitch": {
      "type": "boolean",
      "title": "Is Pitch",
      "default": false
    },
    "pitch_locked_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Pitch Locked At"
    },
    "default_location_country": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Default Location Country"
    },
    "default_location_city": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Default Location City"
    },
    "default_location_region": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Default Location Region"
    },
    "company_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Company Id"
    },
    "company_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Company Name"
    },
    "agency_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ],
      "title": "Agency Id"
    },
    "agency_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Agency Name"
    },
    "subscription_status": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Subscription Status",
      "description": "Subscription status: ACTIVE, PENDING, CANCELLED, EXPIRED, SUSPENDED, or null"
    },
    "is_trial": {
      "type": "boolean",
      "title": "Is Trial",
      "description": "Whether workspace is currently on an active trial",
      "default": false
    },
    "trial_end_date": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Trial End Date",
      "description": "Trial end date if applicable"
    },
    "brands_count": {
      "type": "integer",
      "title": "Brands Count",
      "default": 0
    },
    "collection_runs_count": {
      "type": "integer",
      "title": "Collection Runs Count",
      "default": 0
    },
    "last_collection_run": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Collection Run"
    }
  },
  "type": "object",
  "required": [
    "id",
    "created_at",
    "updated_at",
    "name",
    "brand_name",
    "is_active"
  ]
}