Skip to main content
Formalingo

End-to-End Signing Flow

A complete walkthrough of the document signing workflow via the API.

End-to-End Signing Flow

This guide walks through the complete workflow from uploading a document to getting a signed PDF.

Step 1: Upload the document

curl -X POST https://formalingo.com/api/v1/documents \
  -H "Authorization: Bearer af_live_YOUR_KEY" \
  -F "file=@contract.pdf" \
  -F "title=Service Agreement"
# → { "data": { "id": "DOC_ID", ... } }

Step 2: Create signer roles

curl -X POST https://formalingo.com/api/v1/documents/DOC_ID/signer-roles \
  -H "Authorization: Bearer af_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "label": "Client" }'
# → { "data": { "role": "signer_1", ... } }

Step 3: Place fields on the document

curl -X POST https://formalingo.com/api/v1/documents/DOC_ID/fields \
  -H "Authorization: Bearer af_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "Client Signature",
    "type": "digital_signature",
    "pageNumber": 2,
    "x": 0.1, "y": 0.85,
    "width": 0.35, "height": 0.06,
    "assigneeRole": "signer_1",
    "isRequired": true
  }'

Step 4: Create a submission

curl -X POST https://formalingo.com/api/v1/documents/DOC_ID/submissions \
  -H "Authorization: Bearer af_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "signers": [{
      "role": "signer_1",
      "name": "Jane Smith",
      "email": "jane@client.com",
      "prefill": {
        "COMPANY_FIELD_ID": "Client Corp Ltd"
      }
    }]
  }'
# → { "data": { "signers": [{ "link": "https://formalingo.com/d/TOKEN", ... }] } }

Send signers[0].link to your signer. They open it in their browser, review the document, and sign.

Step 6: Completion

When all signers complete signing:

  • Submission statuscompleted
  • completedPdfUrl is populated with the final signed PDF
  • A document_all_complete webhook event fires (if configured)

You can poll GET /api/v1/documents/DOC_ID/submissions or listen to the webhook for completion.

On this page