Skip to main content
GET
/
routing-strategies
/
{id}
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 routingStrategyGetResponse = await client.routingStrategies.retrieve('id');

console.log(routingStrategyGetResponse.id);
{
  "id": "rs_01abc123",
  "name": "Email via SendGrid",
  "description": "Routes email through sendgrid with SES failover",
  "tags": [
    "production",
    "email"
  ],
  "routing": {
    "method": "single",
    "channels": [
      "email"
    ]
  },
  "channels": {
    "email": {
      "providers": [
        "sendgrid",
        "ses"
      ]
    }
  },
  "providers": {
    "sendgrid": {
      "override": {}
    }
  },
  "created": 1710000000000,
  "creator": "user_abc",
  "updated": 1710000000000,
  "updater": "user_def"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Routing strategy ID (rs_ prefix).

Response

Full routing strategy entity returned by GET.

id
string
required

The routing strategy ID (rs_ prefix).

name
string
required

Human-readable name.

routing
MessageRouting · object
required

Routing tree defining channel selection method and order.

channels
MessageChannels · object
required

Per-channel delivery configuration. May be empty.

providers
MessageProviders · object
required

Per-provider delivery configuration. May be empty.

created
integer<int64>
required

Epoch milliseconds when the strategy was created.

creator
string
required

User ID of the creator.

description
string | null

Description of the routing strategy.

tags
string[] | null

Tags for categorization.

updated
integer<int64> | null

Epoch milliseconds of last update.

updater
string | null

User ID of the last updater.