# events

> Every coline events command, with its flags and the action it runs.

Source: https://docs.coline.app/cli/reference/events

{/* Generated by apps/docs/scripts/cli-reference.ts from coline's command tree and the cli action catalog. Don't edit it: run `pnpm --filter @colineapp/docs cli:reference`. */}

Every `coline events` command, 3 in all.

## events subscribe

Has Coline POST an event to your URL whenever it happens, filtered to what the person can see and never for their own actions. The URL must answer a signed challenge by echoing it back. Each delivery is signed with Standard Webhooks headers using the subscription's whsec\_ secret: pass your own, or Coline makes one and returns it once. Subscriptions last 7 days by default (30 at most); subscribe again with the same event, arguments and URL to renew.

Set arguments with --json '\{…}' or --input.

```text
coline events subscribe [flags]
```

**Action** `events.subscribe` · **Effect** write · **Can wait for your approval** no · **Scope** `workspace.read` · **Workspace** yes, `-w`

| Flag                     | What it does                                                                                                                                                                                                                                                                                                |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--event <text>`         | The event, e.g. task.assigned or mail.received. Required. One of `message.created`, `message.mentioned`, `task.created`, `task.updated`, `task.assigned`, `calendar.event_created`, `calendar.event_updated`, `mail.received`, `review.requested`, `timer.fired`, `approval.decided`, `connection.expired`. |
| `--url <text>`           | An https URL that answers Coline's challenge. Required.                                                                                                                                                                                                                                                     |
| `--secret <text>`        | A whsec\_ key of 24 to 64 bytes to sign deliveries with; Coline makes one if left out.                                                                                                                                                                                                                      |
| `--ttl-seconds <number>` | How long it lasts, in seconds. Default 7 days.                                                                                                                                                                                                                                                              |
| `--input <file>`         | Read the input as JSON from a file; - reads stdin.                                                                                                                                                                                                                                                          |

```bash
coline events subscribe -w acme --event message.created --url "…"
coline events subscribe -w acme --json '{"event":"message.created","url":"…"}' --fields id
```

## events subscriptions list

Lists the event subscriptions this connection made in the workspace, running or stopped in the last 30 days, with why each stopped.

It changes nothing.

```text
coline events subscriptions list [flags]
```

**Action** `events.subscriptions.list` · **Effect** read, changes nothing · **Can wait for your approval** no · **Scope** `workspace.read` · **Workspace** yes, `-w`

| Flag             | What it does                                       |
| ---------------- | -------------------------------------------------- |
| `--input <file>` | Read the input as JSON from a file; - reads stdin. |

```bash
coline events subscriptions list -w acme
coline events subscriptions list -w acme --json '{}' --fields id
```

## events unsubscribe

Stops one of your event subscriptions, by its id from list\_event\_subscriptions. Nothing more is delivered to its URL.

It removes or overwrites something, so it runs only with --confirm.

```text
coline events unsubscribe [flags]
```

**Action** `events.unsubscribe` · **Effect** destructive, runs only with `--confirm` · **Can wait for your approval** no · **Scope** `workspace.read` · **Workspace** yes, `-w`

| Flag             | What it does                                       |
| ---------------- | -------------------------------------------------- |
| `--id <text>`    | The subscription's id. Required.                   |
| `--input <file>` | Read the input as JSON from a file; - reads stdin. |

```bash
coline events unsubscribe -w acme --id "…" --confirm
coline events unsubscribe -w acme --json '{"id":"…"}' --fields id --confirm
```
