{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/airsign-com-au/json-schema/airsign-com-au-template-schema.json",
  "title": "Template",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/airsign-com-au-api-docs-openapi.json#/components/schemas/Template",
  "type": "object",
  "properties": {
    "templateId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "selfSignOnly": {
      "type": "boolean"
    },
    "createdAt": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string"
    },
    "files": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          }
        }
      }
    },
    "recipients": {
      "type": "array",
      "description": "Template recipients. Empty name/email fields should be filled when creating a session.",
      "items": {
        "type": "object",
        "properties": {
          "recipientId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "recipientType": {
            "type": "string"
          },
          "signingOrder": {
            "type": "integer"
          },
          "optional": {
            "type": "boolean",
            "description": "Leave blank or pass `exclude: true` at this position when creating a session and the recipient is dropped."
          }
        }
      }
    },
    "variables": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TemplateVariable"
      }
    }
  },
  "$defs": {
    "TemplateVariable": {
      "type": "object",
      "properties": {
        "variableId": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "displayName": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "text",
            "number",
            "date",
            "image",
            "table"
          ]
        },
        "required": {
          "type": "boolean",
          "description": "Whether a value must be provided when creating a session."
        },
        "defaultValue": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      }
    }
  }
}