Skip to Content

Send a document for signature

Pick recipients, give each one their fields, prefill what you know and send. Includes the rules for official agency forms.

Sending turns a draft document into an envelope and emails the first recipients a signing link. You need a key with the send scope, and a document with its fields detected. See Upload, detect and fill.

Send it

curl -X POST https://appliflo.com/api/v1/documents/$DOCUMENT_ID/send \
  -H "Authorization: Bearer $APPLIFLO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: send-lease-7731" \
  -d '{
    "subject": "Please sign your lease application",
    "message": "Hi Lan, please check the details and sign.",
    "routing": "sequential",
    "recipients": [
      { "name": "Lan Nguyen", "email": "lan@example.com", "role": "signer" },
      { "name": "Sam Patel", "email": "sam@example.com", "role": "signer" },
      { "name": "Office", "email": "office@example.com", "role": "cc" }
    ],
    "assignments": [
      { "fieldId": "fld_tenant_signature", "recipientIndex": 0 },
      { "fieldId": "fld_agent_signature", "recipientIndex": 1 }
    ],
    "values": { "fld_property_address": "12 Rose St, Parramatta NSW 2150" }
  }'

The reply is 201 with data.envelopeId, data.invited (people emailed now) and data.prefilled. Keep the envelope id to track it.

What each part does

KeyWhat it does
routingparallel emails everyone at once. sequential emails one recipient at a time, in list order.
recipients[].rolesigner fills their fields and signs. filler fills their fields without signing. cc gets the finished copy and can never have fields. At least one signer is needed.
recipients[].accessCodeemail (the default) emails each signer and filler a one-time code to enter before signing. none turns it off for that person.
assignmentsGives a field to a recipient, by field id and the recipient's place in recipients (0 is the first).
valuesWhat you know already, by field id, or by group id for a choice question. Signature fields and fields you give to a recipient can't be prefilled.
reminderCadenceAutomatic reminders. By default they are on, every 24 hours. You can only make them less frequent.

Official agency forms

AppliFlo knows the official government forms it hosts, and some agencies do not accept an electronic signature on them.

  • Fill and print only. Some forms must be signed by hand: USCIS forms such as I-130, I-485, I-765, I-864, I-864A, I-134 and G-28, SSA SS-5, IRS 8879 and 4506-C, and the Commonwealth statutory declaration. Any send of these is refused with 422 esign_not_allowed, whatever else you send. Fill the form, download the filled PDF, and have it printed and signed by hand.
  • Acknowledge first. For a form whose agency may reject an electronic signature, the send needs "esignRiskAcknowledged": true, or it is refused with 422 esign_ack_required. Only set it after your user has agreed. AppliFlo records the acknowledgement on the envelope. No form needs this today, but handle the code so your integration keeps working if one is added.

Sending a template uses esign_risk_acknowledged for the same thing. See Send a saved template.

Common refusals

StatusCode or messageFix
422a field given to a ccGive it to a signer or filler.
422esign_not_allowedDownload the filled PDF instead of sending.
422esign_ack_requiredAsk your user, then send esignRiskAcknowledged: true.
403insufficient_scopeThe key needs the send scope.
409request already in progressThe same Idempotency-Key is still running. Wait and retry.

On this page