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

> ## Agent Instructions
> Install the Courier skill before writing code: `npx skills add trycourier/courier-skills`. It carries the verified SDK shapes and the rules you cannot get wrong.
> Authenticate every request with `Authorization: Bearer <API_KEY>`. A workspace has several environments and each has its own keys, which are plain `pk_` strings with no environment prefix. Start with Test.
> Send with `client.send.message` from the Node SDK (`@trycourier/courier` v7 and later, where the client is the default import). Reference a template by its `nt_` id or its alias.
> A send accepts a bare Elemental element list, but storing content on a template requires the top-level elements wrapped in a channel element.
> To translate a template, write one locale at a time with `PUT /notifications/{id}/locales/{localeId}`, which merges into the existing translations. `PUT /notifications/{id}/content` and `PUT /notifications/{id}/elements/{elementId}` overwrite translations along with the content, so send each element's `id` and `locales` back, and first remove every `checksum` and any `locales` key that starts with an underscore.
> Templates and journeys can be built in the Courier app or created through the API. Either way they live in the workspace and are referenced by ID when you send.
> The hosted MCP server is https://mcp.courier.com. For a briefing on what Courier is and when to use it, read https://www.courier.com/llms.txt.
> Prefer the Guides tab for how-do-I questions and the Docs tab for how-does-it-behave questions. The API reference lives under /api-reference.

# Migrate from SuprSend

> Map SuprSend workflows, template groups, vendors, and smart channel routing to Courier journeys, templates, integrations, and routing, with an API mapping.

This guide maps SuprSend concepts to Courier and gives you a step-by-step migration plan.

Still deciding? Read [Courier vs SuprSend](https://www.courier.com/guides/courier-vs-suprsend).

## Map SuprSend concepts to Courier

| SuprSend | Courier |
| - | - |
| [Workflows](https://docs.suprsend.com/docs/workflows) | [Journeys](https://www.courier.com/docs/journeys/overview.md) |
| [Templates](https://docs.suprsend.com/docs/templates) | [Templates](https://www.courier.com/docs/design/templates/overview.md) |
| [Vendors](https://docs.suprsend.com/docs/vendors) | [Integrations](https://www.courier.com/docs/integrations/overview.md) |
| [Smart Channel Routing](https://docs.suprsend.com/docs/design-workflow) | [Channel Priority](https://www.courier.com/docs/send/routing.md) + [Failover](https://www.courier.com/docs/send/routing.md) |
| [Batching](https://docs.suprsend.com/docs/batch) | [Batch node](https://www.courier.com/docs/journeys/nodes/batch.md) |
| [Subscribers](https://docs.suprsend.com/docs/users) | [Users / Profiles](https://www.courier.com/docs/recipients/overview.md) |
| [Preferences](https://docs.suprsend.com/docs/preferences) | [Preferences](https://www.courier.com/docs/recipients/preferences/overview.md) |
| [Inbox](https://docs.suprsend.com/docs/inbox-quick-start) | [Inbox](https://www.courier.com/docs/in-app/overview.md) |
| [Tenants](https://docs.suprsend.com/docs/tenants) | [Tenants](https://www.courier.com/docs/tenants/overview.md) |

### Workflows and Journeys

SuprSend [workflows](https://docs.suprsend.com/docs/workflows) orchestrate notifications with four node types: trigger, function, branch, and delivery. Courier [Journeys](https://www.courier.com/docs/journeys/overview.md) do the same with a visual builder and an API.

| SuprSend node | Courier equivalent |
| - | - |
| Trigger node | [Journey trigger](https://www.courier.com/docs/journeys/invoke.md) (API invoke, inbound webhook, Segment event, or audience membership) |
| Delay (function node) | [Delay node](https://www.courier.com/docs/journeys/nodes/delay.md) |
| Batch (function node) | [Batch node](https://www.courier.com/docs/journeys/nodes/batch.md) |
| Branch node | [Branch node](https://www.courier.com/docs/journeys/nodes/branch.md) |
| Delivery node | [Send node](https://www.courier.com/docs/journeys/nodes/send.md), one per channel |

Each [Send node](https://www.courier.com/docs/journeys/nodes/send.md) delivers one channel with its own journey template. Your product team edits that content in Design Studio while engineers change triggers, timing, and conditions on the same journey. To send email and in-app from a journey, add a Send node for each.

Build journeys visually [in the UI](https://www.courier.com/docs/journeys/build.md) or define them through the [Journeys API](https://www.courier.com/docs/journeys/build.md).

### Templates

A SuprSend [template](https://docs.suprsend.com/docs/templates) holds an editor per channel and is referenced by slug. A Courier [template](https://www.courier.com/docs/design/templates/overview.md) works the same way for direct sends: one resource with content for every channel (email, SMS, push, chat, and inbox), sent through the [Send API](https://www.courier.com/docs/send/overview.md). Content inside a journey lives in that journey's Send nodes.

[Design Studio](https://www.courier.com/docs/design/templates/design-studio.md) uses drag-and-drop content blocks. [Elemental](https://www.courier.com/docs/design/elemental/overview.md) JSON is the code-first path. Both support [Handlebars variables](https://www.courier.com/docs/design/templates/variables.md), channel-specific overrides, and [localization](https://www.courier.com/docs/design/elemental/locales.md). In Design Studio every variable names its source: `{{data.order_id}}` for send data, `{{profile.first_name}}` for the user's profile.

### Integrations

SuprSend [vendors](https://docs.suprsend.com/docs/vendors) are Courier [Integrations](https://www.courier.com/docs/integrations/overview.md): the provider connections that deliver messages, such as SendGrid, Twilio, FCM, and Slack.

Courier supports providers on every channel. Wire up multiple providers for the same channel type and Courier [fails over](https://www.courier.com/docs/send/routing.md) between them automatically. If your primary email provider goes down, traffic shifts to the backup with no code change and no manual step.

### Routing

Courier's `single` [routing method](https://www.courier.com/docs/send/routing.md) replicates SuprSend's [smart channel routing](https://docs.suprsend.com/docs/design-workflow). Courier tries channels in the order you specify and stops at the first success. The `all` method sends to every listed channel at once.

Set routing per send request or per template. Provider-level [failover](https://www.courier.com/docs/send/routing.md) layers on top, so you get fallback at both the channel and provider layers.

### Digests and batching

Courier's [Batch node](https://www.courier.com/docs/journeys/nodes/batch.md) works like SuprSend's [batch function](https://docs.suprsend.com/docs/batch). It collects a user's events and releases them as one summary when it hits a maximum item count, a quiet period with no new events, or a maximum wait. The first event's run continues to the summary send, and the rest end at the Batch node.

| Setting | Example | What it does |
| - | - | - |
| Max items | 100 | Release when 100 events arrive |
| Wait period | 5 minutes | Release after 5 minutes with no new event |
| Max wait period | 1 hour | Release within an hour of the first event, even if events keep coming |
| Include event data | Last 5 | Keep the 5 most recent events (up to 25) for the template. `Last` keeps the newest and `First` the earliest |

In the summary template, `{{batch.count}}` is the total and `data.batch.items` holds the kept events. A summary costs one send, however many events it rolls up.

For summaries that release on a schedule the user picks, like a daily or weekly digest, link the journey's Send node template to a digest topic. See [Send a daily digest](https://www.courier.com/docs/guides/send-a-daily-digest.md).

### Users and profiles

Courier [profiles](https://www.courier.com/docs/recipients/overview.md) store recipient data: email, phone, push tokens, and any custom properties. Profiles accept nested JSON, which suits structured data like subscription tiers, team roles, or feature flags.

Create profiles ahead of time through the API, or inline at send time. Pass a `user_id` that doesn't exist yet and Courier creates the profile.

### Preferences

SuprSend's [preference system](https://docs.suprsend.com/docs/preferences) supports global channel opt-outs, category-level controls, and per-category overrides. Courier [Preferences](https://www.courier.com/docs/recipients/preferences/overview.md) support the same hierarchy and enforce it at send time.

Courier also ships a [hosted preference page](https://www.courier.com/docs/guides/build-a-preference-center.md#hosted-page) you can deploy in minutes and embeddable [React components](https://www.courier.com/docs/guides/build-a-preference-center.md#embedded-component) for in-app preference centers.

### In-app notifications

Courier [Inbox](https://www.courier.com/docs/in-app/overview.md) is a real-time in-app notification center with drop-in components for [React](https://www.courier.com/docs/sdk-libraries/courier-react-web.md), [iOS](https://www.courier.com/docs/sdk-libraries/ios.md), [Android](https://www.courier.com/docs/sdk-libraries/android.md), and [Web Components](https://www.courier.com/docs/sdk-libraries/courier-web-components.md). It runs on the same delivery pipeline as email, push, and SMS, so there's no separate provider to configure.

You get read/unread state, archiving, per-user history, [toast notifications](https://www.courier.com/docs/in-app/add-toasts.md), and [tab-based organization](https://www.courier.com/docs/in-app/customize-the-inbox.md).

### Tenants

[Tenants](https://www.courier.com/docs/tenants/overview.md) work much the same on both platforms. You scope branding, preference defaults, and notification feeds to a customer organization. Set `message.context.tenant_id` on a send and Courier applies that tenant's brand and preferences. A tenant points to a [brand](https://www.courier.com/docs/design/brands.md) with `brand_id`.

## Why Courier

* **Design Studio.** Build email, SMS, push, and chat content with drag-and-drop blocks. Preview across channels, personalize with variables, and publish without deploying code.
* **Routing you control.** Priority-based fallback (`single`) or broadcast to all channels (`all`).
* **Built-in in-app channel.** Courier Inbox works without a third-party provider. Drop in a React, iOS, or Android component and deliver in-app notifications on the same pipeline as email and push.
* **Hosted preferences out of the box.** Ship a user-facing preference center with a single config, or embed React components in your app.
* **The providers you already use.** Email, SMS, push, chat, webhooks, CDPs, and observability tools. Switch providers without changing your send code.
* **Full delivery observability.** [Message Logs](https://www.courier.com/docs/monitor/overview.md) track every message from API request to provider delivery, with a timeline, error details, and rendered content inspection.

## Migrate step by step

**1. Create your Courier workspace**

[Sign up](https://app.courier.com/signup) and create a workspace. Courier gives you separate Test and Production [environments](https://www.courier.com/docs/workspaces/environments.md) with their own API keys, so you can migrate without touching live traffic.

**2. Configure integrations**

Go to **Platform → Integrations** in your Courier dashboard and connect the same providers you use as SuprSend vendors (SendGrid, Twilio, FCM, etc.). Each provider maps to a channel type (email, SMS, push, chat). Configure multiple providers per channel for [failover](https://www.courier.com/docs/send/routing.md).

If you use SuprSend's inbox, [Courier Inbox](https://www.courier.com/docs/in-app/overview.md) is already set up in production and test. No external provider needed.

**3. Recreate templates**

For each SuprSend template you send directly, create a Courier [template](https://www.courier.com/docs/design/templates/overview.md) with the same channels:

1. Create a new template for each notification type
2. Add channel-specific content blocks (email body, SMS text, push title/body, etc.)
3. Bring over your Handlebars variables with a source prefix: `{{data.order_id}}` for send data, `{{profile.first_name}}` for profile fields
4. Publish the template to make it available for sending

**4. Recreate workflows as journeys**

Recreate SuprSend workflows that use delays, batching, or branching in [Journeys](https://www.courier.com/docs/journeys/overview.md), with a Send node per channel. Build them visually [in the UI](https://www.courier.com/docs/journeys/build.md) or define them through the [Journeys API](https://www.courier.com/docs/journeys/build.md).

For notification types that need no orchestration (no delays, no batching), skip journeys and send directly via the [Send API](https://www.courier.com/docs/send/overview.md).

**5. Migrate user data**

Create Courier profiles with the same identifiers you use in SuprSend. Use the [Profiles API](https://www.courier.com/docs/api-reference/user-profiles/create-a-profile.md), or create them inline at send time.

```json theme={null}
{
  "user_id": "user_123",
  "profile": {
    "email": "sarah@acme-corp.com",
    "phone_number": "+15551234567",
    "custom": {
      "name": "Sarah Bennett",
      "plan": "enterprise"
    }
  }
}
```

**6. Set up preferences**

If you use SuprSend's preference system, recreate your structure in Courier:

1. Define [subscription topics](https://www.courier.com/docs/recipients/preferences/overview.md) that map to your SuprSend categories
2. Configure default channel routing per topic
3. Import each user's choices through the [Preferences API](https://www.courier.com/docs/api-reference/user-preferences/update-or-create-user-preferences-for-a-subscription-topic.md), before any optional notification sends from Courier

**7. Update your send calls**

Replace SuprSend's workflow trigger calls with Courier's [Send API](https://www.courier.com/docs/send/overview.md). A basic send looks like this:

```javascript Node.js theme={null}
const { requestId } = await client.send.message({
  message: {
    to: { user_id: 'user_123' },
    template: 'nt_01kx4h2jdafq8bk9aftxak4b40',
    data: {
      order_id: 'ORD-456',
      total: 79.99,
    },
  },
});
```

```python Python theme={null}
response = client.send.message(
    message={
        "to": {"user_id": "user_123"},
        "template": "nt_01kx4h2jdafq8bk9aftxak4b40",
        "data": {
            "order_id": "ORD-456",
            "total": 79.99,
        },
    },
)
```

```bash cURL theme={null}
curl -X POST https://api.courier.com/send \
  -H "Authorization: Bearer $COURIER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": {
      "to": { "user_id": "user_123" },
      "template": "nt_01kx4h2jdafq8bk9aftxak4b40",
      "data": {
        "order_id": "ORD-456",
        "total": 79.99
      }
    }
  }'
```

```ruby Ruby theme={null}
response = courier.send_.message(
  message: {
    to: { user_id: "user_123" },
    template: "nt_01kx4h2jdafq8bk9aftxak4b40",
    data: { order_id: "ORD-456", total: 79.99 }
  }
)
```

```go Go theme={null}
response, err := client.Send.Message(context.TODO(), courier.SendMessageParams{
	Message: courier.SendMessageParamsMessage{
		To: courier.SendMessageParamsMessageToUnion{
			OfUserRecipient: &shared.UserRecipientParam{
				UserID: courier.String("user_123"),
			},
		},
		Template: courier.String("nt_01kx4h2jdafq8bk9aftxak4b40"),
		Data: map[string]any{
			"order_id": "ORD-456",
			"total": 79.99,
		},
	},
})
```

```java Java theme={null}
SendMessageParams params = SendMessageParams.builder()
    .message(SendMessageParams.Message.builder()
        .to(JsonValue.from(java.util.Map.of("user_id", "user_123")))
        .template("nt_01kx4h2jdafq8bk9aftxak4b40")
        .data(JsonValue.from(java.util.Map.of(
            "order_id", "ORD-456",
            "total", 79.99)))
        .build())
    .build();
client.send().message(params);
```

```php PHP theme={null}
$response = $client->send->message(
  message: [
    'to' => ['userID' => 'user_123'],
    'template' => 'nt_01kx4h2jdafq8bk9aftxak4b40',
    'data' => ['order_id' => 'ORD-456', 'total' => 79.99],
  ],
);
```

```csharp C# theme={null}
SendMessageParams parameters = new()
{
    Message = new()
    {
        To = new UserRecipient { UserID = "user_123" },
        Template = "nt_01kx4h2jdafq8bk9aftxak4b40",
        Data = new Dictionary<string, JsonElement>()
        {
            { "order_id", JsonSerializer.SerializeToElement("ORD-456") },
            { "total", JsonSerializer.SerializeToElement(79.99) },
        },
    },
};

await client.Send.Message(parameters);
```

```bash CLI theme={null}
courier send message \
  --api-key "$COURIER_API_KEY" \
  --message '{"to":{"user_id":"user_123"},"template":"nt_01kx4h2jdafq8bk9aftxak4b40","data":{"order_id":"ORD-456","total":79.99}}'
```

```text MCP theme={null}
With Courier MCP, send my nt_01kx4h2jdafq8bk9aftxak4b40 template to user_123 with the order details.
```

Courier applies routing, preferences, and failover from your template and workspace configuration. For multi-channel sends, set the `routing` field:

```javascript Node.js highlight={7} theme={null}
const { requestId } = await courier.send.message({
  message: {
    to: {
      user_id: "user_123",
    },
    template: "nt_01kx4h2jdafq8bk9aftxak4b40",
    routing: {
      method: "single",
      channels: [
        "apn",
        "firebase-fcm",
        "email",
        "sms",
      ],
    },
  },
});
```

```python Python highlight={7} theme={null}
response = client.send.message(
    message={
        "to": {
            "user_id": "user_123",
        },
        "template": "nt_01kx4h2jdafq8bk9aftxak4b40",
        "routing": {
            "method": "single",
            "channels": [
                "apn",
                "firebase-fcm",
                "email",
                "sms",
            ],
        },
    },
)
```

```bash cURL highlight={10} wrap theme={null}
curl -X POST https://api.courier.com/send \
  -H "Authorization: Bearer $COURIER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": {
      "to": {
        "user_id": "user_123"
      },
      "template": "nt_01kx4h2jdafq8bk9aftxak4b40",
      "routing": {
        "method": "single",
        "channels": [
          "apn",
          "firebase-fcm",
          "email",
          "sms"
        ]
      }
    }
  }'
```

```ruby Ruby highlight={7} theme={null}
response = courier.send_.message(
  message: {
    to: {
      user_id: "user_123"
    },
    template: "nt_01kx4h2jdafq8bk9aftxak4b40",
    routing: {
      method: "single",
      channels: [
        "apn",
        "firebase-fcm",
        "email",
        "sms"
      ]
    }
  }
)
```

```go Go highlight={9} theme={null}
response, err := client.Send.Message(context.TODO(), courier.SendMessageParams{
	Message: courier.SendMessageParamsMessage{
		To: courier.SendMessageParamsMessageToUnion{
			OfUserRecipient: &shared.UserRecipientParam{
				UserID: courier.String("user_123"),
			},
		},
		Template: courier.String("nt_01kx4h2jdafq8bk9aftxak4b40"),
		Routing: courier.SendMessageParamsMessageRouting{
			Channels: []shared.MessageRoutingChannelUnionParam{
				{OfString: courier.String("apn")},
				{OfString: courier.String("firebase-fcm")},
				{OfString: courier.String("email")},
				{OfString: courier.String("sms")},
			},
			Method: "single",
		},
	},
})
```

```java Java highlight={5} theme={null}
SendMessageParams params = SendMessageParams.builder()
    .message(SendMessageParams.Message.builder()
        .to(UserRecipient.builder().userId("user_123").build())
        .template("nt_01kx4h2jdafq8bk9aftxak4b40")
        .routing(SendMessageParams.Message.Routing.builder()
            .addChannel("apn")
            .addChannel("firebase-fcm")
            .addChannel("email")
            .addChannel("sms")
            .method(SendMessageParams.Message.Routing.Method.SINGLE)
            .build())
        .build())
    .build();
SendMessageResponse response = client.send().message(params);
```

```php PHP highlight={7} theme={null}
$response = $client->send->message(
  message: [
    'to' => [
      'user_id' => 'user_123',
    ],
    'template' => 'nt_01kx4h2jdafq8bk9aftxak4b40',
    'routing' => [
      'method' => 'single',
      'channels' => [
        'apn',
        'firebase-fcm',
        'email',
        'sms',
      ],
    ],
  ],
);
```

```csharp C# highlight={7} theme={null}
SendMessageParams parameters = new()
{
    Message = new()
    {
        To = new UserRecipient { UserID = "user_123" },
        Template = "nt_01kx4h2jdafq8bk9aftxak4b40",
        Routing = new() { Channels = ["apn", "firebase-fcm", "email", "sms"], Method = Send::Method.Single },
    },
};

var response = await client.Send.Message(parameters);
```

```bash CLI highlight={5} wrap theme={null}
courier send message \
  --api-key "$COURIER_API_KEY" \
  --message.to '{"user_id": "user_123"}' \
  --message.template nt_01kx4h2jdafq8bk9aftxak4b40 \
  --message.routing '{"method": "single", "channels": ["apn", "firebase-fcm", "email", "sms"]}'
```

```text MCP theme={null}
With Courier MCP, send my nt_01kx4h2jdafq8bk9aftxak4b40 template to user_123, trying push through APNs, then FCM, then email, then SMS.
```

This tries push through APNs, then FCM, then email, then SMS.

**8. Test and cut over**

1. Send test messages in your Test environment and verify delivery in [Message Logs](https://app.courier.com/logs)
2. Validate that preferences, routing, and template rendering match your SuprSend setup
3. Switch your production code to Courier's Production API key
4. Monitor [Message Logs](https://www.courier.com/docs/monitor/overview.md) and [Analytics](https://www.courier.com/docs/monitor/overview.md) for delivery confirmation

## Map the API

| Operation | SuprSend | Courier |
| - | - | - |
| Send a notification | `POST /trigger/` | [`POST /send`](https://www.courier.com/docs/api-reference/send/send-a-message) |
| Create/update a user | `POST /v1/user/{distinct_id}/` | [`POST /profiles/{user_id}`](https://www.courier.com/docs/api-reference/user-profiles/create-a-profile) |
| Get a user | `GET /v1/user/{distinct_id}/` | [`GET /profiles/{user_id}`](https://www.courier.com/docs/api-reference/user-profiles/get-a-profile) |
| Set user preferences | `PATCH /v1/user/{distinct_id}/preference/category/{category_slug}/` | [`PUT /users/{user_id}/preferences/{topic_id}`](https://www.courier.com/docs/api-reference/user-preferences/update-or-create-user-preferences-for-a-subscription-topic) |
| Get message status | `GET /v1/message/` (list and filter) | [`GET /messages/{message_id}`](https://www.courier.com/docs/api-reference/messages/get-message) |
| Create/update tenant | `POST /v1/tenant/{tenant_id}/` | [`PUT /tenants/{tenant_id}`](https://www.courier.com/docs/api-reference/tenants/create-or-replace-a-tenant) |
