Resources
Events
List what happened to an envelope or a recipient, filter by event type, and wait for an envelope to complete with the SignatureAPI CLI.
events list shows the events of your account, newest first: envelopes created and completed, requests sent, recipients who signed, and more. It sends the same request as the matching API operation:
| Command | API operation |
|---|---|
events list | List events |
events list --envelope <envelope-id> | List envelope events |
events list --recipient <recipient-id> | List recipient events |
It acts in test mode unless you pass --mode live or use a live API key. See Working with resources for modes and credentials.
See what happened to an envelope
npx signatureapi events list --envelope eb4cf433-a8af-4161-b37b-7ef57d423e56Each line shows the event ID, its type, and when it happened, such as envelope.created, envelope.started, recipient.sent, and recipient.completed. Envelope events and recipient events explain each type.
For one recipient’s events, pass --recipient instead. The two options can’t be combined:
npx signatureapi events list --recipient re_49r1R2jpPDz8hSpP75ZkPpFilter by event type
--type keeps one event type, here across every envelope of the account:
npx signatureapi events list --type envelope.completedThe --json result carries each full event, with the envelope ID and the ID and type of the object it is about.
Wait until the signed PDF is ready
The signed PDF is ready when its deliverable is generated, which can be a few seconds after the envelope completes. An envelope’s events include its deliverable events, so wait for deliverable.generated, not envelope.completed.
The CLI has no follow mode. This script checks every 10 seconds, and stops with an error after 30 checks:
id=eb4cf433-a8af-4161-b37b-7ef57d423e56
for attempt in $(seq 1 30); do
count=$(npx --yes signatureapi events list --envelope "$id" --type deliverable.generated --json \
| jq 'select(.type == "result" and .status == "success") | .data | length')
if [ "${count:-0}" -gt 0 ]; then echo "The signed PDF is ready"; break; fi
if [ "$attempt" -eq 30 ]; then echo "No deliverable.generated event after 30 checks" >&2; exit 1; fi
sleep 10
doneA check that fails, for example on a network error, counts as “not yet”. A deliverable.failed event means generation failed; see the deliverable lifecycle. Space out the checks: the API applies rate limits. Then download the signed PDF.
To get events pushed to your application as they happen instead, use webhooks. listen delivers test events to a handler on your machine.
Command reference
Generated from the help of the published signatureapi package.
events list
List the account's events, or one envelope's or recipient's, newest first, up to 20 per page.
Usagenpx signatureapi events list [options]
Options (5)
| Option | Description |
|---|---|
--envelope <envelope-id> | Only this envelope's events. |
--recipient <recipient-id> | Only this recipient's events. |
--type <event-type> | Only events of this type, such as envelope.completed. |
--limit <count> | Events per page, 1 to 20 (default: 20). |
--cursor <cursor> | Cursor of the page to get, from a previous result's next_cursor. |
Global options: --mode, --api-key-var, --credential-store, --json.
# List an envelope's events
npx signatureapi events list --envelope 5e5ace5e-...
# List recent live events as JSON
npx signatureapi events list --mode live --jsonRelated: Event