|
| 1 | +# automations & events |
| 2 | + |
| 3 | +Detailed flag specifications for `resend automations` and `resend events` commands. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## automations list |
| 8 | + |
| 9 | +| Flag | Type | Default | Description | |
| 10 | +|------|------|---------|-------------| |
| 11 | +| `--limit <n>` | number | 10 | Max results (1-100) | |
| 12 | +| `--after <cursor>` | string | — | Forward pagination | |
| 13 | +| `--before <cursor>` | string | — | Backward pagination | |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | +## automations create |
| 18 | + |
| 19 | +| Flag | Type | Required | Description | |
| 20 | +|------|------|----------|-------------| |
| 21 | +| `--name <name>` | string | Yes (unless in `--file`) | Automation name | |
| 22 | +| `--status <status>` | string | No | Initial status: `enabled` or `disabled` | |
| 23 | +| `--steps <json>` | string | Yes (unless `--file`) | Steps array as JSON string | |
| 24 | +| `--connections <json>` | string | Yes (unless `--file`) | Connections array as JSON string | |
| 25 | +| `--file <path>` | string | No | Path to JSON file with full payload (use `"-"` for stdin) | |
| 26 | + |
| 27 | +When using `--file`, the JSON object should contain `{ name, status?, steps, connections }`. Flags override file values. |
| 28 | + |
| 29 | +**Step types:** `trigger`, `delay`, `send_email`, `wait_for_event`, `condition` |
| 30 | + |
| 31 | +**Connection types:** `default`, `condition_met`, `condition_not_met`, `timeout`, `event_received` |
| 32 | + |
| 33 | +--- |
| 34 | + |
| 35 | +## automations get |
| 36 | + |
| 37 | +``` |
| 38 | +resend automations get <id> |
| 39 | +``` |
| 40 | + |
| 41 | +Returns the full automation object including steps and connections. |
| 42 | + |
| 43 | +--- |
| 44 | + |
| 45 | +## automations update |
| 46 | + |
| 47 | +| Flag | Type | Required | Description | |
| 48 | +|------|------|----------|-------------| |
| 49 | +| `--status <status>` | string | Yes | `enabled` or `disabled` | |
| 50 | + |
| 51 | +``` |
| 52 | +resend automations update <id> --status enabled |
| 53 | +``` |
| 54 | + |
| 55 | +--- |
| 56 | + |
| 57 | +## automations delete |
| 58 | + |
| 59 | +| Flag | Type | Required | Description | |
| 60 | +|------|------|----------|-------------| |
| 61 | +| `--yes` | boolean | Yes (non-interactive) | Skip confirmation | |
| 62 | + |
| 63 | +--- |
| 64 | + |
| 65 | +## automations open |
| 66 | + |
| 67 | +``` |
| 68 | +resend automations open [id] |
| 69 | +``` |
| 70 | + |
| 71 | +Opens the automations list or a specific automation's editor in the dashboard. |
| 72 | + |
| 73 | +--- |
| 74 | + |
| 75 | +## automations runs |
| 76 | + |
| 77 | +| Flag | Type | Default | Description | |
| 78 | +|------|------|---------|-------------| |
| 79 | +| `--limit <n>` | number | 10 | Max results (1-100) | |
| 80 | +| `--after <cursor>` | string | — | Forward pagination | |
| 81 | +| `--before <cursor>` | string | — | Backward pagination | |
| 82 | + |
| 83 | +``` |
| 84 | +resend automations runs <automation-id> |
| 85 | +``` |
| 86 | + |
| 87 | +**Run status values:** `running` | `completed` | `failed` | `cancelled` |
| 88 | + |
| 89 | +--- |
| 90 | + |
| 91 | +## automations runs get |
| 92 | + |
| 93 | +| Flag | Type | Required | Description | |
| 94 | +|------|------|----------|-------------| |
| 95 | +| `--automation-id <id>` | string | Yes | Automation ID | |
| 96 | +| `--run-id <id>` | string | Yes | Run ID | |
| 97 | + |
| 98 | +Returns the full run object including step-level execution details. |
| 99 | + |
| 100 | +--- |
| 101 | + |
| 102 | +## events list |
| 103 | + |
| 104 | +| Flag | Type | Default | Description | |
| 105 | +|------|------|---------|-------------| |
| 106 | +| `--limit <n>` | number | 10 | Max results (1-100) | |
| 107 | +| `--after <cursor>` | string | — | Forward pagination | |
| 108 | +| `--before <cursor>` | string | — | Backward pagination | |
| 109 | + |
| 110 | +--- |
| 111 | + |
| 112 | +## events create |
| 113 | + |
| 114 | +| Flag | Type | Required | Description | |
| 115 | +|------|------|----------|-------------| |
| 116 | +| `--name <name>` | string | Yes | Event name (e.g. `user.signed_up`) | |
| 117 | +| `--schema <json>` | string | No | JSON object mapping field names to types (`string`, `number`, `boolean`, `date`) | |
| 118 | + |
| 119 | +Event names cannot start with `resend:` (reserved). |
| 120 | + |
| 121 | +--- |
| 122 | + |
| 123 | +## events get |
| 124 | + |
| 125 | +``` |
| 126 | +resend events get <id> |
| 127 | +``` |
| 128 | + |
| 129 | +Accepts an event ID. |
| 130 | + |
| 131 | +--- |
| 132 | + |
| 133 | +## events update |
| 134 | + |
| 135 | +| Flag | Type | Required | Description | |
| 136 | +|------|------|----------|-------------| |
| 137 | +| `--schema <json>` | string | Yes | Updated schema JSON (pass `null` to clear) | |
| 138 | + |
| 139 | +--- |
| 140 | + |
| 141 | +## events delete |
| 142 | + |
| 143 | +| Flag | Type | Required | Description | |
| 144 | +|------|------|----------|-------------| |
| 145 | +| `--yes` | boolean | Yes (non-interactive) | Skip confirmation | |
| 146 | + |
| 147 | +--- |
| 148 | + |
| 149 | +## events send |
| 150 | + |
| 151 | +| Flag | Type | Required | Description | |
| 152 | +|------|------|----------|-------------| |
| 153 | +| `--event <name>` | string | Yes | Event name to trigger | |
| 154 | +| `--contact-id <id>` | string | One of `--contact-id` or `--email` | Contact ID | |
| 155 | +| `--email <address>` | string | One of `--contact-id` or `--email` | Contact email | |
| 156 | +| `--payload <json>` | string | No | JSON payload matching the event schema | |
| 157 | + |
| 158 | +--- |
| 159 | + |
| 160 | +## events open |
| 161 | + |
| 162 | +``` |
| 163 | +resend events open |
| 164 | +``` |
| 165 | + |
| 166 | +Opens the events management page in the dashboard. |
0 commit comments