---
title: "Events"
description: "List what happened to an envelope or a recipient, filter by event type, and wait for an envelope to complete with the SignatureAPI CLI."
canonical: "https://signatureapi.com/docs/cli/events"
source: "https://signatureapi.com/docs/cli/events.md"
last_verified_api_version: "1.18.1"
---

# 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.

_Last verified against API version 1.18.1._

`events list` shows the [events](https://signatureapi.com/docs/api/resources/events/object) 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](https://signatureapi.com/docs/api/resources/events/all)                 |
| `events list --envelope <envelope-id>`   | [List envelope events](https://signatureapi.com/docs/api/resources/events/envelope)   |
| `events list --recipient <recipient-id>` | [List recipient events](https://signatureapi.com/docs/api/resources/events/recipient) |

It acts in test mode unless you pass `--mode live` or use a live API key. See [Working with resources](https://signatureapi.com/docs/cli/working-with-resources) for modes and credentials.

## See what happened to an envelope

```bash
npx signatureapi events list --envelope eb4cf433-a8af-4161-b37b-7ef57d423e56
```

Each line shows the event ID, its type, and when it happened, such as `envelope.created`, `envelope.started`, `recipient.sent`, and `recipient.completed`. [Envelope events](https://signatureapi.com/docs/api/resources/events/envelope-events) and [recipient events](https://signatureapi.com/docs/api/resources/events/recipient-events) explain each type.

For one recipient's events, pass `--recipient` instead. The two options can't be combined:

```bash
npx signatureapi events list --recipient re_49r1R2jpPDz8hSpP75ZkPp
```

## Filter by event type

`--type` keeps one event type, here across every envelope of the account:

```bash
npx signatureapi events list --type envelope.completed
```

The `--json` result carries each full [event](https://signatureapi.com/docs/api/resources/events/object), 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:

```bash
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
done
```

A check that fails, for example on a network error, counts as "not yet". A `deliverable.failed` event means generation failed; see the [deliverable lifecycle](https://signatureapi.com/docs/api/resources/deliverables/lifecycle). Space out the checks: the API applies [rate limits](https://signatureapi.com/docs/api/rate-limiting). Then [download the signed PDF](https://signatureapi.com/docs/cli/deliverables).

To get events pushed to your application as they happen instead, use webhooks. [`listen`](https://signatureapi.com/docs/cli/webhooks) delivers test events to a handler on your machine.

## Command reference

Generated from the help of the published `signatureapi` package.

Commands of the `signatureapi` CLI, version 0.7.1. Run `npx signatureapi <command> --help` for the same text in a terminal.

### `events list`

List the account's events, or one envelope's or recipient's, newest first, up to 20 per page.

```bash
npx signatureapi events list [options]
```

Options:

- `--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:

```bash
npx signatureapi events list --envelope 5e5ace5e-...
```

List recent live events as JSON:

```bash
npx signatureapi events list --mode live --json
```

Related: https://signatureapi.com/docs/api/resources/events/object
