{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/namirial/json-schema/namirial-draft-update-request-schema.json",
  "title": "DraftUpdateRequest",
  "description": "The request model for updating a draft.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/namirial-draft-api-openapi.yml#/components/schemas/DraftUpdateRequest",
  "required": [
    "DraftId"
  ],
  "type": "object",
  "properties": {
    "DraftId": {
      "description": "The identifier of the draft.",
      "maxLength": 36,
      "minLength": 36,
      "type": "string"
    },
    "Name": {
      "description": "The name of the envelope.",
      "maxLength": 100,
      "minLength": 0,
      "type": "string"
    },
    "MetaData": {
      "description": "The metadata of the envelope.",
      "maxLength": 204800,
      "minLength": 0,
      "type": "string"
    },
    "AddDocumentTimestamp": {
      "description": "If true, a timestamp is added to all documents of the envelope at the end of each signing activity.",
      "type": "boolean"
    },
    "ShareWithTeam": {
      "description": "If true, this envelope is shared with your teams.",
      "type": "boolean"
    },
    "LockFormFieldsOnFinish": {
      "description": "If true, form fields are locked after the envelope is finished.",
      "type": "boolean"
    },
    "SendFinishedDocumentsToAllSignersAndMustView": {
      "description": "If true, every signer and viewer will receive a copy of the finished documents.",
      "type": "boolean"
    },
    "LateIdentification": {
      "description": "If true, oAuth identification is performed when signing not when opening the document.",
      "type": "boolean"
    },
    "SealingConfiguration": {
      "$ref": "#/$defs/DraftUpdateSealingConfiguration",
      "description": "The configuration for envelope sealing."
    },
    "EmailConfiguration": {
      "$ref": "#/$defs/DraftUpdateEmailConfiguration",
      "description": "The configuration for notifications."
    },
    "ReminderConfiguration": {
      "$ref": "#/$defs/DraftUpdateReminderConfiguration",
      "description": "The configuration for reminders."
    },
    "ExpirationConfiguration": {
      "$ref": "#/$defs/DraftUpdateExpirationConfiguration",
      "description": "The configuration of the expiration for the envelope."
    },
    "CallbackConfiguration": {
      "$ref": "#/$defs/DraftUpdateCallbackConfiguration",
      "description": "The configuration of the callbacks for a custom integration."
    },
    "AgentRedirectConfiguration": {
      "$ref": "#/$defs/DraftUpdateAgentRedirectConfiguration",
      "description": "The configuration of the redirects for the agent mode."
    },
    "AgreementConfiguration": {
      "$ref": "#/$defs/DraftUpdateAgreementConfiguration",
      "description": "The configuration of the agreement.\nRequires that the organization allows custom agreement settings."
    },
    "RedirectConfiguration": {
      "$ref": "#/$defs/DraftUpdateRedirectConfiguration",
      "description": "The configuration of the draft redirect URLs."
    },
    "DefaultSignatureTypeConfiguration": {
      "$ref": "#/$defs/DraftUpdateDefaultSignatureTypeConfiguration",
      "description": "A default signature type to be used only for the draft that overwrites the default signature type of the organization."
    }
  },
  "$defs": {
    "DraftUpdateActionCallbackSelection": {
      "description": "The selection of events which trigger the callback.",
      "type": "object",
      "properties": {
        "ConfirmTransactionCode": {
          "description": "If true, the callback is triggered when a transaction code was sent. This is only used for legacy disposable certificates, after user accepted issuance of disposable certificate.",
          "type": "boolean"
        },
        "AgreementAccepted": {
          "description": "If true, the callback is triggered when the user accepted the agreement.",
          "type": "boolean"
        },
        "AgreementRejected": {
          "description": "If true, the callback is triggered when the user rejected the agreement.",
          "type": "boolean"
        },
        "PrepareAuthenticationSuccess": {
          "description": "If true, the callback is triggered when the preparation of the authentication process succeeded.",
          "type": "boolean"
        },
        "AuthenticationFailed": {
          "description": "If true, the callback is triggered when the user failed to authenticate.",
          "type": "boolean"
        },
        "AuthenticationSuccess": {
          "description": "If true, the callback is triggered when the user succeeded to authenticate.",
          "type": "boolean"
        },
        "AuditTrailRequested": {
          "description": "If true, the callback is triggered when the audit trail was requested.",
          "type": "boolean"
        },
        "AuditTrailXmlRequested": {
          "description": "If true, the callback is triggered when the audit trail XML was requested.",
          "type": "boolean"
        },
        "CalledPage": {
          "description": "If true, the callback is triggered when the SignAnyWhere Viewer was requested.",
          "type": "boolean"
        },
        "DocumentDownloaded": {
          "description": "If true, the callback is triggered when the document download was requested.",
          "type": "boolean"
        },
        "FlattenedDocumentDownloaded": {
          "description": "If true, the callback is triggered when the flattened document download was requested.",
          "type": "boolean"
        },
        "AddedAnnotation": {
          "description": "If true, the callback is triggered when an annotation was added.",
          "type": "boolean"
        },
        "AddedAttachment": {
          "description": "If true, the callback is triggered when an attachment was added.",
          "type": "boolean"
        },
        "AppendedDocument": {
          "description": "If true, the callback is triggered when a document was appended.",
          "type": "boolean"
        },
        "FormsFilled": {
          "description": "If true, the callback is triggered when a form field was filled.",
          "type": "boolean"
        },
        "ConfirmReading": {
          "description": "If true, the callback is triggered when a reading task was completed.",
          "type": "boolean"
        },
        "SendTransactionCode": {
          "description": "If true, the callback is triggered when a transaction code for a signature with type TransactionCode was sent using the TransactionCodeSenderPlugin.",
          "type": "boolean"
        },
        "PrepareSignWorkstepDocument": {
          "description": "If true, the callback is triggered when a signature was prepared for signing.",
          "type": "boolean"
        },
        "SignWorkstepDocument": {
          "description": "If true, the callback is triggered when a signature was applied.",
          "type": "boolean"
        },
        "UndoAction": {
          "description": "If true, the callback is triggered when an action was undone.",
          "type": "boolean"
        },
        "WorkstepCreated": {
          "description": "If true, the callback is triggered when a workstep was created.",
          "type": "boolean"
        },
        "WorkstepFinished": {
          "description": "If true, the callback is triggered when a workstep was finished.",
          "type": "boolean"
        },
        "WorkstepRejected": {
          "description": "If true, the callback is triggered when a workstep was rejected.",
          "type": "boolean"
        },
        "DisablePolicyAndValidityChecks": {
          "description": "If true, the callback is triggered when policy and validity checks were disabled.",
          "type": "boolean"
        },
        "EnablePolicyAndValidityChecks": {
          "description": "If true, the callback is triggered when policy and validity checks were enabled.",
          "type": "boolean"
        },
        "AppendFileToWorkstep": {
          "description": "If true, the callback is triggered when a file was appended to the workstep.",
          "type": "boolean"
        },
        "AppendTasksToWorkstep": {
          "description": "If true, the callback is triggered when a task was added to the workstep.",
          "type": "boolean"
        },
        "SetOptionalDocumentState": {
          "description": "If true, the callback is triggered when an optional document became either active or inactive.",
          "type": "boolean"
        },
        "PreparePayloadForBatch": {
          "description": "If true, the callback is triggered when the payload was prepared for batch signing.",
          "type": "boolean"
        }
      }
    },
    "DraftUpdateActivityActionCallbackConfiguration": {
      "description": "The configuration of the callback for workstep events.",
      "required": [
        "Url"
      ],
      "type": "object",
      "properties": {
        "Url": {
          "description": "The callback URL triggered for the selected events.",
          "maxLength": 8000,
          "minLength": 0,
          "type": "string"
        },
        "ActionCallbackSelection": {
          "$ref": "#/$defs/DraftUpdateActionCallbackSelection",
          "description": "The selection of events which trigger the callback."
        }
      }
    },
    "DraftUpdateAgentRedirectConfiguration": {
      "description": "The configuration of the redirects for the agent mode.",
      "type": "object",
      "properties": {
        "Policy": {
          "description": "Defines the redirect target page which should be opened when the agent mode is active. \nMust not be set, when 'Allow' is not set to true.",
          "enum": [
            "Workflow",
            "FormEditor",
            "Summary"
          ],
          "type": "string"
        },
        "Allow": {
          "description": "If true, the agent mode can be used. \nIf false, both 'Policy'and 'IFrameAllowList' must not be set.",
          "type": "boolean"
        },
        "IFrameAllowList": {
          "description": "The URLs where the designer interface of eSignAnyWhere may be embedded.\nMust not be set, when 'Allow' is not set to true.",
          "maxItems": 50,
          "type": "array",
          "items": {
            "maxLength": 8000,
            "type": "string"
          }
        }
      }
    },
    "DraftUpdateAgreementConfiguration": {
      "description": "The configuration of the agreement.",
      "type": "object",
      "properties": {
        "Translations": {
          "description": "The agreement and its translations to be used.\nIf no custom agreement is specified, the default organization agreement will be used.",
          "maxItems": 228,
          "type": "array",
          "items": {
            "$ref": "#/$defs/DraftUpdateAgreementTranslation"
          }
        }
      }
    },
    "DraftUpdateAgreementTranslation": {
      "description": "A translation for the agreement.",
      "required": [
        "LanguageCode",
        "Text"
      ],
      "type": "object",
      "properties": {
        "LanguageCode": {
          "description": "The language of the translated agreement.",
          "enum": [
            "AF",
            "AF_ZA",
            "AR",
            "AR_AE",
            "AR_BH",
            "AR_DZ",
            "AR_EG",
            "AR_IQ",
            "AR_JO",
            "AR_KW",
            "AR_LB",
            "AR_LY",
            "AR_MA",
            "AR_OM",
            "AR_QA",
            "AR_SA",
            "AR_SY",
            "AR_TN",
            "AR_YE",
            "AZ",
            "BE",
            "BE_BY",
            "BG",
            "BG_BG",
            "CA",
            "CA_ES",
            "CS",
            "CS_CZ",
            "CY",
            "CY_GB",
            "DA",
            "DA_DK",
            "DE",
            "DE_AT",
            "DE_CH",
            "DE_DE",
            "DE_LI",
            "DE_LU",
            "DV",
            "DV_MV",
            "EL",
            "EL_GR",
            "EN",
            "EN_AU",
            "EN_BZ",
            "EN_CA",
            "EN_GB",
            "EN_IE",
            "EN_JM",
            "EN_NZ",
            "EN_PH",
            "EN_TT",
            "EN_US",
            "EN_ZA",
            "EN_ZW",
            "ES",
            "ES_AR",
            "ES_BO",
            "ES_CL",
            "ES_CO",
            "ES_CR",
            "ES_DO",
            "ES_EC",
            "ES_ES",
            "ES_GT",
            "ES_HN",
            "ES_MX",
            "ES_NI",
            "ES_PA",
            "ES_PE",
            "ES_PR",
            "ES_PY",
            "ES_SV",
            "ES_UY",
            "ES_VE",
            "ET",
            "ET_EE",
            "EU",
            "EU_ES",
            "FA",
            "FA_IR",
            "FI",
            "FI_FI",
            "FO",
            "FO_FO",
            "FR",
            "FR_BE",
            "FR_CA",
            "FR_CH",
            "FR_FR",
            "FR_LU",
            "FR_MC",
            "GL",
            "GL_ES",
            "GU",
            "GU_IN",
            "HE",
            "HE_IL",
            "HI",
            "HI_IN",
            "HR",
            "HR_BA",
            "HR_HR",
            "HU",
            "HU_HU",
            "HY",
            "HY_AM",
            "ID",
            "ID_ID",
            "IS",
            "IS_IS",
            "IT",
            "IT_CH",
            "IT_IT",
            "JA",
            "JA_JP",
            "KA",
            "KA_GE",
            "KK",
            "KK_KZ",
            "KN",
            "KN_IN",
            "KO",
            "KO_KR",
            "KOK",
            "KOK_IN",
            "KY",
            "KY_KG",
            "LT",
            "LT_LT",
            "LV",
            "LV_LV",
            "MI",
            "MI_NZ",
            "MK",
            "MK_MK",
            "MN",
            "MN_MN",
            "MR",
            "MR_IN",
            "MS",
            "MS_BN",
            "MS_MY",
            "MT",
            "MT_MT",
            "NB",
            "NB_NO",
            "NL",
            "NL_BE",
            "NL_NL",
            "NN_NO",
            "PA",
            "PA_IN",
            "PL",
            "PL_PL",
            "PS",
            "PT",
            "PT_BR",
            "PT_PT",
            "RO",
            "RO_RO",
            "RU",
            "RU_RU",
            "SA",
            "SA_IN",
            "SE",
            "SE_FI",
            "SE_NO",
            "SE_SE",
            "SK",
            "SK_SK",
            "SL",
            "SL_SI",
            "SQ",
            "SQ_AL",
            "SV",
            "SV_FI",
            "SV_SE",
            "SW",
            "SW_KE",
            "SYR",
            "SYR_SY",
            "TA",
            "TA_IN",
            "TE",
            "TE_IN",
            "TH",
            "TH_TH",
            "TN",
            "TN_ZA",
            "TR",
            "TR_TR",
            "TT",
            "TT_RU",
            "TS",
            "UK",
            "UK_UA",
            "UR",
            "UR_PK",
            "UZ",
            "VI",
            "VI_VN",
            "XH",
            "XH_ZA",
            "ZH",
            "ZH_CN",
            "ZH_HK",
            "ZH_MO",
            "ZH_SG",
            "ZH_TW",
            "ZU",
            "ZU_ZA",
            "AM",
            "AM_ET",
            "ARN",
            "ARN_CL",
            "AS",
            "AS_IN",
            "AZ_CYRL",
            "AZ_CYRL_AZ",
            "AZ_LATN",
            "AZ_LATN_AZ",
            "BA",
            "BA_RU",
            "BN",
            "BN_BD",
            "BN_IN",
            "BO",
            "BO_CN",
            "BR",
            "BR_FR",
            "BS",
            "BS_CYRL",
            "BS_CYRL_BA",
            "BS_LATN",
            "BS_LATN_BA",
            "CA_ES_VALENCIA",
            "CHR",
            "CHR_CHER",
            "CHR_CHER_US",
            "CO",
            "CO_FR",
            "DSB",
            "DSB_DE",
            "EN_029",
            "EN_HK",
            "EN_IN",
            "EN_MY",
            "EN_SG",
            "ES_419",
            "ES_US",
            "FF",
            "FF_LATN",
            "FF_LATN_SN",
            "FIL",
            "FIL_PH",
            "FR_CD",
            "FR_CI",
            "FR_CM",
            "FR_HT",
            "FR_MA",
            "FR_ML",
            "FR_RE",
            "FR_SN",
            "FY",
            "FY_NL",
            "GA",
            "GA_IE",
            "GD",
            "GD_GB",
            "GN",
            "GN_PY",
            "GSW",
            "GSW_FR",
            "HA",
            "HA_LATN",
            "HA_LATN_NG",
            "HAW",
            "HAW_US",
            "HSB",
            "HSB_DE",
            "IG",
            "IG_NG",
            "II",
            "II_CN",
            "IU",
            "IU_CANS",
            "IU_CANS_CA",
            "IU_LATN",
            "IU_LATN_CA",
            "JV",
            "JV_LATN",
            "JV_LATN_ID",
            "KL",
            "KL_GL",
            "KM",
            "KM_KH",
            "KU",
            "KU_ARAB",
            "KU_ARAB_IQ",
            "LB",
            "LB_LU",
            "LO",
            "LO_LA",
            "MG",
            "MG_MG",
            "ML",
            "ML_IN",
            "MN_CYRL",
            "MN_MONG",
            "MN_MONG_CN",
            "MN_MONG_MN",
            "MOH",
            "MOH_CA",
            "MY",
            "MY_MM",
            "NE",
            "NE_IN",
            "NE_NP",
            "NN",
            "NO",
            "NQO",
            "NQO_GN",
            "NSO",
            "NSO_ZA",
            "OC",
            "OC_FR",
            "OM",
            "OM_ET",
            "OR",
            "OR_IN",
            "PA_ARAB",
            "PA_ARAB_PK",
            "PRS",
            "PRS_AF",
            "PS_AF",
            "PT_AO",
            "QUT",
            "QUT_GT",
            "QUZ",
            "QUZ_BO",
            "QUZ_EC",
            "QUZ_PE",
            "RM",
            "RM_CH",
            "RO_MD",
            "RW",
            "RW_RW",
            "SAH",
            "SAH_RU",
            "SD",
            "SD_ARAB",
            "SD_ARAB_PK",
            "SI",
            "SI_LK",
            "SMA",
            "SMA_NO",
            "SMA_SE",
            "SMJ",
            "SMJ_NO",
            "SMJ_SE",
            "SMN",
            "SMN_FI",
            "SMS",
            "SMS_FI",
            "SN",
            "SN_LATN",
            "SN_LATN_ZW",
            "SO",
            "SO_SO",
            "SR",
            "SR_CYRL",
            "SR_CYRL_BA",
            "SR_CYRL_CS",
            "SR_CYRL_ME",
            "SR_CYRL_RS",
            "SR_LATN",
            "SR_LATN_BA",
            "SR_LATN_CS",
            "SR_LATN_ME",
            "SR_LATN_RS",
            "ST",
            "ST_ZA",
            "TA_LK",
            "TG",
            "TG_CYRL",
            "TG_CYRL_TJ",
            "TI",
            "TI_ER",
            "TI_ET",
            "TK",
            "TK_TM",
            "TN_BW",
            "TS_ZA",
            "TZM",
            "TZM_LATN",
            "TZM_LATN_DZ",
            "TZM_TFNG",
            "TZM_TFNG_MA",
            "UG",
            "UG_CN",
            "UR_IN",
            "UZ_CYRL",
            "UZ_CYRL_UZ",
            "UZ_LATN",
            "UZ_LATN_UZ",
            "WO",
            "WO_SN",
            "YO",
            "YO_NG",
            "ZGH",
            "ZGH_TFNG",
            "ZGH_TFNG_MA",
            "ZH_HANS",
            "ZH_HANT",
            "ZH_CHS",
            "ZH_CHT"
          ],
          "type": "string",
          "x-ms-enum": {
            "name": "LanguageCode",
            "modelAsString": false
          }
        },
        "Text": {
          "description": "The translated agreement.",
          "maxLength": 204800,
          "minLength": 0,
          "type": "string"
        },
        "Header": {
          "description": "The header for the translated agreement.",
          "maxLength": 1000,
          "minLength": 0,
          "type": "string"
        },
        "IsDefault": {
          "description": "If true, this translation is used as default.",
          "type": "boolean"
        }
      }
    },
    "DraftUpdateCallbackConfiguration": {
      "description": "The configuration of the callbacks for a custom integration.",
      "type": "object",
      "properties": {
        "CallbackUrl": {
          "description": "The callback URL triggered when the envelope has been finished.",
          "maxLength": 8000,
          "minLength": 0,
          "type": "string"
        },
        "StatusUpdateCallbackUrl": {
          "description": "The callback URL triggered for status updates of an envelope.",
          "maxLength": 8000,
          "minLength": 0,
          "type": "string"
        },
        "AfterSendCallbackUrl": {
          "description": "The callback URL triggered after sending the draft.",
          "maxLength": 8000,
          "minLength": 0,
          "type": "string"
        },
        "ActivityActionCallbackConfiguration": {
          "$ref": "#/$defs/DraftUpdateActivityActionCallbackConfiguration",
          "description": "The configuration of the callback for workstep events."
        }
      }
    },
    "DraftUpdateDefaultSignature": {
      "description": "The configuration of the default signature type for a draft.",
      "type": "object",
      "properties": {
        "IsDefault": {
          "description": "If true, this signature type is used for newly added signature fields as default.\nOnly one signature type can be set as default.",
          "type": "boolean"
        }
      }
    },
    "DraftUpdateDefaultSignatureTypeConfiguration": {
      "description": "The configuration of the default signature type for the draft.",
      "type": "object",
      "properties": {
        "None": {
          "$ref": "#/$defs/DraftUpdateDefaultSignature",
          "description": "\"None\" SignatureType."
        },
        "ClickToSign": {
          "$ref": "#/$defs/DraftUpdateDefaultSignature",
          "description": "\"click to sign\" SignatureType."
        },
        "DrawToSign": {
          "$ref": "#/$defs/DraftUpdateDefaultSignature",
          "description": "\"draw to sign\" SignatureType."
        },
        "TypeToSign": {
          "$ref": "#/$defs/DraftUpdateDefaultSignature",
          "description": "\"type to sign\" SignatureType."
        },
        "LocalCertificate": {
          "$ref": "#/$defs/DraftUpdateDefaultSignature",
          "description": "\"local certificate\" SignatureType."
        },
        "DisposableCertificate": {
          "$ref": "#/$defs/DraftUpdateDefaultSignature",
          "description": "\"disposable certificate\" SignatureType."
        },
        "Biometric": {
          "$ref": "#/$defs/DraftUpdateDefaultSignature",
          "description": "\"biometric signature\" SignatureType."
        },
        "RemoteCertificate": {
          "$ref": "#/$defs/DraftUpdateDefaultSignature",
          "description": "\"remote certificate\" SignatureType."
        },
        "OneTimePassword": {
          "$ref": "#/$defs/DraftUpdateDefaultSignature",
          "description": "\"one time password (SMS-OTP)\" SignatureType."
        }
      }
    },
    "DraftUpdateEmailConfiguration": {
      "description": "The configuration for notifications.",
      "type": "object",
      "properties": {
        "Subject": {
          "description": "The subject of the sign notifications.",
          "maxLength": 300,
          "minLength": 0,
          "type": "string"
        },
        "Message": {
          "description": "The message of the sign notifications.",
          "maxLength": 204800,
          "minLength": 0,
          "type": "string"
        },
        "SenderDisplayName": {
          "description": "The displayed name of the sender in the notifications.",
          "maxLength": 200,
          "minLength": 0,
          "type": "string"
        }
      }
    },
    "DraftUpdateExpirationConfiguration": {
      "description": "The configuration of the expiration for the envelope.",
      "type": "object",
      "properties": {
        "ExpirationInSecondsAfterSending": {
          "description": "The relative expiration in seconds after sending the envelope.\nMust be a positive number between 600 and the maximum envelope validity located in the system configuration [Configuration key: maxEnvelopeValidityInDays, Default: 2419200 seconds (28 days)].\nMust not be defined when property <code>ExpirationDate</code> is specified.",
          "type": "integer"
        },
        "ExpirationDate": {
          "format": "date-time",
          "description": "The absolute expiration date of the envelope.\nMust not be in the past.\nMust not be defined when property <code>ExpirationInSecondsAfterSending</code> is specified.\nA datetime in the format RFC 3339, section 5.6, 'date-Time' (e.g. 2017-07-21T17:32:28Z).",
          "maxLength": 30,
          "minLength": 20,
          "type": "string"
        }
      }
    },
    "DraftUpdateRedirectConfiguration": {
      "description": "The configuration of the draft redirect URLs.",
      "type": "object",
      "properties": {
        "AfterSendRedirectUrl": {
          "description": "The URL to redirect to after the envelope was sent successfully.\nThis is only applicable when using the eSAW UI.",
          "maxLength": 8000,
          "minLength": 0,
          "type": "string"
        },
        "BeforeSendRedirectUrl": {
          "description": "The URL to redirect to before the envelope is sent.\nThis is only applicable when using the eSAW UI.",
          "maxLength": 8000,
          "minLength": 0,
          "type": "string"
        }
      }
    },
    "DraftUpdateReminderConfiguration": {
      "description": "The configuration for reminders.",
      "type": "object",
      "properties": {
        "Enabled": {
          "description": "If true, reminders are sent.",
          "type": "boolean"
        },
        "FirstReminderInDays": {
          "description": "The amount of days until a reminder is sent to a signer or a viewer after the initial notification.",
          "type": "integer"
        },
        "ReminderResendIntervalInDays": {
          "description": "The amount of days until a reminder is sent again to a signer or a viewer.",
          "type": "integer"
        },
        "BeforeExpirationInDays": {
          "description": "The amount of days before the envelope expires and a reminder should be sent.",
          "type": "integer"
        }
      }
    },
    "DraftUpdateSealingConfiguration": {
      "description": "Update Sealing configuration.",
      "type": "object",
      "properties": {
        "CertificateId": {
          "description": "Update the referenced Sealing Certificate identifier.",
          "maxLength": 36,
          "minLength": 0,
          "type": "string"
        }
      }
    }
  }
}