Skip to content
Last updated

Authentication & Scopes

Every v5 request uses a bearer token:

Authorization: Bearer <token>

Tokens are scoped and can optionally expire. Create the first token in the dashboard under Settings -> Integrations -> API. A token with tokens:manage can create and revoke additional v5 tokens through the API.

Response envelope

Successful responses are wrapped in data.

{
  "data": {
    "id": 12345,
    "status": "incomplete"
  }
}

List endpoints also include meta and links for pagination.

Errors are wrapped in error and include a stable code.

{
  "error": {
    "code": "validation_failed",
    "message": "The given data was invalid.",
    "details": {
      "packages.0.weight": ["The packages.0.weight field is required."]
    }
  }
}

Branch on error.code, not the message text.

List endpoints use page and per_page. The default per_page is 25 and the maximum is 100.

GET /shipments?page=2&per_page=50

Scope vocabulary

ScopePurpose
tokens:manageManage API tokens.
addresses:validateValidate addresses before creating shipments.
rates:readQuote shipping rates.
shipments:read / shipments:write / shipments:voidShipment lifecycle.
labels:createPurchase and combine labels.
pickups:writeSchedule and cancel carrier pickups.
tracking:read / tracking:subscribeTracking lookups and notifications.
batches:read / batches:write / batches:processBulk batch flow.
ltl:read / ltl:writeLTL freight quotes and bookings.
products:read / products:writeProduct catalog updates.
products:classify / products:approveDDP classification and approval.
orders:read / orders:writeOrder CRUD.
boxes:read / boxes:writeBox preset CRUD.
automation:read / automation:writeRules, filters, lists, tags, and scheduled automations.
billing:readStatements and transactions.
credits:read / credits:writeCredit balance and top-ups.

Each operation in the API Reference lists its required scope.