{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/botnotice-app/json-schema/botnotice-app-consent-check-schema.json",
  "title": "ConsentCheck",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/botnotice-app-openapi.json#/components/schemas/ConsentCheck",
  "type": "object",
  "properties": {
    "allowed": {
      "type": "boolean",
      "description": "Dial only when true"
    },
    "reason": {
      "type": "string",
      "enum": [
        "consent_on_file",
        "no_consent",
        "revoked",
        "wrong_scope",
        "invalid_number"
      ]
    },
    "message": {
      "type": "string"
    },
    "consent": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "scope": {
          "type": "string"
        },
        "method": {
          "type": "string"
        },
        "consented_at": {
          "type": "string"
        }
      }
    },
    "disclosure": {
      "type": "string",
      "description": "The line the call must open with"
    },
    "policyVersion": {
      "type": [
        "integer",
        "null"
      ]
    }
  }
}