Quickstart
Seven commands, plain POSIX shell with curl and
python3. The dashboard's API keys page shows these same steps
with your key filled in, and CI runs them against a live server before
every merge.
Before you start
Create a key under Settings, API keys, and export it:
export SENV_API_KEY=...
Keys come in two modes. A senv_test_ key is the right one for
a first run: it never counts toward your allowance, recipients' emails are
captured in the dashboard instead of sent, and the sealed PDF carries a
watermark. A senv_live_ key sends real email and each send
counts. The mode is part of the key, not a request flag.
- Grab the sample document
curl -sf https://signenvoystaging.fly.dev/static/sample-agreement.pdf -o sample.pdf - Create a signature request
DOC=$(curl -sf -X POST https://signenvoystaging.fly.dev/v1/documents \ -H "Authorization: Bearer $SENV_API_KEY" \ -H "Content-Type: application/json" \ -d '{"title": "Quickstart agreement", "recipients": [{"name": "Ada Lovelace", "email": "ada@example.com"}], "fields": [{"type": "signature", "recipient_index": 0, "page": 1, "x": 0.1, "y": 0.8, "w": 0.35, "h": 0.07}]}' \ | python3 -c "import sys, json; print(json.load(sys.stdin)['id'])") - Upload the PDF
curl -sf -X PUT https://signenvoystaging.fly.dev/v1/documents/$DOC/content \ -H "Authorization: Bearer $SENV_API_KEY" -H "Content-Type: application/pdf" \ --data-binary @sample.pdf - Finalize the draft
curl -sf -X POST https://signenvoystaging.fly.dev/v1/documents/$DOC/finalize -H "Authorization: Bearer $SENV_API_KEY" - Send it
curl -sf -X POST https://signenvoystaging.fly.dev/v1/documents/$DOC/send -H "Authorization: Bearer $SENV_API_KEY" -H "Content-Type: application/json" -d '{}' - Poll the status
curl -sf https://signenvoystaging.fly.dev/v1/documents/$DOC -H "Authorization: Bearer $SENV_API_KEY" - Download the sealed PDF (after everyone signs)
curl -sfL -o signed.pdf "https://signenvoystaging.fly.dev/v1/documents/$DOC/download?variant=signed" -H "Authorization: Bearer $SENV_API_KEY"
What happened
Step 2 created a draft and returned its id. Step 3 uploaded the PDF
bytes; step 4 finalized the draft, which validates fields against the
pages. Step 5 sent it: the recipient receives a signing link (or, with a
test key, the email lands under Settings, Test mode). Step 6 reads the
document; its status moves through sent,
partially_signed, and completed. Once sealing
finishes, step 7 downloads the sealed copy with its Certificate of
Completion as the last page. Before sealing finishes, that download
answers not-ready; poll with
backoff or subscribe to the document.sealed webhook event.