# Triggers

1 endpoints.

## Discover the merge tokens a trigger source exposes

```http
POST https://orbitwrite.com/api/v1/triggers/discover
```

Fetches an RSS/Atom feed, Ghost blog or WordPress site, samples its most recent item, and returns the merge tokens available to a post template built from it.

**Authentication:** bearer token or session cookie.

### Request body (`application/json`)

- `source` (string, required, one of `rss`, `ghost`, `wordpress`)
- `url` (string, required)

### Responses

#### 200

Tokens discovered on the source

- `tokens` (DiscoveredToken[], required)
  - `token` (string, required) — Merge token as it appears in a template, e.g. `{{title}}`.
  - `previewValue` (string, required) — The value this token resolved to on the sampled item, truncated for display.
  - `kind` (string, required, one of `text`, `url`, `image`, `date`, `list`)
- `sampleSource` (string, required) — Human-readable label for the item the tokens were sampled from, e.g. `First feed item · How I built X`.

#### 400

Invalid request

- `error` (string, required)
- `issues` (any[], optional)

#### 401

Not signed in

- `error` (string, required)
- `issues` (any[], optional)

#### 429

Rate limit exceeded

- `error` (string, required)
- `issues` (any[], optional)
