{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lexifina/json-schema/lexifina-signature-request-schema.json",
  "title": "SignatureRequest",
  "description": "A signature request.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lexifina-openapi.json#/components/schemas/SignatureRequest",
  "properties": {
    "id": {
      "title": "Id",
      "type": "string"
    },
    "object": {
      "const": "signature_request",
      "default": "signature_request",
      "title": "Object",
      "type": "string"
    },
    "engine": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Engine"
    },
    "engine_version": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Engine Version"
    },
    "owner": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Owner"
    },
    "org_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Org Id"
    },
    "status": {
      "description": "draft, pending, signed, cancelled or expired.",
      "title": "Status",
      "type": "string"
    },
    "title": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Title"
    },
    "message": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Message"
    },
    "client_matter_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Client Matter Id"
    },
    "matter_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Matter Name"
    },
    "document_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Document Id"
    },
    "document_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Document Name"
    },
    "document_count": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Document Count"
    },
    "signing_order": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "parallel or sequential.",
      "title": "Signing Order"
    },
    "verify": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "link or email_code.",
      "title": "Verify"
    },
    "expires_in_days": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Expires In Days"
    },
    "reminder_every_days": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Reminder Every Days"
    },
    "draft_revision": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Draft Revision"
    },
    "signers": {
      "default": [],
      "items": {
        "$ref": "#/$defs/Signer"
      },
      "title": "Signers",
      "type": "array"
    },
    "documents": {
      "default": [],
      "items": {
        "$ref": "#/$defs/SignatureRequestDocument"
      },
      "title": "Documents",
      "type": "array"
    },
    "fields": {
      "default": [],
      "items": {
        "$ref": "#/$defs/SignatureRequestField"
      },
      "title": "Fields",
      "type": "array"
    },
    "suggested_signers": {
      "default": [],
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "title": "Suggested Signers",
      "type": "array"
    },
    "detection": {
      "additionalProperties": true,
      "default": {},
      "title": "Detection",
      "type": "object"
    },
    "firm": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Firm"
    },
    "events": {
      "default": [],
      "items": {
        "$ref": "#/$defs/SignatureRequestEvent"
      },
      "title": "Events",
      "type": "array"
    },
    "events_count": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Events Count"
    },
    "events_verified": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Events Verified"
    },
    "created_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Created At"
    },
    "updated_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Updated At"
    },
    "sent_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Sent At"
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Expires At"
    },
    "next_reminder_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Next Reminder At"
    },
    "reminders_paused_reason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Reminders Paused Reason"
    },
    "completed_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Completed At"
    },
    "cancelled_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Cancelled At"
    },
    "void_reason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Void Reason"
    },
    "declined": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Declined"
    },
    "stopped_reason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Stopped Reason"
    },
    "completion": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Signed copy: rendering, ready or failed.",
      "title": "Completion"
    },
    "retired": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Retired"
    },
    "open_matter_checks": {
      "default": [],
      "description": "On send: matter checks still open (warnings only).",
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "title": "Open Matter Checks",
      "type": "array"
    },
    "open_document_issues": {
      "default": [],
      "items": {
        "type": "string"
      },
      "title": "Open Document Issues",
      "type": "array"
    },
    "reminded": {
      "default": [],
      "description": "On remind: the signers reminded.",
      "items": {
        "type": "string"
      },
      "title": "Reminded",
      "type": "array"
    },
    "external_reference": {
      "anyOf": [
        {
          "$ref": "#/$defs/ExternalReferenceValue"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "id",
    "object",
    "engine",
    "engine_version",
    "owner",
    "org_id",
    "status",
    "title",
    "message",
    "client_matter_id",
    "matter_name",
    "document_id",
    "document_name",
    "document_count",
    "signing_order",
    "verify",
    "expires_in_days",
    "reminder_every_days",
    "draft_revision",
    "signers",
    "documents",
    "fields",
    "suggested_signers",
    "detection",
    "firm",
    "events",
    "events_count",
    "events_verified",
    "created_at",
    "updated_at",
    "sent_at",
    "expires_at",
    "next_reminder_at",
    "reminders_paused_reason",
    "completed_at",
    "cancelled_at",
    "void_reason",
    "declined",
    "stopped_reason",
    "completion",
    "retired",
    "open_matter_checks",
    "open_document_issues",
    "reminded",
    "external_reference"
  ],
  "type": "object",
  "$defs": {
    "ExternalReferenceValue": {
      "properties": {
        "external_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "External Id"
        },
        "metadata": {
          "additionalProperties": {
            "type": "string"
          },
          "default": {},
          "title": "Metadata",
          "type": "object"
        }
      },
      "title": "ExternalReferenceValue",
      "type": "object",
      "required": [
        "external_id",
        "metadata"
      ]
    },
    "SignatureRequestDocument": {
      "properties": {
        "key": {
          "title": "Key",
          "type": "string"
        },
        "document_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Document Id"
        },
        "document_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Document Name"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "order": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Order"
        },
        "version": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Version"
        },
        "content_revision": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Content Revision"
        },
        "content_fingerprint": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Content Fingerprint"
        },
        "snapshot_sha256": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Snapshot Sha256"
        },
        "block_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Block Count"
        },
        "status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Status"
        },
        "signed": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Signed"
        },
        "readiness": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Readiness"
        },
        "signoff": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Signoff"
        }
      },
      "required": [
        "key",
        "document_id",
        "document_name",
        "name",
        "order",
        "version",
        "content_revision",
        "content_fingerprint",
        "snapshot_sha256",
        "block_count",
        "status",
        "signed",
        "readiness",
        "signoff"
      ],
      "title": "SignatureRequestDocument",
      "type": "object"
    },
    "SignatureRequestEvent": {
      "properties": {
        "seq": {
          "title": "Seq",
          "type": "integer"
        },
        "at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "At"
        },
        "type": {
          "title": "Type",
          "type": "string"
        },
        "summary": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Summary"
        },
        "actor": {
          "additionalProperties": true,
          "default": {},
          "title": "Actor",
          "type": "object"
        },
        "ip": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Ip"
        },
        "detail": {
          "additionalProperties": true,
          "default": {},
          "title": "Detail",
          "type": "object"
        },
        "hash": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Chains each event to the one before; events_verified reports the chain intact.",
          "title": "Hash"
        }
      },
      "required": [
        "seq",
        "at",
        "type",
        "summary",
        "actor",
        "ip",
        "detail",
        "hash"
      ],
      "title": "SignatureRequestEvent",
      "type": "object"
    },
    "SignatureRequestField": {
      "properties": {
        "id": {
          "title": "Id",
          "type": "string"
        },
        "signer_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Signer Id"
        },
        "document_key": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Document Key"
        },
        "kind": {
          "description": "signature, initials, name, date_signed, text, title or checkbox.",
          "title": "Kind",
          "type": "string"
        },
        "required": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Required"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Label"
        },
        "placement": {
          "additionalProperties": true,
          "default": {},
          "title": "Placement",
          "type": "object"
        },
        "suggested": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Suggested"
        },
        "value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Value"
        },
        "filled_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Filled At"
        }
      },
      "required": [
        "id",
        "signer_id",
        "document_key",
        "kind",
        "required",
        "label",
        "placement",
        "suggested",
        "value",
        "filled_at"
      ],
      "title": "SignatureRequestField",
      "type": "object"
    },
    "Signer": {
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Email"
        },
        "company": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Company"
        },
        "role": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "signer or cc.",
          "title": "Role"
        },
        "order": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Order"
        },
        "deliver_in_portal": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Deliver In Portal"
        },
        "state": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "draft, sent, viewed, waiting_turn, signed, declined, stopped or copy.",
          "title": "State"
        },
        "has_signature": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Has Signature"
        },
        "signature_image": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Signature Image"
        },
        "sent_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Sent At"
        },
        "last_sent_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Last Sent At"
        },
        "viewed_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Viewed At"
        },
        "consented_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Consented At"
        },
        "identity_verified_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Identity Verified At"
        },
        "signed_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Signed At"
        },
        "declined_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Declined At"
        },
        "decline_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Decline Reason"
        }
      },
      "title": "Signer",
      "type": "object",
      "required": [
        "id",
        "name",
        "email",
        "company",
        "role",
        "order",
        "deliver_in_portal",
        "state",
        "has_signature",
        "signature_image",
        "sent_at",
        "last_sent_at",
        "viewed_at",
        "consented_at",
        "identity_verified_at",
        "signed_at",
        "declined_at",
        "decline_reason"
      ]
    }
  }
}