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

# Journeys

> Start contacts on automation journeys from your own systems — by recording a named event, or by calling one journey's trigger endpoint.

There are two ways to start a contact on a journey from outside InstantCampaign.

1. **Record a named event** with [`POST /v1/events`](/api-reference/events). This starts every active journey whose **API Event** trigger listens for that event name. The event is also saved on the contact's timeline and feeds segments and analytics. Use this when your backend already emits events.
2. **Trigger one journey** with `POST /public/journeys/trigger`. This targets a single journey, and whatever you send in `data` goes with the contact into that journey.

## The trigger endpoint

Open the journey, select its **API Event** trigger step and copy the **trigger key**. Every call needs two credentials, and both must belong to the same workspace:

* `Authorization: Bearer ic_…`: a workspace API key. Any scopes will do.
* `X-Trigger-Key: …`: the journey's trigger key.

```bash theme={null}
curl -X POST https://instantcampaign.ai/api/public/journeys/trigger \
  -H "Authorization: Bearer ic_YOUR_KEY" \
  -H "X-Trigger-Key: YOUR_TRIGGER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "email": "jane@example.com", "data": { "reset_url": "https://app.example.com/reset/abc" } }'
```

```json theme={null}
{ "success": true, "executionId": "…", "journeyId": "…", "contactId": "…" }
```

Email steps in the journey can use `data` through Liquid, for example `{{ data.reset_url }}` or `{% for item in data.items %}`. This works in the body, subject and preheader.

| Status        | Why                                                                                                                                  |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `401`         | Missing or invalid API key, missing `X-Trigger-Key`, or unknown trigger key                                                          |
| `403`         | The API key and the trigger key belong to different workspaces, or the workspace is suspended                                        |
| `404`         | No contact with this email. The endpoint does not create contacts, so [upsert](/api-reference/contacts-and-lists) the contact first. |
| `409`         | The journey's enrollment setting does not let this contact enter again                                                               |
| `422`         | The journey is not active or is not an API Event journey, or the contact is not `ACTIVE`                                             |
| `413` / `429` | Body over 64 KB, or more than 120 requests/minute for the workspace                                                                  |
