# Bill of lading created

> Sent when a bill of lading is first attached to a shipment.

`eventType` is `billOfLading.created`.

Sent once, when the shipment's first bill of lading is attached. Every later version sends [`billOfLading.updated`](https://docs.mothership.com/reference/bill-of-lading-updated) with a new `url`.

## Subscribing

Add `billOfLading.created` 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: `billOfLading`.
- `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 year after Mothership built the event. It still goes out on every document event, but it doesn't say when `url` stops working.
- `createdAt` (string): When the bill of lading was created, 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 `billOfLading.created` 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": "billOfLading.created",
  "data": {
    "shipmentId": "MS123456",
    "type": "billOfLading",
    "url": "https://files.mothership.com/MS123456/billOfLading.pdf",
    "expiresAt": "2026-10-15T15:04:05.000Z",
    "createdAt": "2026-10-08T15:03:58.000Z"
  },
  "sentAt": "2026-10-08T15:04:05.000Z",
  "deliveryAttempt": 1,
  "pendingRetries": 16
}
```