{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/faxforagents/json-schema/faxforagents-approval-request-page-schema.json",
  "title": "ApprovalRequestPage",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/faxforagents-approvals-api-openapi.yml#/components/schemas/ApprovalRequestPage",
  "properties": {
    "items": {
      "items": {
        "$ref": "#/$defs/ApprovalRequest"
      },
      "type": "array",
      "title": "Items"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Cursor"
    }
  },
  "additionalProperties": true,
  "type": "object",
  "required": [
    "items"
  ],
  "$defs": {
    "ApprovalRequest": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "kind": {
          "type": "string",
          "enum": [
            "send",
            "help"
          ],
          "title": "Kind"
        },
        "status": {
          "type": "string",
          "enum": [
            "pending",
            "approved",
            "rejected",
            "revoked",
            "expired"
          ],
          "title": "Status"
        },
        "quote_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Quote Id"
        },
        "bound": {
          "additionalProperties": true,
          "type": "object",
          "title": "Bound"
        },
        "message": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Message"
        },
        "requested_by": {
          "type": "string",
          "title": "Requested By"
        },
        "decided_by": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Decided By"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reason"
        },
        "consumed_by_job_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Consumed By Job Id"
        },
        "created_at": {
          "type": "string",
          "title": "Created At"
        },
        "expires_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Expires At"
        },
        "decided_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Decided At"
        },
        "notified": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Notified",
          "description": "On creation: whether the organization was mailed. false when the request repeats a pending one or the organization's daily cap of request mails is reached; the request is still shown in the dashboard."
        }
      },
      "additionalProperties": true,
      "type": "object",
      "required": [
        "id",
        "kind",
        "status",
        "quote_id",
        "bound",
        "message",
        "requested_by",
        "decided_by",
        "reason",
        "consumed_by_job_id",
        "created_at",
        "expires_at",
        "decided_at"
      ],
      "title": "ApprovalRequest"
    }
  }
}