Skip to Content

send_envelope

Create an envelope for document_id, set recipients + field assignments, and send the initial signing invitations.

destructivewaits for confirmSends, cancels or emails people. Clients ask you before running it.

What it does

Create an envelope for document_id, set recipients + field assignments, and send the initial signing invitations. Every envelope needs at least one 'signer' recipient; 'filler' recipients fill assigned fields without signing; 'cc' recipients only receive the completed copy and can NEVER be assigned a field — an assignment targeting a cc recipient is rejected (this is enforced server-side, not just client-side). Returns the new envelope_id for use with get_envelope/remind_envelope/void_envelope/download_document. Each signer/filler is emailed a one-time code to enter before signing unless that recipient has access_code "none". A recipient with delivery "embedded" is never emailed (no invite, reminders or code): your app signs them in its own page with POST /api/v1/embed/signing-sessions (Business plan or a sandbox). Optional values pre-fill what the sender knows: field_id -> text, or group_id -> option (single) / [options] (multi) for a choice question from list_fields. Signing fields, and any field or question this request assigns to a recipient, are refused (422) — the recipient fills those. subject, routing and recipients are required, unless use_prepare_draft: true sends what the Prepare tools (or the web Prepare page) saved for the document instead. Two steps: called WITHOUT confirm: true it does nothing and returns an error saying what it would do (the details are in structuredContent); show that to the user and, once they agree, call again with the same arguments and confirm: true. Some hosted government forms (e.g. USCIS I-130, SSA SS-5, IRS 8879) are fill-and-print only: any send of them is refused (422 esign_not_allowed); download the filled PDF instead. A form whose agency may reject an e-signature needs esign_risk_acknowledged: true (422 esign_ack_required without it). Masked values (•••123) can't be sent back: ask the person for the full number.

Two calls

Called without confirm: true, it does nothing and returns an error that says what would happen. Show that to the user, then call again with the same inputs and confirm: true.

Inputs

NameTypeDescription
document_idrequiredstring
use_prepare_draftbooleantrue: send the document's saved Prepare state (set_envelope_recipients, ai_assign, set_box_owner, skip_box, set_fixed_value, or the web Prepare page) instead of recipients/assignments/values, which are then refused. subject and message stay optional overrides.One of: true
prepare_draft_versionintegerWith use_prepare_draft and confirm: true, required: the prepare_draft_version the unconfirmed call showed. A draft changed since is refused (409 draft_changed).At least 1
assign_run_idstringWith use_prepare_draft: ai_assign's run_id, so the send teaches AI assign.Up to 64 characters
assign_appliedstring[]With assign_run_id: ai_assign's applied box ids.Up to 2000 items
local_daystringWith use_prepare_draft: the sender's own day (YYYY-MM-DD), for a Fixed date such as the day it is sent.
confirmbooleantrue to really do it. Without it nothing happens: you get an error describing what would happen, to show the user.
idempotency_keystringSame key = same call: a retry (e.g. after a timeout) returns the first result instead of doing it again. The same key with other arguments is refused (422 idempotency_key_reused).Up to 255 characters
esign_risk_acknowledgedbooleanThe sender acknowledges the agency may reject an electronic signature on this form (warn-mode forms only).
subjectstringUp to 998 characters
messagestringUp to 4096 characters
routingstringOne of: parallel, sequential
recipientsobject[]1 to 50 items
namerequiredstringUp to 256 characters
emailrequiredstringFormat: email · Up to 254 characters
rolerequiredstringOne of: signer, filler, cc
access_codestringIdentity check before signing. Default "email": the person is emailed a one-time code to enter after opening their link. "none" switches it off. Ignored for cc.One of: email, none
deliverystringHow their signing link reaches them. Default "email": invited, reminded (and sent any access code) by email. "embedded": never emailed (no invite, no reminders, no code); your app signs them in its own page with POST /api/v1/embed/signing-sessions when their turn comes. Needs the Business plan or a sandbox workspace (else 402 plan_feature). Never a cc (422 cc_not_embeddable).One of: email, embedded
assignmentsobject[]Up to 500 items
fieldIdrequiredstring
recipientIndexrequiredintegerAt least 0
valuesmap of string | string[] | objectfield_id -> text; group_id -> option (single) or [options] (multi), or { chosen?, other } for a question answered with its Other box.

Call it

Your MCP client builds this request for you. This is what it sends to https://appliflo.com/api/mcp, with the required inputs filled with placeholders.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "send_envelope",
    "arguments": {
      "document_id": "<document_id>"
    }
  }
}

Input schema

The JSON Schema the server lists for this tool in tools/list.

{
  "type": "object",
  "properties": {
    "document_id": {
      "type": "string"
    },
    "use_prepare_draft": {
      "type": "boolean",
      "enum": [
        true
      ],
      "description": "true: send the document's saved Prepare state (set_envelope_recipients, ai_assign, set_box_owner, skip_box, set_fixed_value, or the web Prepare page) instead of recipients/assignments/values, which are then refused. subject and message stay optional overrides."
    },
    "prepare_draft_version": {
      "type": "integer",
      "minimum": 1,
      "description": "With use_prepare_draft and confirm: true, required: the prepare_draft_version the unconfirmed call showed. A draft changed since is refused (409 draft_changed)."
    },
    "assign_run_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "With use_prepare_draft: ai_assign's run_id, so the send teaches AI assign."
    },
    "assign_applied": {
      "type": "array",
      "maxItems": 2000,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      },
      "description": "With assign_run_id: ai_assign's applied box ids."
    },
    "local_day": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "With use_prepare_draft: the sender's own day (YYYY-MM-DD), for a Fixed date such as the day it is sent."
    },
    "confirm": {
      "type": "boolean",
      "description": "true to really do it. Without it nothing happens: you get an error describing what would happen, to show the user."
    },
    "idempotency_key": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "description": "Same key = same call: a retry (e.g. after a timeout) returns the first result instead of doing it again. The same key with other arguments is refused (422 idempotency_key_reused)."
    },
    "esign_risk_acknowledged": {
      "type": "boolean",
      "description": "The sender acknowledges the agency may reject an electronic signature on this form (warn-mode forms only)."
    },
    "subject": {
      "type": "string",
      "minLength": 1,
      "maxLength": 998
    },
    "message": {
      "type": "string",
      "maxLength": 4096
    },
    "routing": {
      "type": "string",
      "enum": [
        "parallel",
        "sequential"
      ]
    },
    "recipients": {
      "type": "array",
      "minItems": 1,
      "maxItems": 50,
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "role": {
            "type": "string",
            "enum": [
              "signer",
              "filler",
              "cc"
            ]
          },
          "access_code": {
            "type": "string",
            "enum": [
              "email",
              "none"
            ],
            "description": "Identity check before signing. Default \"email\": the person is emailed a one-time code to enter after opening their link. \"none\" switches it off. Ignored for cc."
          },
          "delivery": {
            "type": "string",
            "enum": [
              "email",
              "embedded"
            ],
            "description": "How their signing link reaches them. Default \"email\": invited, reminded (and sent any access code) by email. \"embedded\": never emailed (no invite, no reminders, no code); your app signs them in its own page with POST /api/v1/embed/signing-sessions when their turn comes. Needs the Business plan or a sandbox workspace (else 402 plan_feature). Never a cc (422 cc_not_embeddable)."
          }
        },
        "required": [
          "name",
          "email",
          "role"
        ]
      }
    },
    "assignments": {
      "type": "array",
      "maxItems": 500,
      "items": {
        "type": "object",
        "properties": {
          "fieldId": {
            "type": "string"
          },
          "recipientIndex": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "fieldId",
          "recipientIndex"
        ]
      }
    },
    "values": {
      "type": "object",
      "description": "field_id -> text; group_id -> option (single) or [options] (multi), or { chosen?, other } for a question answered with its Other box.",
      "additionalProperties": {
        "oneOf": [
          {
            "type": "string",
            "maxLength": 4000
          },
          {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 512
            },
            "maxItems": 50
          },
          {
            "type": "object",
            "properties": {
              "chosen": {
                "oneOf": [
                  {
                    "type": "string",
                    "maxLength": 512
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 512
                    },
                    "maxItems": 50
                  }
                ]
              },
              "other": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The text for the question's Other box."
              }
            },
            "additionalProperties": false
          }
        ]
      }
    }
  },
  "required": [
    "document_id"
  ]
}

On this page