---
title: "Recipient notifications"
description: "Automatic emails and WhatsApp messages to your buyer at every shipment milestone, with consent rules and per-event, per-channel control."
---

SendIt can notify **your buyer**, the person receiving the package, as their order moves. Notices go out by email and WhatsApp, in Spanish, with nothing for you to build. You control which events notify and over which channel.

## What gets notified

| Event | When it fires | Email | WhatsApp |
| --- | --- | --- | --- |
| `order_confirmed` | The order moves to `CONFIRMED` | Yes | Yes |
| `label_purchased` | A label is purchased for a shipment | Yes | Yes |
| `shipment_delivered` | Tracking reaches `DELIVERED` | Yes | Yes |
| `claim_filed` | An insurance claim is filed | Yes | Yes |

Delivery happens in the background. It never delays the label purchase or the API response.

## Consent rules

- **WhatsApp requires explicit opt-in.** LFPDPPP (Mexico's data-protection law) requires consent before any message. WhatsApp is sent **only** when the shipment's linked [order](/en/orders/orders) has `customerOptInToWhatsapp: true`. A shipment with no linked order can never receive WhatsApp.
- **Email is transactional.** These are service messages about the recipient's own shipment, so no per-recipient opt-in is needed. The org-level toggle below is the control. The email comes from the order's `customerEmail`, and falls back to the destination address's contact email.
- **Test mode never notifies.** Any operation with `livemode: false` is recorded as `SKIPPED` and sends nothing real.

WhatsApp messages use Meta pre-approved templates, in Spanish (es-MX). For example, the `label_purchased` template includes the tracking number, the carrier, and the estimated delivery date.

## Control what gets sent

Toggles are **per organization, per event, per channel**. A missing toggle means **enabled** (the feature ships on): you only create rows to turn things off.

### Fetch the full matrix

```bash
curl https://api.sendit.mx/v1/notification-settings \
  -H "X-API-Key: sk_live_..."
```

```json
{
  "success": true,
  "data": [
    { "eventType": "order_confirmed", "channel": "EMAIL", "isEnabled": true, "subjectOverride": null },
    { "eventType": "order_confirmed", "channel": "WHATSAPP", "isEnabled": true },
    { "eventType": "label_purchased", "channel": "EMAIL", "isEnabled": true, "subjectOverride": "Tu guía {{trackingNumber}} está lista" },
    { "eventType": "shipment_delivered", "channel": "WHATSAPP", "isEnabled": false }
  ]
}
```

4 events × 2 channels = 8 rows with their effective values. Email rows also carry `subjectOverride`, which is `null` when you use SendIt's own subject. WhatsApp rows omit it. Any authenticated member can read the settings; the `notification_settings:read` scope applies to API keys only.

### Turn toggles off or on

```bash
curl -X PUT https://api.sendit.mx/v1/notification-settings \
  -H "X-API-Key: sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "settings": [
      { "eventType": "shipment_delivered", "channel": "WHATSAPP", "isEnabled": false }
    ]
  }'
```

Requires the `OPERATOR` role or above and the `notification_settings:write` scope. It's a partial update: you only touch the rows you send.

#### Body parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `settings` | `object[]` | - | Toggles to update. Each element carries eventType (order_confirmed \| label_purchased \| shipment_delivered \| claim_filed), channel (EMAIL \| WHATSAPP), and isEnabled (boolean). EMAIL rows also accept subjectOverride. |

Turning a channel off stops that notification org-wide. Turning WhatsApp off has no effect on messages already suppressed for lack of opt-in.

### Customize the email subject

On an `EMAIL` row, `subjectOverride` replaces SendIt's own subject. Omit it to leave the subject as is, send a string of **up to 150 characters** to replace it, or send `null` to restore the original.

```bash
curl -X PUT https://api.sendit.mx/v1/notification-settings \
  -H "X-API-Key: sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "settings": [
      {
        "eventType": "label_purchased",
        "channel": "EMAIL",
        "isEnabled": true,
        "subjectOverride": "Tu guía {{trackingNumber}} está lista"
      }
    ]
  }'
```

Each event accepts only its own variables:

| Event | Variables allowed in the subject |
| --- | --- |
| `order_confirmed` | `customerName`, `orderNumber`, `totalPrice` |
| `label_purchased` | `customerName`, `carrier`, `trackingNumber`, `estimatedDelivery` |
| `shipment_delivered` | `customerName`, `trackingNumber`, `deliveredAt` |
| `claim_filed` | `customerName`, `claimNumber`, `shipmentId` |

| Code | When | How to resolve it |
| --- | --- | --- |
| `400 INVALID_INPUT` | You sent `subjectOverride` on a `WHATSAPP` row | WhatsApp copy is Meta-approved and not editable — drop the field |
| `400 INVALID_INPUT` | The subject uses a variable that event doesn't publish | Use only the variables in the table above |
| `400 INVALID_INPUT` | The subject contains a line break or exceeds 150 characters | Send a single line of at most 150 characters |

### Put your brand on the emails

Recipient emails can carry your logo, your color, and your footer. With `publicTrackingPage` on, that same branding appears on the [public tracking page](/en/shipping/public-tracking#show-your-brand-when-enabled).

Your own branding is part of the Growth and Scale plans. On the Free plan your recipients see the SendIt brand only: a `PUT` with `logoUrl`, `accentColor`, `replyTo`, or `footerText` returns `403 PLAN_FEATURE_REQUIRED`. You can change `publicTrackingPage` on any plan. If you move down to Free, your branding stays saved and applies again when you return to a plan that includes it.

| Method | Path | Access |
| --- | --- | --- |
| `GET` | `/v1/notification-settings/branding` | Any member, or a key with `notification_settings:read` |
| `PUT` | `/v1/notification-settings/branding` | `ADMIN` role or above + `notification_settings:write` |

#### Body parameters

| Prop | Type | Default | Description |
| - | - | - | - |
| `logoUrl?` | `string` | - | https URL of the logo, at most 500 characters. Renders in the email header. |
| `accentColor?` | `string` | - | Accent color as a six-digit hex value (for example #4361EE). |
| `replyTo?` | `string` | - | Address your buyer replies to, at most 320 characters. |
| `footerText?` | `string` | - | Plain-text footer, at most 500 characters. It arrives as footer on the public page. |
| `publicTrackingPage?` | `boolean` | `false` | true = show your branding on the public tracking page. It applies there only. |

`replyTo` applies to **email only** and never appears in the public response. `logoUrl` and `accentColor` apply to both.

```bash
curl -X PUT https://api.sendit.mx/v1/notification-settings/branding \
  -H "X-API-Key: sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "logoUrl": "https://cdn.tutienda.mx/logo.png",
    "accentColor": "#4361EE",
    "replyTo": "hola@tutienda.mx",
    "footerText": "Gracias por comprar en Tu Tienda.",
    "publicTrackingPage": true
  }'
```

```json
{
  "success": true,
  "data": {
    "logoUrl": "https://cdn.tutienda.mx/logo.png",
    "accentColor": "#4361EE",
    "replyTo": "hola@tutienda.mx",
    "footerText": "Gracias por comprar en Tu Tienda.",
    "publicTrackingPage": true
  }
}
```

Every field is optional, and `GET` omits the ones you never set. A brand-new organization returns `{ "success": true, "data": {} }`.

:::warning
`PUT` **replaces** the whole branding: it is not a patch. Any field you omit is cleared, and sending `{}` restores SendIt's defaults.

A `PUT` that sends only `logoUrl` leaves `publicTrackingPage` at `false` and turns off branding on the public page for every recipient. Always `GET` first, apply your change on top of what is there, and send the complete object.
:::

WhatsApp templates never change.

| Code | When | How to resolve it |
| --- | --- | --- |
| `400 INVALID_INPUT` | `logoUrl` isn't `https` or exceeds 500 characters | Host the logo on your own https URL |
| `400 INVALID_INPUT` | `accentColor` isn't a six-digit hex value | Use the `#RRGGBB` format |
| `400 INVALID_INPUT` | `replyTo` isn't a valid email, or `footerText` exceeds 500 characters | Fix the value and resend |
| `403 PLAN_FEATURE_REQUIRED` | You sent `logoUrl`, `accentColor`, `replyTo`, or `footerText` on the Free plan | Move to Growth or Scale, or send only `publicTrackingPage` |
| `403 INSUFFICIENT_SCOPE` | The key lacks `notification_settings:write` | Issue a key with that [scope](/en/api-conventions/scopes) |

### Browse the templates

`GET /v1/notification-templates` returns the template catalog, one entry per event and channel (4 × 2 = 8), so your dashboard can render a preview gallery. It is read-only and uses the `notification_settings:read` scope. Templates are **not editable**: the copy is Meta-approved for WhatsApp, or code-owned for email.

```bash
curl https://api.sendit.mx/v1/notification-templates \
  -H "X-API-Key: sk_live_..."
```

```json
{
  "success": true,
  "data": [
    {
      "eventType": "label_purchased",
      "channel": "EMAIL",
      "variables": ["customerName", "carrier", "trackingNumber", "estimatedDelivery"],
      "subject": "Tu envío está en camino — FEDMX123456789",
      "exampleBody": "Hola María,\n\nGeneramos la guía de tu envío con FedEx.\n…"
    },
    {
      "eventType": "label_purchased",
      "channel": "WHATSAPP",
      "variables": ["customerName", "carrier", "trackingNumber", "estimatedDelivery"],
      "templateName": "label_purchased",
      "exampleBody": "Hola María, …",
      "configured": true
    }
  ]
}
```

Email entries render with **your active branding and subject**: `subject` reflects your `subjectOverride` if you set one, and `exampleHtml` returns the preview with your logo, color, and footer.

WhatsApp templates are in Spanish (es-MX), Meta pre-approved, and shown unbranded. `configured` indicates whether the template is available. The email channel works independently.

## Delivery semantics

- **No duplicates.** Reprocessing the same event does not send a second message through the same channel.
- **Channels are independent.** A failure on one channel never blocks the other or your [webhooks](/en/webhooks-and-events/webhooks).

:::note
These notifications are for the **end buyer**. To notify *your system*, use [webhooks](/en/webhooks-and-events/webhooks).
:::
