> ## Documentation Index
> Fetch the complete documentation index at: https://docs.joystream.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# jstm triggers

> Bind an agent to an external event — create webhook triggers, get their URL, send a signed test, and inspect delivered events.

A trigger binding connects an external event to an agent run. Today the main use is inbound webhooks, including GitHub.

## `triggers create`

```bash theme={null}
jstm triggers create \
  --agent-id month-end-close \
  --name "Ledger push" \
  --provider github \
  --trigger-type webhook \
  --event push --org acme-corp --repo ledger \
  --webhook-secret -
```

| Option                   | Description                                                         |
| ------------------------ | ------------------------------------------------------------------- |
| `--agent-id`             | Required. The agent to run                                          |
| `--name`                 | Required. Binding name                                              |
| `--provider`             | Required. For example `generic_webhook` or `github`                 |
| `--trigger-type`         | Required. For example `webhook`                                     |
| `--trigger-source`       | The source string, such as `github:org:acme:event:push`             |
| `--event`                | GitHub event type, such as `pull_request` or `push`                 |
| `--org`                  | GitHub org or user                                                  |
| `--repo`                 | GitHub repository name. Omit for org-wide                           |
| `--webhook-secret`       | HMAC secret. Creates a vault credential. Use `-` to read from stdin |
| `--vault-credential-id`  | Use an existing vault credential for the HMAC secret instead        |
| `--environment-override` | Override the run environment                                        |
| `--input-mapping`        | Input mapping JSON, inline or as `@file`                            |
| `--json`                 | Emit as JSON                                                        |

For the `github` provider, `--event`, `--org`, and `--repo` build `--trigger-source` for you, so you don't have to assemble that string by hand.

<Tip>
  Pass `--webhook-secret -` to read the secret from stdin. It keeps the secret out of your shell history.
</Tip>

## `triggers webhook-url`

Print the full webhook URL for a binding. This is the URL you paste into GitHub or your other source system.

```bash theme={null}
jstm triggers webhook-url 3f21b8c0-91ad-4f6e-89b2-77c0a4e1d9f3
```

No `--json`.

## `triggers test`

Send a signed test webhook.

```bash theme={null}
jstm triggers test 3f21b8c0-91ad-4f6e-89b2-77c0a4e1d9f3
```

The server resolves the vault credential and signs with the real HMAC secret, so this exercises the true signature path. No secret leaves the backend.

## `triggers list` and `show`

```bash theme={null}
jstm triggers list
jstm triggers list --agent-id month-end-close --provider github
jstm triggers show 3f21b8c0-91ad-4f6e-89b2-77c0a4e1d9f3
```

| Option       | Description        |
| ------------ | ------------------ |
| `--agent-id` | Filter by agent    |
| `--provider` | Filter by provider |
| `--json`     | Emit as JSON       |

## `triggers update`

```bash theme={null}
jstm triggers update 3f21b8c0-91ad-4f6e-89b2-77c0a4e1d9f3 --disabled
jstm triggers update 3f21b8c0-91ad-4f6e-89b2-77c0a4e1d9f3 --name "Ledger push (main)"
```

| Option                   | Description                  |
| ------------------------ | ---------------------------- |
| `--name`                 | New name                     |
| `--enabled`              | Enable the binding           |
| `--disabled`             | Disable the binding          |
| `--environment-override` | Override the run environment |
| `--input-mapping`        | Input mapping JSON           |
| `--json`                 | Emit as JSON                 |

Disabling is usually better than deleting when you want to stop a trigger temporarily — the binding, its secret, and its event history survive.

## `triggers delete`

```bash theme={null}
jstm triggers delete 3f21b8c0-91ad-4f6e-89b2-77c0a4e1d9f3 --confirm
```

`--confirm` skips the prompt. No `--json`.

## Inspecting deliveries

```bash theme={null}
jstm triggers events
jstm triggers events --binding-id 3f21b8c0-… --outcome failed --limit 100
jstm triggers event 7ac1d3f5-0b62-4e19-92c8-5f6ab0e2d411
```

| Option         | Default | Description           |
| -------------- | ------- | --------------------- |
| `--binding-id` | —       | Filter to one binding |
| `--outcome`    | —       | Filter by outcome     |
| `--limit`      | `50`    | Maximum results       |
| `--json`       | off     | Emit as JSON          |

`triggers events` is where you look when a webhook fired but no run started — it shows what arrived and what the platform did with it.

## See also

* [Triggers](/features/triggers) — how triggers behave.
* [Trigger an agent](/guides/trigger-an-agent) — walkthrough.
