Authentication
The API uses keys. The key is passed in the header of each request; there are no separate logins or sessions.
Authorization Header
Add the header to all requests except GET /ping:
Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxThe key looks like sk_test_ or sk_live_ followed by 48 characters of digits and letters a–f. Transmit it only over HTTPS and never embed it in website or mobile app code: the key should reside on your server.
Test and live keys
| Key | Description |
|---|---|
sk_test_… | Sandbox. Works with test carrier connections; balance is not deducted. Labels and pickups cannot be purchased with a test key (403 test_key_cannot_buy). |
sk_live_… | Live mode. Works with real carriers; purchases deduct funds from the balance. |
Where to create a key
In the dashboard, under the “API” section: specify the name, mode, permissions (via checkboxes or a preset template), and optionally expiration date, IP list, and request limit. More details in the “Keys and Permissions” section. The full key is shown only upon creation; only its hash is stored in our database. Lost keys cannot be recovered: revoke and create a new one. Revoked keys stop working immediately.
Key permissions
Each key has its own set of permissions. Grant only the minimum needed for integration: for example, the CRM bridge requires rates:read, labels:create, and tracking:read. Methods called without required permissions respond with 403 insufficient_scope.
| Key Permission | Description |
|---|---|
rates:read | Rate calculation (POST /rates). |
labels:create | Label purchase and pickup order (POST /shipments, POST /shipments/{id}/pickup). |
labels:read | Order list and details, pickup dates. |
labels:cancel | Order cancellation and pickup cancellation. |
tracking:read | Order tracking. |
balance:read | Balance viewing. |
webhooks:manage | Deprecated permission: no methods currently require it. To manage webhooks via API, use webhooks:read and webhooks:write. |
addresses:read | Список и карточка адресов (GET /addresses). |
addresses:write | Добавление, изменение и удаление адресов. |
deposits:read | Просмотр счетов на пополнение и их статуса. |
deposits:create | Создание счетов на пополнение (POST /deposits). Не входит в «все права» и в шаблоны, только боевой ключ, выдаёт владелец. |
team:read | Просмотр участников команды и приглашений. |
team:manage | Приглашения, роли и удаление участников. Не входит в «все права» и в шаблоны, только боевой ключ владельца, выдаёт владелец. |
webhooks:read | Просмотр вебхуков и журнала их доставок. |
webhooks:write | Создание, изменение и удаление вебхуков, тест, ротация секрета, повтор доставки. |
IP restriction
You can bind a list of allowed addresses to the key: single IPs and IPv4 subnets like 203.0.113.0/24. Requests from other addresses receive 403 ip_not_allowed. An empty list means "no restrictions." If your server uses a fixed address, specify it.
How to store the key
- Keep the key in an environment variable or a secret manager, not in the repository.
- Create different keys for different systems to revoke them individually.
- Restrict permissions and IP addresses. A key with purchase rights is not needed to read statuses.
- If the key might have leaked, revoke it in the dashboard and create a new one.
Authentication errors
No header: 401 unauthenticated. Invalid, revoked, or expired key: 401 invalid_key (response does not reveal if the key exists). Unauthorized IP: 403 ip_not_allowed. Insufficient rights: 403 insufficient_scope.