# Delivery receipt updated

> Sent when a new version of a delivery receipt is attached.

`eventType` is `deliveryReceipt.updated`.

Sent each time a new delivery receipt is attached after the first. Each version has its own `url`.

## Subscribing

Add `deliveryReceipt.updated` to a configuration's `subscribedEvents`. It needs no extra permission.

## Event data

- `shipmentId` (string): The shipment's reference number, such as `MS123456`. Pass it to Get shipment details.
- `type` (string): The kind of document. One of: `deliveryReceipt`.
- `url` (string): Where to download the document. Download it when the event arrives. To fetch it later, call List shipment documents for a current URL.
- `expiresAt` (string, deprecated): An ISO 8601 string a month after Mothership built the event. It still goes out on every document event, but it doesn't say when `url` stops working.
- `createdAt` (integer): When the document was created, in milliseconds since the Unix epoch, such as `1791471838000`. Unlike every other timestamp in a webhook, this one is a number. On the rare document with no creation time it is an ISO 8601 string instead, so accept both.
- `updatedAt` (string): When Mothership built the event for the new version, as an ISO 8601 string in UTC.

## Envelope

Mothership sends a `POST` with this JSON body. The envelope is the same on every event, and `data` holds the keys above.

- `eventType` (string): The event. Always `deliveryReceipt.updated` here. Route on it, and answer `2xx` to types you don't handle.
- `sentAt` (string): When Mothership queued the event to send, as an ISO 8601 string in UTC. Every retry and resend carries the same value, so it does not say when this attempt went out.
- `deliveryAttempt` (integer): Which send of this event this is, starting at `1`. Resends from the dashboard count too.
- `pendingRetries` (integer): How many automatic attempts are left if this one fails. `0` on the last one.

## Example request

```json Example body
{
  "eventType": "deliveryReceipt.updated",
  "data": {
    "shipmentId": "MS123456",
    "type": "deliveryReceipt",
    "url": "https://files.mothership.com/MS123456/deliveryReceipt.pdf",
    "expiresAt": "2026-10-15T15:04:05.000Z",
    "createdAt": 1791471838000,
    "updatedAt": "2026-10-08T15:04:01.000Z"
  },
  "sentAt": "2026-10-08T15:04:05.000Z",
  "deliveryAttempt": 1,
  "pendingRetries": 16
}
```