# polymorfa trigger

> Send a signed test event for a Test number to your webhooks, event history, and a running `polymorfa listen`. Real numbers are refused.

## polymorfa trigger

Send a signed test event for a Test number to your webhooks, event history, and a running `polymorfa listen`. Real numbers are refused.

### Usage

```bash
polymorfa trigger [EVENT] [flags]
```

### Arguments

- `EVENT` (optional). Fixture name; each name is the event type it produces. Values: `message.received`, `message.ack`, `message.failed`, `call.received`, `call.missed`, `call.ended`, `session.status`, `session.restriction_updated`, `template.status`.

### Flags

- `--from <value>` (value). Shortcut for --override from=<E.164 phone>.
- `--from-session <value>` (value). message.received only: send a simulated message from this other Test number instead of generating an event.
- `--list` (boolean). List fixtures and the overrides each accepts.
- `--override <value>` (value, repeatable). Override a payload field as key=value, for example ackStatus=read. Repeat for several fields.
- `--session <value>` (value). Test number session name in the project.
- `--text <value>` (value). Shortcut for --override text=<value>.

Also accepts the [global flags](https://docs.polymorfa.com/cli#global-flags).

### Examples

```bash
polymorfa trigger --list --project <projectId>
```

```bash
polymorfa trigger message.received --session my-test-number --text "hi" --project <projectId>
```

```bash
polymorfa trigger message.ack --session my-test-number --override ackStatus=read --project <projectId>
```

```bash
polymorfa trigger template.status --session my-test-number --override templateStatus=REJECTED --override reason=INVALID_FORMAT --project <projectId>
```
