{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/commareports-com/json-schema/commareports-com-share-put-request-schema.json",
  "title": "SharePutRequest",
  "description": "At least one property must be present.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/commareports-com-openapi.yml#/components/schemas/SharePutRequest",
  "type": "object",
  "minProperties": 1,
  "properties": {
    "visibility": {
      "type": "string",
      "enum": [
        "private",
        "team",
        "registered",
        "domain",
        "public"
      ]
    },
    "allowed_email_domains": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "minItems": 1,
      "description": "Required with, and only accepted with, visibility 'domain'. Bare domains (e.g. 'acme.com'); lowercased and de-duplicated. Replaces the existing list."
    },
    "public_permission": {
      "type": "string",
      "enum": [
        "none",
        "view",
        "comment",
        "edit"
      ]
    },
    "show_approved_only": {
      "type": "boolean"
    },
    "allowed_embed_origins": {
      "type": [
        "array",
        "null"
      ],
      "maxItems": 20,
      "items": {
        "type": "string",
        "pattern": "^(https:\\/\\/([a-z0-9]([a-z0-9-]*[a-z0-9])?\\.)+[a-z]{2,}|http:\\/\\/localhost|http:\\/\\/127\\.0\\.0\\.1)(:\\d{1,5})?$"
      },
      "description": "Bare origins (scheme + host + optional port, no path) allowed to iframe the report via `/embed/{id}`. https is required except for http://localhost and http://127.0.0.1. `[]` or `null` turns embedding off."
    }
  }
}