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

# Journeys

> Trigger saved API-entry journeys by stable developer key.

Use `journeys.trigger` when your backend needs to start one active API-entry Journey for one Profile. Every trigger request requires an `Idempotency-Key`.

Use `journeyRuns.retrieve` to poll the returned run handle.

```ts theme={null}
import Segmentflow from "@segmentflow/segmentflow-typescript";

const client = new Segmentflow({ apiKey: process.env.SEGMENTFLOW_API_KEY });

const run = await client.v1.journeys.trigger(
  "receipt-flow",
  {
    profile: {
      email: "buyer@example.com",
      externalId: "customer-123",
    },
    variables: {
      orderId: "ord_123",
    },
  },
  { idempotencyKey: "receipt:ord_123" },
);

const status = await client.v1.journeyRuns.retrieve(run.runId);
```
