> ## 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.

# Send SMS with Sinch Engage through Courier

> Connect Sinch Engage (formerly MessageMedia) with an API key and secret, and sync delivery status into your message logs through a Courier webhook URL.

> [!NOTE]
>
> Sinch Engage is MessageMedia rebranded after the Sinch acquisition. It is a different product from [Sinch](https://www.courier.com/docs/integrations/sms/sinch.md), which is its own integration with its own credentials.
>
> The catalog also lists **Sinch Engage / MessageMedia** under the provider key `messagemedia`. It takes the same API key and secret and sends the same way, so an integration already on `messagemedia` keeps working and needs no migration. Use `sinch-engage` for a new integration.

Keep Sinch Engage as your SMS provider. Courier sends through your Sinch Engage account and adds [templates](https://www.courier.com/docs/design/templates/overview.md), [user preferences](https://www.courier.com/docs/recipients/preferences/overview.md), [failover to a backup provider](https://www.courier.com/docs/send/routing.md#failover), [message logs](https://www.courier.com/docs/monitor/logs.md), and more channels like email, push, and [in-app Inbox](https://www.courier.com/docs/in-app/overview.md).

Sinch Engage bills you for SMS delivery, and Courier [bills per send](https://www.courier.com/docs/workspaces/billing.md).

## Prerequisites

* [A Sinch Engage account](https://app.sinch.com/)
* Access to API settings in the console

## Setup

In the [console](https://app.sinch.com/api-settings):

**1. Create a new API key**

Create a new API key.

**2. Copy the API key and secret**

Save the `api_secret` now. The console won't show it again.

In Courier, open the [Sinch Engage integration](https://app.courier.com/integrations/catalog/sinch-engage) page, paste your credentials, and click "Save."

![Sinch Engage console dialog titled New API Credentials Created, showing an API key and API secret (masked) with Copy to clipboard and Ok buttons](https://mintcdn.com/courier-4f1f25dc/D_fBeiYVONa8hiXh/assets/sinch-engage-api-key.webp?fit=max\&auto=format\&n=D_fBeiYVONa8hiXh\&q=85\&s=062583e95e29052d31d8115bfb81e520)

API key in the console

Addressing a recipient and sending are the same on every SMS provider, so they are documented once: [profile requirements](https://www.courier.com/docs/integrations/sms/overview.md#profile-requirements) and [send to a recipient](https://www.courier.com/docs/integrations/sms/overview.md#send-to-a-recipient).

## Overrides

[How overrides work](https://www.courier.com/docs/send/overrides.md#how-overrides-work) covers the two levels and which one wins.

Overrides change the request body, config, and headers Courier sends to Sinch Engage. Override `apiKey`, `apiSecret`, `isHmacEnabled`, and `url` via `config`, and any [SendMessages](https://developers.app.sinch.com/#tag/Messages/operation/SendMessages) body field via `body`.

```javascript Node.js highlight={8-18} theme={null}
const { requestId } = await courier.send.message({
  message: {
    template: "nt_01kx4h2jdafq8bk9aftxak4b40",
    to: {
      phone_number: "+12345678901",
    },
    providers: {
      "sinch-engage": {
        override: {
          body: {
            source_number: "+15555555555",
          },
          config: {
            apiKey: "<override API key>",
            apiSecret: "<override API secret>",
          },
        },
      },
    },
  },
});
```

```python Python highlight={8-18} theme={null}
response = client.send.message(
    message={
        "template": "nt_01kx4h2jdafq8bk9aftxak4b40",
        "to": {
            "phone_number": "+12345678901",
        },
        "providers": {
            "sinch-engage": {
                "override": {
                    "body": {
                        "source_number": "+15555555555",
                    },
                    "config": {
                        "apiKey": "<override API key>",
                        "apiSecret": "<override API secret>",
                    },
                },
            },
        },
    },
)
```

```bash cURL highlight={11-21} wrap theme={null}
curl -X POST https://api.courier.com/send \
  -H "Authorization: Bearer $COURIER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": {
      "template": "nt_01kx4h2jdafq8bk9aftxak4b40",
      "to": {
        "phone_number": "+12345678901"
      },
      "providers": {
        "sinch-engage": {
          "override": {
            "body": {
              "source_number": "+15555555555"
            },
            "config": {
              "apiKey": "<override API key>",
              "apiSecret": "<override API secret>"
            }
          }
        }
      }
    }
  }'
```

```ruby Ruby highlight={8-18} theme={null}
response = courier.send_.message(
  message: {
    template: "nt_01kx4h2jdafq8bk9aftxak4b40",
    to: {
      phone_number: "+12345678901"
    },
    providers: {
      "sinch-engage": {
        override: {
          body: {
            source_number: "+15555555555"
          },
          config: {
            apiKey: "<override API key>",
            apiSecret: "<override API secret>"
          }
        }
      }
    }
  }
)
```

```go Go highlight={10-20} theme={null}
response, err := client.Send.Message(context.TODO(), courier.SendMessageParams{
	Message: courier.SendMessageParamsMessage{
		To: courier.SendMessageParamsMessageToUnion{
			OfUserRecipient: &shared.UserRecipientParam{
				PhoneNumber: courier.String("+12345678901"),
			},
		},
		Template: courier.String("nt_01kx4h2jdafq8bk9aftxak4b40"),
		Providers: shared.MessageProvidersParam{
			"sinch-engage": shared.MessageProvidersTypeParam{
				Override: map[string]any{
					"body": map[string]any{
						"source_number": "+15555555555",
					},
					"config": map[string]any{
						"apiKey": "<override API key>",
						"apiSecret": "<override API secret>",
					},
				},
			},
		},
	},
})
```

```java Java highlight={6-14} theme={null}
SendMessageParams params = SendMessageParams.builder()
    .message(SendMessageParams.Message.builder()
        .to(UserRecipient.builder().phoneNumber("+12345678901").build())
        .template("nt_01kx4h2jdafq8bk9aftxak4b40")
        .providers(MessageProviders.builder()
            .putAdditionalProperty("sinch-engage", JsonValue.from(java.util.Map.of("override", java.util.Map.of(
                    "body", java.util.Map.of(
                        "source_number", "+15555555555"
                    ),
                    "config", java.util.Map.of(
                        "apiKey", "<override API key>",
                        "apiSecret", "<override API secret>"
                    )
                ))))
            .build())
        .build())
    .build();
SendMessageResponse response = client.send().message(params);
```

```php PHP highlight={8-18} theme={null}
$response = $client->send->message(
  message: [
    'template' => 'nt_01kx4h2jdafq8bk9aftxak4b40',
    'to' => [
      'phone_number' => '+12345678901',
    ],
    'providers' => [
      'sinch-engage' => [
        'override' => [
          'body' => [
            'source_number' => '+15555555555',
          ],
          'config' => [
            'apiKey' => '<override API key>',
            'apiSecret' => '<override API secret>',
          ],
        ],
      ],
    ],
  ],
);
```

```csharp C# highlight={9-27} theme={null}
SendMessageParams parameters = new()
{
    Message = new()
    {
        To = new UserRecipient { PhoneNumber = "+12345678901" },
        Template = "nt_01kx4h2jdafq8bk9aftxak4b40",
        Providers = new Dictionary<string, MessageProvidersType>()
        {
            {
                "sinch-engage",
                new()
                {
                    Override = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(
                        """
                        {
                          "body": {
                            "source_number": "+15555555555"
                          },
                          "config": {
                            "apiKey": "<override API key>",
                            "apiSecret": "<override API secret>"
                          }
                        }
                        """
                    ),
                }
            },
        },
    },
};

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

```bash CLI highlight={5} wrap theme={null}
courier send message \
  --api-key "$COURIER_API_KEY" \
  --message.to '{"phone_number": "+12345678901"}' \
  --message.template nt_01kx4h2jdafq8bk9aftxak4b40 \
  --message.providers '{"sinch-engage": {"override": {"body": {"source_number": "+15555555555"}, "config": {"apiKey": "<override API key>", "apiSecret": "<override API secret>"}}}}'
```

```text MCP theme={null}
With Courier MCP, send my template to +12345678901 through Sinch Engage with a different API key.
```

## Delivery tracking

Courier gives the integration a unique webhook URL. Point [the provider's webhooks](https://support.app.sinch.com/hc/en-us/articles/11108120449807-Create-manage-webhooks) at it to sync delivery updates into Courier's message logs.

Copy the URL from the [Sinch Engage integration](https://app.courier.com/integrations) in Courier, then follow these steps in the [console](https://app.sinch.com/api-settings):

**1. Create a new webhook**

Select "New Webhook".

**2. Paste Courier's webhook URL**

Paste the URL you copied.

**3. Select the delivery report events**

Under "Event", select "Message is rejected", "Message has failed", and "Message is delivered" in Delivery reports.

![Sinch Engage webhook configuration with POST selected and the Message is rejected, failed, and delivered delivery reports checked](https://mintcdn.com/courier-4f1f25dc/QkxOvtXoBgwJk0T3/assets/sinch-engage-webhook-event.webp?fit=max\&auto=format\&n=QkxOvtXoBgwJk0T3\&q=85\&s=9621eb06574481a0238b1fdeffbc6b81)

Webhook configuration

**4. Map the webhook content**

Under "Content", map the fields passed to Courier's webhook endpoint.

> [!NOTE]
>
> Only `messageId`, `receivedTimestamp`, `status`, and `statusCode` are supported.

![Sinch Engage webhook Content mapping messageId, receivedTimestamp, status, and statusCode to their matching \$ variables](https://mintcdn.com/courier-4f1f25dc/D_fBeiYVONa8hiXh/assets/sinch-engage-webhook-content.webp?fit=max\&auto=format\&n=D_fBeiYVONa8hiXh\&q=85\&s=9633af62c651ac2b0e57cb3ff653adb8)

Webhook Content Mapping

Delivery updates now appear in the message logs.

![A Courier message log for a Sinch Engage send, ending in Delivery Confirmed, with the delivered status payload](https://mintcdn.com/courier-4f1f25dc/D_fBeiYVONa8hiXh/assets/sinch-engage-log.webp?fit=max\&auto=format\&n=D_fBeiYVONa8hiXh\&q=85\&s=690d29e6690ff8fe6e9889ef780e4eb7)

Delivery Confirmation

## Provider details

```text theme={null}
sinch-engage
```

Courier recommends routing to the channel. Naming this key in `routing.channels` instead is supported, and sends through just this provider.

> [card] [Send to a specific provider](https://www.courier.com/docs/send/send-to-a-provider.md)
>
> When that is worth doing, and what you give up: failover, channel priority, and providers you add later.

> [card] [Set a send rate limit](https://www.courier.com/docs/integrations/send-rate-limits.md)
>
> Control how fast Courier sends to this provider. Sends above the rate are queued.
