{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zsign-io/json-schema/zsign-io-draft-send-request-schema.json",
  "title": "DraftSendRequest",
  "description": "Body of POST /api/v1/documents/drafts/{id}/send.\n\nRecipients are optional when the agent already stored intended\nrecipients at draft-create time. Dashboard send uses\nDashboardDraftSendRequest, which requires recipients.\n`metadata` is re-validated through metadata_validator.",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zsign-io-openapi.yml#/components/schemas/DraftSendRequest",
  "properties": {
    "recipients": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/RecipientData"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Recipients"
    },
    "metadata": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Metadata"
    },
    "send_invite": {
      "type": "boolean",
      "title": "Send Invite",
      "default": true
    },
    "send_completion_email": {
      "type": "boolean",
      "title": "Send Completion Email",
      "default": true
    },
    "sequential": {
      "type": "boolean",
      "title": "Sequential",
      "description": "Whether recipients must sign in list order. Same flag as DocumentSendRequest.sequential. True (default) is one at a time; false is everyone at once.",
      "default": true
    },
    "prefill": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Prefill",
      "description": "Per-send text values keyed by field \"party:name\". Sets or overrides each text field's default_value for this send only. Unknown or non-text keys are a 422 invalid_prefill_key."
    }
  },
  "type": "object",
  "$defs": {
    "RecipientData": {
      "properties": {
        "email": {
          "type": "string",
          "format": "email",
          "title": "Email"
        },
        "name": {
          "type": "string",
          "maxLength": 255,
          "title": "Name"
        },
        "role": {
          "type": "string",
          "maxLength": 100,
          "title": "Role"
        },
        "signing_order": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Signing Order"
        }
      },
      "type": "object",
      "required": [
        "email",
        "name",
        "role"
      ],
      "title": "RecipientData"
    }
  }
}