Skip to main content
GET
/
journeys
JavaScript
import Courier from '@trycourier/courier';

const client = new Courier({
  apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});

const journeysListResponse = await client.journeys.list();

console.log(journeysListResponse.cursor);
{
  "templates": [
    {
      "name": "Welcome Journey",
      "id": "abc-123-def-456",
      "version": "published",
      "createdAt": "2024-01-01T00:00:00Z",
      "updatedAt": "2024-01-02T00:00:00Z"
    },
    {
      "name": "Onboarding Flow",
      "id": "xyz-789-ghi-012",
      "version": "published",
      "createdAt": "2024-01-03T00:00:00Z",
      "updatedAt": "2024-01-04T00:00:00Z"
    }
  ],
  "cursor": "eyJpZCI6InRlbXBsYXRlLTIifQ=="
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

cursor
string

A cursor token for pagination. Use the cursor from the previous response to fetch the next page of results.

version
enum<string>
default:published

The version of journeys to retrieve. Accepted values are published (for published journeys) or draft (for draft journeys). Defaults to published.

Available options:
published,
draft

Response

templates
Journey · object[]
cursor
string

A cursor token for pagination. Present when there are more results available.