Skip to main content
GET
/
routing-strategies
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 routingStrategyListResponse = await client.routingStrategies.list();

console.log(routingStrategyListResponse.paging);
{
  "results": [
    {
      "id": "rs_01abc123",
      "name": "Email via SendGrid",
      "description": "Routes email through sendgrid with SES failover",
      "tags": [
        "production",
        "email"
      ],
      "created": 1710000000000,
      "creator": "user_abc",
      "updated": 1710000000000,
      "updater": "user_def"
    }
  ],
  "paging": {
    "cursor": "eyJway...",
    "more": true
  }
}

Authorizations

Authorization
string
header
required

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

Query Parameters

cursor
string | null

Opaque pagination cursor from a previous response. Omit for the first page.

limit
integer
default:20

Maximum number of results per page. Default 20, max 100.

Required range: 1 <= x <= 100

Response

200 - application/json

Paginated list of routing strategy summaries.

paging
Paging · object
required
results
RoutingStrategySummary · object[]
required