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

> ## Agent Instructions
> Shippo is a multi-carrier shipping API. For agent integrations that execute shipping operations (rates, labels, tracking, address validation, customs), connect the hosted Shippo MCP server at https://mcp.shippo.com (per-user OAuth; setup at /guides/mcp-server). To search and read this documentation from an agent, a docs search MCP is available at https://docs.goshippo.com/mcp. Shipping workflow knowledge (agent skills and a knowledge pack) is published at https://github.com/goshippo/ai. For REST integrations start at /guides/api-quickstart; test mode uses shippo_test_ API keys.

# Tracking email notifications

> Send tracking email notifications to recipients for labels purchased through the Shippo API by linking each label to an order.

Shippo can automatically email your recipients when their package ships. This feature is tied to Orders, not to label creation alone. A label purchased through the API does not send a tracking email unless it is linked to an order.

To send tracking emails from the API, create an order, then pass that order's `object_id` in the `order` field when you purchase the label. Shippo sends the email to the `email` on the shipment's `address_to`.

## Prerequisites

Turn on tracking email notifications in the Shippo web app:

1. Log in to the [Shippo web app](https://apps.goshippo.com/).
2. Go to **Settings** > **[Tracking](https://apps.goshippo.com/settings/tracking-page)**.
3. Turn on the notification types you want to send, such as **Shipped** and **Delivered**.

> [!NOTE]
>
> **Note**
>
> If notifications are turned off in your settings, Shippo does not send any emails, even when your API requests are correct.

## How it works

Tracking emails are sent when an order is fulfilled. Purchasing a label through the API does not fulfill an order by itself.

1. You create an **order**.
2. You purchase a **label** (transaction) with the recipient's email address in the shipment's `address_to`, and set the `order` field to the order's `object_id`.
3. Shippo marks the order as shipped and emails the address in the shipment's `address_to`.

## Step 1: Create an order

Send a `POST` request to the `/orders/` endpoint.

```shell cURL theme={null}
curl https://api.goshippo.com/orders/ \
  -H "Authorization: ShippoToken <API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "to_address": {
      "name": "Jane Doe",
      "street1": "217 Clayton St.",
      "city": "San Francisco",
      "state": "CA",
      "zip": "94117",
      "country": "US",
      "email": "jane.doe@example.com",
      "phone": "+1 555 341 9393"
    },
    "placed_at": "2026-07-01T01:28:12Z",
    "order_number": "ORDER-1001",
    "order_status": "PAID",
    "weight": "1",
    "weight_unit": "lb"
  }'
```

Save the order's `object_id` from the response. You need it in step 3.

```json theme={null}
{
  "object_id": "4f2bc588e4e5446cb3f9fdb7cd5e190b",
  "order_number": "ORDER-1001",
  "order_status": "PAID",
  ...
}
```

For more on the Orders endpoint, see [Creating an order](https://docs.goshippo.com/orders/orders.md#creating-an-order).

## Step 2: Create a shipment to get rates

Create a shipment to retrieve available rates. For `address_to`, you can pass the full address or the `object_id` of the order's `to_address`. Include the recipient's `email` in `address_to`. This is the address that receives the notification.

> [!TIP]
>
> You can skip this step if you purchase the label in a single call. See option B in step 3.

```shell cURL theme={null}
curl https://api.goshippo.com/shipments/ \
  -H "Authorization: ShippoToken <API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "address_from": {
      "name": "Acme Store",
      "street1": "215 Clayton St.",
      "city": "San Francisco",
      "state": "CA",
      "zip": "94117",
      "country": "US",
      "phone": "+1 555 341 9393",
      "email": "support@example.com"
    },
    "address_to": {
      "name": "Jane Doe",
      "street1": "217 Clayton St.",
      "city": "San Francisco",
      "state": "CA",
      "zip": "94117",
      "country": "US",
      "phone": "+1 555 341 9393",
      "email": "jane.doe@example.com"
    },
    "parcels": [
      {
        "length": "10",
        "width": "8",
        "height": "4",
        "distance_unit": "in",
        "weight": "1",
        "mass_unit": "lb"
      }
    ],
    "async": false
  }'
```

Choose a rate from the response to use in the next step. For more on rates, see [First shipment](https://docs.goshippo.com/guides/generate-shipping-label.md).

## Step 3: Purchase a label linked to the order

When you create the transaction, set the `order` field to the `object_id` of the order from step 1. This links the label to the order and triggers the tracking email.

**Option A: Purchase a rate from step 2**

```shell cURL theme={null}
curl https://api.goshippo.com/transactions/ \
  -H "Authorization: ShippoToken <API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "rate": "<RATE_OBJECT_ID>",
    "label_file_type": "PDF",
    "async": false,
    "order": "<ORDER_OBJECT_ID>"
  }'
```

**Option B: Purchase a label in a single call**

```shell cURL theme={null}
curl https://api.goshippo.com/transactions/ \
  -H "Authorization: ShippoToken <API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "shipment": {
      "address_from": {
        "name": "Acme Store",
        "street1": "215 Clayton St.",
        "city": "San Francisco",
        "state": "CA",
        "zip": "94117",
        "country": "US",
        "phone": "+1 555 341 9393",
        "email": "support@example.com"
      },
      "address_to": {
        "name": "Jane Doe",
        "street1": "217 Clayton St.",
        "city": "San Francisco",
        "state": "CA",
        "zip": "94117",
        "country": "US",
        "phone": "+1 555 341 9393",
        "email": "jane.doe@example.com"
      },
      "parcels": [
        {
          "length": "10",
          "width": "8",
          "height": "4",
          "distance_unit": "in",
          "weight": "1",
          "mass_unit": "lb"
        }
      ]
    },
    "carrier_account": "<CARRIER_ACCOUNT_OBJECT_ID>",
    "servicelevel_token": "<SERVICELEVEL_TOKEN>",
    "order": "<ORDER_OBJECT_ID>"
  }'
```

For more on single-call purchases, see [Single call label creation](https://docs.goshippo.com/guides/single-call.md).

After the transaction is created, Shippo:

* Marks the linked order as `SHIPPED`.
* Emails the address in the shipment's `address_to`.

## Summary

| Step | Action | Endpoint |
| - | - | - |
| 1 | Create an order | `POST /orders/` |
| 2 | Create a shipment with the recipient's email in `address_to` to get rates (optional for single-call purchases) | `POST /shipments/` |
| 3 | Purchase a label with the order's `object_id` in the `order` field | `POST /transactions/` |

## Troubleshooting

If recipients are not receiving tracking emails, check the following:

* **The transaction has no `order` field.** Without a linked order, there is nothing to fulfill and no email is sent. Labels created through `/transactions/` or `/shipments/` alone do not send tracking emails.
* **The shipment's `address_to` has no `email`.** Shippo sends the email to this address. If it is missing, no email is sent.
* **Notifications are turned off.** Check **Settings** > **[Tracking](https://apps.goshippo.com/settings/tracking-page)** in the Shippo web app.

## Related resources

* [Orders](https://docs.goshippo.com/orders/orders.md)
* [Tracking](https://docs.goshippo.com/tracking/tracking.md)
* [First shipment](https://docs.goshippo.com/guides/generate-shipping-label.md)
* [Single call label creation](https://docs.goshippo.com/guides/single-call.md)
* [Create a shipping label API reference](https://docs.goshippo.com/api-reference/transactions/create-a-shipping-label.md)


## Related topics

- [Tracking](https://docs.goshippo.com/tracking/tracking.md)
- [Orders](https://docs.goshippo.com/orders/orders.md)
- [Upgrading from v20140211 to v20180208](https://docs.goshippo.com/api-concepts/api-upgrade-guides/v20140211-to-2018.md)
