Skip to content
Documentation sections

API and integration

Where do I find my API key?

In the Safecube web application, open Developers in the sidebar, then the API Credentials tab, open to Admins and Owners on every plan. Copy key copies the key, even while it is masked. A workspace has a single key: Rotate API key replaces it, and the old key stops working at once.

The tab is described in API credentials.

What is the API rate limit?

The current limit is 10 requests per 10 seconds per API key, counted across every endpoint, and it is subject to change. A request above it receives 429 Too Many Requests and can be retried once the 10-second window has moved on. To track many containers, webhooks avoid polling the API for each one.

The limit is described in Rate limits.

Should I poll the API or use webhooks?

The Container Tracking API, which your application calls on demand, suits low volumes and occasional queries. The Webhooks API suits high volumes: you add your shipments to a tracking list once, and Safecube sends an event to your endpoint when new tracking data is available. For larger applications, Safecube recommends webhooks.

Both approaches are compared in Synchronous and asynchronous tracking.

Do shipments created through the API appear in the app?

Shipments created with the Shipment Management API do: POST /public/shipments creates them in your Safecube workspace, asynchronously, and an email gives the creation status and any errors once the process is complete. The same API deletes shipments and returns their public sharing links.

The API is described in Getting started with the Shipment Management API.

Is the Shipment Management API included in my plan?

Yes. The Shipment Management API is included in every Safecube plan, with no access to request, and is authenticated with the workspace's API key in the API_KEY header. Only iframe embedding of a public sharing link stays on request.

Access is described in Getting started with the Shipment Management API.

Can I embed the tracking in an iframe?

Yes, on request. Iframe embedding is part of the white label pack: Safecube must authorize the domain of the pages that embed the iframe, so the request to the Safecube team names that domain. The embedded page is the public sharing link of a shipment, returned by the Shipment Management API: read-only, with no login, in a full view or a details, map or event list view.

The request and the integration are described in Embed a shipment in an iframe.

What does AUTO_CANT_FIND_INFO mean?

The Container Tracking API answers 400 with AUTO_CANT_FIND_INFO when no information could be autodetected for the shipment number. Retry the request with both the sealine parameter, the SCAC code of the carrier, and the shipmentType parameter. A request ending in a 400 or a 500 error is not charged.

Every error is listed in Error codes.