{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/feedback1-ai/json-schema/feedback1-ai-widget-feedback-submission-schema.json",
  "title": "WidgetFeedbackSubmission",
  "description": "Submit feedback via widget",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/feedback1-ai-openapi.json#/components/schemas/WidgetFeedbackSubmission",
  "properties": {
    "product_pub_id": {
      "type": "string",
      "title": "Product Pub Id"
    },
    "widget_pub_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Widget Pub Id"
    },
    "content": {
      "type": "string",
      "minLength": 1,
      "title": "Content"
    },
    "campaign_slug": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Campaign Slug"
    },
    "source_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source Url"
    },
    "email": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Email"
    },
    "first_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "First Name"
    },
    "last_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Name"
    },
    "company_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Company Name"
    },
    "company_revenue": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Company Revenue"
    },
    "avatar_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Avatar Url"
    },
    "device_context": {
      "anyOf": [
        {
          "$ref": "#/$defs/ClientDeviceContext"
        },
        {
          "type": "null"
        }
      ]
    },
    "attachments": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "array",
      "title": "Attachments",
      "default": []
    },
    "screenshot": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Screenshot"
    },
    "token": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Token"
    },
    "turnstile_token": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Turnstile Token"
    },
    "website": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Website"
    }
  },
  "type": "object",
  "required": [
    "product_pub_id",
    "content"
  ],
  "$defs": {
    "ClientDeviceContext": {
      "properties": {
        "timezone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Timezone"
        },
        "language": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Language"
        },
        "screen_resolution": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Screen Resolution"
        },
        "viewport": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Viewport"
        }
      },
      "type": "object",
      "title": "ClientDeviceContext",
      "description": "Optional client-side device metadata from widget/userportal."
    }
  }
}