# kindgi text-triggers

> Start runs of agents and flows from texts (SMS or WhatsApp) to a business number: create, list, get, update, pause, resume, fires, versions, take-ownership, unregister

## `kindgi text-triggers`

**Synopsis**

```sh signature
kindgi text-triggers <command>
```

Start runs of agents and flows from texts (SMS or WhatsApp) to a business number: create, list, get, update, pause, resume, fires, versions, take-ownership, unregister.

**Commands**

| Command                                                                                                                                    | Description                                                                                                                                                              |
| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [`kindgi text-triggers list`](https://docs.kindgi.com/v0.8.1/reference/cli/text-triggers.md#kindgi-text-triggers-list)                     | List text triggers.                                                                                                                                                      |
| [`kindgi text-triggers get`](https://docs.kindgi.com/v0.8.1/reference/cli/text-triggers.md#kindgi-text-triggers-get)                       | Fetch a text trigger as it is now, or the version given.                                                                                                                 |
| [`kindgi text-triggers create`](https://docs.kindgi.com/v0.8.1/reference/cli/text-triggers.md#kindgi-text-triggers-create)                 | Start a run of an agent or a flow for each text (SMS or WhatsApp) to a business number, with the text as its input.                                                      |
| [`kindgi text-triggers update`](https://docs.kindgi.com/v0.8.1/reference/cli/text-triggers.md#kindgi-text-triggers-update)                 | Change a text trigger: what it runs, the number it answers, its limits or label, or the tools its runs may call unattended.                                              |
| [`kindgi text-triggers pause`](https://docs.kindgi.com/v0.8.1/reference/cli/text-triggers.md#kindgi-text-triggers-pause)                   | Pause a text trigger: it answers no texts, and one that comes in while it's paused never starts a run.                                                                   |
| [`kindgi text-triggers resume`](https://docs.kindgi.com/v0.8.1/reference/cli/text-triggers.md#kindgi-text-triggers-resume)                 | Resume a paused text trigger: it answers the texts that come in from now on.                                                                                             |
| [`kindgi text-triggers fires`](https://docs.kindgi.com/v0.8.1/reference/cli/text-triggers.md#kindgi-text-triggers-fires)                   | A text trigger's texts, newest first: the run each started, or why it was skipped, refused (`over-limit:`, past `--runs-per-hour` or `--per-sender-per-hour`) or failed. |
| [`kindgi text-triggers versions`](https://docs.kindgi.com/v0.8.1/reference/cli/text-triggers.md#kindgi-text-triggers-versions)             | List a text trigger's versions, newest first: when each was made, by whom, and why.                                                                                      |
| [`kindgi text-triggers take-ownership`](https://docs.kindgi.com/v0.8.1/reference/cli/text-triggers.md#kindgi-text-triggers-take-ownership) | Become a text trigger's owner, so its runs act as you, with your connections, from the next text (for a trigger whose owner left).                                       |
| [`kindgi text-triggers unregister`](https://docs.kindgi.com/v0.8.1/reference/cli/text-triggers.md#kindgi-text-triggers-unregister)         | Remove a text trigger: it answers no more texts, and frees its connection.                                                                                               |

**See also**

- [Texts](https://docs.kindgi.com/v0.8.1/guides/connections/texts.md)

### `kindgi text-triggers list`

**Synopsis**

```sh signature
kindgi text-triggers list [--project=<project-id>] [--status=active|paused] [--limit=<n>] [--cursor=<c>]
```

List text triggers.

**Options**

| Option              | Default                       | Description                                                      |
| ------------------- | ----------------------------- | ---------------------------------------------------------------- |
| `--cursor <value>`  | none                          | Resume after this cursor, from the previous page's `nextCursor`. |
| `--limit <value>`   | `25` (at most `100`)          | The most to return (default 25, at most 100).                    |
| `--project <value>` | none                          | Only this project's text triggers.                               |
| `--status <value>`  | none (both active and paused) | Only `active` or only `paused` text triggers.                    |

Every command also takes the [global flags](https://docs.kindgi.com/v0.8.1/reference/cli.md#global-flags).

**Examples**

List the text triggers in a project.

```sh
kindgi text-triggers list --project=<project-id>
```

List only the paused ones, as a table, with why each is paused.

```sh
kindgi text-triggers list --status=paused --table
```

**See also**

- [Texts](https://docs.kindgi.com/v0.8.1/guides/connections/texts.md)
- [`kindgi text-triggers`](https://docs.kindgi.com/v0.8.1/reference/cli/text-triggers.md#kindgi-text-triggers)

### `kindgi text-triggers get`

**Synopsis**

```sh signature
kindgi text-triggers get <trigger-id> [<version>]
```

Fetch a text trigger as it is now, or the version given.

**Options**

Every command also takes the [global flags](https://docs.kindgi.com/v0.8.1/reference/cli.md#global-flags).

**Examples**

Fetch a text trigger: what it runs, the number it answers, and its status.

```sh
kindgi text-triggers get <trigger-id>
```

Fetch version 2 of a text trigger: what it ran, and which number it answered.

```sh
kindgi text-triggers get <trigger-id> 2
```

**See also**

- [Texts](https://docs.kindgi.com/v0.8.1/guides/connections/texts.md)
- [`kindgi text-triggers`](https://docs.kindgi.com/v0.8.1/reference/cli/text-triggers.md#kindgi-text-triggers)

### `kindgi text-triggers create`

**Synopsis**

```sh signature
kindgi text-triggers create (--agent=<id> [--agent-version=<v>] | --flow=<id> --flow-version=<v>) --connection=<connection> [--runs-per-hour=<n>] [--per-sender-per-hour=<n>] [--label=<text>] [--project=<project-id>] [--run-as=<service-account-id>|project] [--allow-unattended=<tool-id>]...
```

Start a run of an agent or a flow for each text (SMS or WhatsApp) to a business number, with the text as its input. The number is the company's, so it takes `admin` on the project. Its runs act as you (or, with --run-as, a service account or the project's own), with your connections; in them, every call that changes something, except handing the conversation to a person (`kindgi_hand_to_person`), waits for a person's yes, and a text that isn't a reply always does.

**Options**

| Option                          | Default                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------------------------- | ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--agent <value>`               | none                                              | Run this agent (at its pinned version, else the latest).                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `--agent-version <value>`       | none (its pinned version, else the latest)        | With --agent: run this exact version.                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `--allow-unattended <value>`    | none (a tool that waits for a person still waits) | A tool, by id, whose calls in this trigger's runs needn't wait for a person's yes (repeatable; only tools its agent or flow calls, no wildcard). In a run a text started, every call that changes something, except handing the conversation to a person (`kindgi_hand_to_person`), waits for one otherwise. Never `kindgi_send_text`: a text that isn't a reply always waits. Needs `admin` on the trigger's project. The workspace's and the agent's approval rules still apply. Repeatable. |
| `--connection <value>`          | required                                          | The business number it answers: one of the project's company connections of app `texts`, by id or name (required). One text trigger answers a connection.                                                                                                                                                                                                                                                                                                                                      |
| `--flow <value>`                | none                                              | Run this flow (with --flow-version).                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `--flow-version <value>`        | required with `--flow`                            | With --flow: the flow version to run.                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `--label <value>`               | none                                              | A short label.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `--per-sender-per-hour <value>` | `10`                                              | The most runs one sender's texts start in an hour, 1 to 60 (default 10). Past it, that sender's text is refused, and doesn't run later.                                                                                                                                                                                                                                                                                                                                                        |
| `--project <value>`             | the workspace's default project                   | The trigger's project, by id (default: the workspace's default project).                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `--run-as <value>`              | none (you own the trigger)                        | A service account, by id, or `project`: the trigger's owner, so its runs act as that account (not as you). `project` runs it as the project's own account, made the first time. The project's own account runs only what the project's editors can. A named account takes `act_as`, and needs a role that runs what the trigger runs (runner or above on the target's project). Omit it to own the trigger yourself.                                                                           |
| `--runs-per-hour <value>`       | `60`                                              | The most runs its texts start in an hour, 1 to 600 (default 60). Past it, a text is refused, and doesn't run later.                                                                                                                                                                                                                                                                                                                                                                            |

Every command also takes the [global flags](https://docs.kindgi.com/v0.8.1/reference/cli.md#global-flags).

**Examples**

Run an agent for each text to the company's number, through the company connection named `support-line`.

```sh
kindgi text-triggers create --agent=acme.order-desk --connection=support-line
```

Run a flow for each text, at most 120 runs an hour and 5 for any one sender, whose ticket tool needn't wait for a yes.

```sh
kindgi text-triggers create --flow=acme.triage --flow-version=1.0.0 --connection=support-line --runs-per-hour=120 --per-sender-per-hour=5 --allow-unattended=acme.create-ticket
```

From [Texts](https://docs.kindgi.com/v0.8.1/guides/connections/texts.md):

```sh
pnpm exec kindgi text-triggers create --agent=acme.front-desk --connection=+15551234567 --label="whatsapp"
```

**See also**

- [Texts](https://docs.kindgi.com/v0.8.1/guides/connections/texts.md)
- [`kindgi text-triggers`](https://docs.kindgi.com/v0.8.1/reference/cli/text-triggers.md#kindgi-text-triggers)

### `kindgi text-triggers update`

**Synopsis**

```sh signature
kindgi text-triggers update <trigger-id> [--agent=<id> [--agent-version=<v>] | --flow=<id> --flow-version=<v>] [--connection=<connection>] [--runs-per-hour=<n>] [--per-sender-per-hour=<n>] [--label=<text>|--clear-label] [--allow-unattended=<tool-id>|none]...
```

Change a text trigger: what it runs, the number it answers, its limits or label, or the tools its runs may call unattended. A flag left out keeps the trigger's value, and its owner stays. It takes `admin` on the trigger's project.

**Options**

| Option                          | Default                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--agent <value>`               | unchanged                                                                                                         | Run this agent (at its pinned version, else the latest).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `--agent-version <value>`       | unchanged                                                                                                         | With --agent: run this exact version.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `--allow-unattended <value>`    | unchanged; a trigger that has a list and moves to another flow, agent or connection must name it again, or `none` | A tool, by id, whose calls in this trigger's runs needn't wait for a person's yes (repeatable; only tools its agent or flow calls, no wildcard). In a run a text started, every call that changes something, except handing the conversation to a person (`kindgi_hand_to_person`), waits for one otherwise. Never `kindgi_send_text`: a text that isn't a reply always waits. Needs `admin` on the trigger's project. The workspace's and the agent's approval rules still apply. Replaces the list; `none` clears it; left out, the list is kept, and a new --agent, --flow or --connection must name it again (or `none`). Repeatable. |
| `--clear-label`                 | off                                                                                                               | Take the label off.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `--connection <value>`          | unchanged                                                                                                         | The business number it answers: one of the project's company connections of app `texts`, by id or name. One text trigger answers a connection.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `--flow <value>`                | unchanged                                                                                                         | Run this flow (with --flow-version).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `--flow-version <value>`        | unchanged                                                                                                         | With --flow: the flow version to run.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `--label <value>`               | unchanged                                                                                                         | A new label (`--clear-label` takes it off).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `--per-sender-per-hour <value>` | unchanged                                                                                                         | The most runs one sender's texts start in an hour, 1 to 60. Past it, that sender's text is refused, and doesn't run later.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `--runs-per-hour <value>`       | unchanged                                                                                                         | The most runs its texts start in an hour, 1 to 600. Past it, a text is refused, and doesn't run later.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

Every command also takes the [global flags](https://docs.kindgi.com/v0.8.1/reference/cli.md#global-flags).

**Examples**

Start at most 30 runs an hour, and 3 for any one sender.

```sh
kindgi text-triggers update <trigger-id> --runs-per-hour=30 --per-sender-per-hour=3
```

Answer another of the company numbers, keeping no unattended tools.

```sh
kindgi text-triggers update <trigger-id> --connection=sales-line --allow-unattended=none
```

From [Texts](https://docs.kindgi.com/v0.8.1/guides/connections/texts.md):

```sh
pnpm exec kindgi text-triggers update <trigger-id> --allow-unattended=kindgi_reply_to_text
```

**See also**

- [Texts](https://docs.kindgi.com/v0.8.1/guides/connections/texts.md)
- [`kindgi text-triggers`](https://docs.kindgi.com/v0.8.1/reference/cli/text-triggers.md#kindgi-text-triggers)

### `kindgi text-triggers pause`

**Synopsis**

```sh signature
kindgi text-triggers pause <trigger-id>
```

Pause a text trigger: it answers no texts, and one that comes in while it's paused never starts a run. It keeps its connection.

**Options**

Every command also takes the [global flags](https://docs.kindgi.com/v0.8.1/reference/cli.md#global-flags).

**Examples**

Pause a text trigger: texts that come while it's paused never start runs.

```sh
kindgi text-triggers pause <trigger-id>
```

**See also**

- [Texts](https://docs.kindgi.com/v0.8.1/guides/connections/texts.md)
- [`kindgi text-triggers`](https://docs.kindgi.com/v0.8.1/reference/cli/text-triggers.md#kindgi-text-triggers)

### `kindgi text-triggers resume`

**Synopsis**

```sh signature
kindgi text-triggers resume <trigger-id>
```

Resume a paused text trigger: it answers the texts that come in from now on. Texts that came while it was paused never start runs.

**Options**

Every command also takes the [global flags](https://docs.kindgi.com/v0.8.1/reference/cli.md#global-flags).

**Examples**

Resume a paused text trigger; texts that came while it was paused never start runs.

```sh
kindgi text-triggers resume <trigger-id>
```

**See also**

- [Texts](https://docs.kindgi.com/v0.8.1/guides/connections/texts.md)
- [`kindgi text-triggers`](https://docs.kindgi.com/v0.8.1/reference/cli/text-triggers.md#kindgi-text-triggers)

### `kindgi text-triggers fires`

**Synopsis**

```sh signature
kindgi text-triggers fires <trigger-id> [--limit=<n>] [--cursor=<c>]
```

A text trigger's texts, newest first: the run each started, or why it was skipped, refused (`over-limit:`, past `--runs-per-hour` or `--per-sender-per-hour`) or failed.

**Options**

| Option             | Default              | Description                                                      |
| ------------------ | -------------------- | ---------------------------------------------------------------- |
| `--cursor <value>` | none                 | Resume after this cursor, from the previous page's `nextCursor`. |
| `--limit <value>`  | `25` (at most `100`) | The most to return (default 25, at most 100).                    |

Every command also takes the [global flags](https://docs.kindgi.com/v0.8.1/reference/cli.md#global-flags).

**Examples**

See the run each text started, or why it was refused, as a table.

```sh
kindgi text-triggers fires <trigger-id> --table
```

From [Texts](https://docs.kindgi.com/v0.8.1/guides/connections/texts.md):

```sh
pnpm exec kindgi text-triggers fires <trigger-id>
```

**See also**

- [Texts](https://docs.kindgi.com/v0.8.1/guides/connections/texts.md)
- [`kindgi text-triggers`](https://docs.kindgi.com/v0.8.1/reference/cli/text-triggers.md#kindgi-text-triggers)

### `kindgi text-triggers versions`

**Synopsis**

```sh signature
kindgi text-triggers versions <trigger-id> [--limit=<n>] [--cursor=<c>]
```

List a text trigger's versions, newest first: when each was made, by whom, and why. `kindgi text-triggers get <trigger-id> <version>` shows one.

**Options**

| Option             | Default              | Description                                                      |
| ------------------ | -------------------- | ---------------------------------------------------------------- |
| `--cursor <value>` | none                 | Resume after this cursor, from the previous page's `nextCursor`. |
| `--limit <value>`  | `25` (at most `100`) | The most to return (default 25, at most 100).                    |

Every command also takes the [global flags](https://docs.kindgi.com/v0.8.1/reference/cli.md#global-flags).

**Examples**

List a text trigger's versions as a table: when each was made, by whom, and why.

```sh
kindgi text-triggers versions <trigger-id> --table
```

**See also**

- [Texts](https://docs.kindgi.com/v0.8.1/guides/connections/texts.md)
- [`kindgi text-triggers`](https://docs.kindgi.com/v0.8.1/reference/cli/text-triggers.md#kindgi-text-triggers)

### `kindgi text-triggers take-ownership`

**Synopsis**

```sh signature
kindgi text-triggers take-ownership <trigger-id> [--run-as=<service-account-id>|project]
```

Become a text trigger's owner, so its runs act as you, with your connections, from the next text (for a trigger whose owner left). With --run-as, a service account, or with --run-as=project the project's own account, becomes the owner instead.

**Options**

| Option             | Default                    | Description                                                                                                                                                                                                                                                                                                                                                                                                          |
| ------------------ | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--run-as <value>` | none (you own the trigger) | A service account, by id, or `project`: the trigger's owner, so its runs act as that account (not as you). `project` runs it as the project's own account, made the first time. The project's own account runs only what the project's editors can. A named account takes `act_as`, and needs a role that runs what the trigger runs (runner or above on the target's project). Omit it to own the trigger yourself. |

Every command also takes the [global flags](https://docs.kindgi.com/v0.8.1/reference/cli.md#global-flags).

**Examples**

Take over a trigger whose owner left, so its runs act as you.

```sh
kindgi text-triggers take-ownership <trigger-id>
```

**See also**

- [Texts](https://docs.kindgi.com/v0.8.1/guides/connections/texts.md)
- [`kindgi text-triggers`](https://docs.kindgi.com/v0.8.1/reference/cli/text-triggers.md#kindgi-text-triggers)

### `kindgi text-triggers unregister`

**Synopsis**

```sh signature
kindgi text-triggers unregister <trigger-id>
```

Remove a text trigger: it answers no more texts, and frees its connection.

**Options**

Every command also takes the [global flags](https://docs.kindgi.com/v0.8.1/reference/cli.md#global-flags).

**Examples**

Remove a text trigger: it answers no more texts, and frees its connection.

```sh
kindgi text-triggers unregister <trigger-id>
```

**See also**

- [Texts](https://docs.kindgi.com/v0.8.1/guides/connections/texts.md)
- [`kindgi text-triggers`](https://docs.kindgi.com/v0.8.1/reference/cli/text-triggers.md#kindgi-text-triggers)
