{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/reachsocial-dev/json-schema/reachsocial-dev-consent-schema.json",
  "title": "Consent",
  "x-generated": "2026-12-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/reachsocial-dev-openapi.yml#/components/schemas/Consent",
  "properties": {
    "flow": {
      "type": "string",
      "maxLength": 128,
      "minLength": 20,
      "title": "Flow"
    },
    "approve": {
      "type": "boolean",
      "title": "Approve"
    },
    "prepaid_consent": {
      "type": "boolean",
      "title": "Prepaid Consent",
      "default": false
    },
    "execution_policy": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "read_only",
            "free_only",
            "free_then_prepaid"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Execution Policy"
    },
    "limit_credits": {
      "type": "integer",
      "maximum": 1000000.0,
      "minimum": 0.0,
      "title": "Limit Credits",
      "default": 0
    },
    "expires_in_days": {
      "type": "integer",
      "maximum": 90.0,
      "minimum": 1.0,
      "title": "Expires In Days",
      "default": 30
    },
    "services": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array",
          "maxItems": 15
        },
        {
          "type": "null"
        }
      ],
      "title": "Services"
    }
  },
  "type": "object",
  "required": [
    "flow",
    "approve"
  ]
}