Authentication

All API requests require a valid API key passed as a Bearer token.

API Key Format

Keys start with sw_live_ followed by a random string:

sw_live_a3Bf9kLm2nPq7rSt...

There are no separate test keys. Every key works against your live account. See Testing for how to build an integration without buying labels.

Creating API Keys

Workspace owners create keys in the ShipWave dashboard under Settings → API Keys. Give each key a name, then choose its access:

Access optionWhat it allowsScopes granted
Shipping APIRead and write orders, stores, rates, labels, shipments, tracking, returns, products, warehouses, and webhooksread:*, write:*
Address verificationThe address verification API (/api/v1/addresses/*)addresses:verify
AI label checkoutPrepare hosted label checkouts and read their status. It cannot buy labels. See AI label checkout.parcel-checkouts:create, parcel-checkouts:status

A key can have more than one kind of access. Shipping API access does not include address verification; select both options if you need both.

Important: The full key is shown only once, when you create it. Store it securely. ShipWave keeps only a hash and a short prefix (for example sw_live_a3Bf) so you can tell your keys apart.

Using Your API Key

Pass the key in the Authorization header:

curl https://shipwave.app/api/v1/orders \
  -H "Authorization: Bearer sw_live_a3Bf9kLm2nPq7rSt..."
const res = await fetch("https://shipwave.app/api/v1/orders", {
  headers: {
    Authorization: "Bearer sw_live_a3Bf9kLm2nPq7rSt...",
  },
});

Always call the API from your server. Never put a key in browser or mobile app code.

Scopes

Each endpoint requires a scope. It depends on the resource and the HTTP method: GET and HEAD need the read scope, and POST, PUT, and DELETE need the write scope.

ResourceRead scopeWrite scope
/orders (including /orders/:id/rates and /orders/:id/labels)read:orderswrite:orders
/storesread:orders—
/shipmentsread:shipmentswrite:shipments
/trackingread:shipments—
/returnsread:returnswrite:returns
/productsread:inventorywrite:inventory
/warehousesread:warehouseswrite:warehouses
/webhooksread:*write:*
/addressesaddresses:verifyaddresses:verify

A Shipping API key holds read:* and write:*, which satisfy every read: and write: scope above. Getting rates (POST /orders/:id/rates) is a write call, so it needs write:orders.

If your key lacks the scope an endpoint needs, you get 403 FORBIDDEN:

{
  "error": {
    "code": "FORBIDDEN",
    "message": "API key lacks required scope \"write:orders\""
  }
}

Key Expiration and Rotation

Every key expires one year after it is created. The expiry date is shown next to the key in Settings → API Keys. ShipWave does not send a reminder before a key expires, so plan a rotation before that date:

  1. Create a new key.
  2. Deploy it to your integration.
  3. Revoke the old key.

Keys can overlap, so you can rotate without downtime.

An expired key returns the same 401 UNAUTHORIZED response as a missing or invalid key:

{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
}

Revoking Keys

Revoke a key under Settings → API Keys. It stops working immediately and returns 401 UNAUTHORIZED.

Errors

StatusCodeCause
401UNAUTHORIZEDMissing, invalid, revoked, or expired key
403FORBIDDENThe key lacks the scope this endpoint requires
Authentication — API Documentation | ShipWave