Authentication
Send an API key as a bearer token: Authorization: Bearer bt_live_.... Company
admins create keys in Settings > API keys; a key is shown once. Scopes are read
and write, and the key's company is the tenant. Errors are RFC 7807
application/problem+json with a request_id and a type such as
https://berthtime.com/problems/rate-limited (an identifier, not a page: match on its
last path segment); every response carries
X-Request-Id and rate-limit headers (RateLimit-*); over the limit you get
429 with Retry-After.
Quick start
Track a container, bill of lading or booking
curl -X POST https://berthtime.com/api/v1/shipments \
-H "Authorization: Bearer $BERTHTIME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: po-4711" \
-d '{"reference": "MSCU1234566", "customer_reference": "PO-4711"}'ref_type and carrier (SCAC) are detected when omitted. A BL or
booking brings in all its containers. Pass callback_url to get this shipment's
updates pushed to that URL.
List shipments and read a timeline
curl https://berthtime.com/api/v1/shipments -H "Authorization: Bearer $BERTHTIME_API_KEY"
curl https://berthtime.com/api/v1/shipments/{shipment_id}/events -H "Authorization: Bearer $BERTHTIME_API_KEY"Lists use cursor pagination (next_cursor → cursor). Reads only
read stored data; they never call a carrier. BerthTime updates every shipment automatically in
the background: last_fetched_at says when it was last updated and
next_refresh_at when the next update is planned. There is no manual refresh.
Webhooks
Register an endpoint with POST /api/v1/webhooks. Every delivery is signed:
BerthTime-Signature: t=<unix>,v1=<hex>, where v1 is
HMAC-SHA256 of t + "." + body with the endpoint secret.
import hashlib, hmac
def verify(secret: str, header: str, body: bytes) -> bool:
parts = dict(p.split("=", 1) for p in header.split(","))
signed = parts["t"].encode() + b"." + body
expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, parts["v1"])Endpoints
Every public endpoint, grouped as in the interactive reference below. Base path /api/v1.
Meta
Health and service information.
| get | /api/v1/health | Health check |
| get | /api/v1/status | Service status (public) |
Auth
Sign up, log in, log out, switch company (web session).
| get | /api/v1/auth/company-name-check | Is this company name already used? |
| get | /api/v1/auth/challenge | Proof-of-work challenge |
| post | /api/v1/auth/signup | Create an account |
| post | /api/v1/auth/login | Log in |
| post | /api/v1/auth/logout | Log out |
| post | /api/v1/auth/switch-company | Switch current company |
| post | /api/v1/auth/forgot-password | Request a password reset email |
| post | /api/v1/auth/reset-password | Set a new password with an emailed token |
| post | /api/v1/auth/verify-email | Confirm the email address with the emailed token |
| post | /api/v1/auth/resend-verification | Send the verification email again |
| post | /api/v1/auth/change-email | Change the sign-in email address |
| post | /api/v1/auth/change-password | Change the password |
| get | /api/v1/auth/passkeys | My passkeys |
| post | /api/v1/auth/passkeys/register/options | Start adding a passkey |
| post | /api/v1/auth/passkeys/register | Add a passkey |
| patch | /api/v1/auth/passkeys/{passkey_id} | Rename a passkey |
| delete | /api/v1/auth/passkeys/{passkey_id} | Remove a passkey |
| post | /api/v1/auth/passkeys/login/options | Start signing in with a passkey |
| post | /api/v1/auth/passkeys/login | Sign in with a passkey |
Account
The current principal.
| get | /api/v1/me | Who am I |
| patch | /api/v1/me | Update my profile |
| get | /api/v1/me/deletion | What deleting my account does |
| post | /api/v1/me/delete | Delete my account |
| get | /api/v1/me/announcements | My in-app announcement |
| post | /api/v1/me/announcements/{campaign_id}/{event} | Report seen / click / dismiss (idempotent) |
Companies
Tenants, members, roles and invitations.
| get | /api/v1/companies | List my companies |
| post | /api/v1/companies | Create a company |
| get | /api/v1/companies/{company_id} | Get a company |
| patch | /api/v1/companies/{company_id} | Update a company |
| get | /api/v1/companies/{company_id}/logo | Company logo image |
| post | /api/v1/companies/{company_id}/logo | Upload the company logo |
| delete | /api/v1/companies/{company_id}/logo | Remove the company logo |
| get | /api/v1/companies/{company_id}/members | List members |
| patch | /api/v1/companies/{company_id}/members/{member_id} | Change a member's role |
| delete | /api/v1/companies/{company_id}/members/{member_id} | Remove a member |
| get | /api/v1/companies/{company_id}/invitations | List invitations |
| post | /api/v1/companies/{company_id}/invitations | Invite someone |
| delete | /api/v1/companies/{company_id}/invitations/{invitation_id} | Revoke an invitation |
| get | /api/v1/invitations/{token} | Preview an invitation (public) |
| post | /api/v1/invitations/accept | Accept an invitation |
API keys
Company API keys (bt_live_...), shown once.
| get | /api/v1/api-keys | List API keys |
| post | /api/v1/api-keys | Create an API key |
| delete | /api/v1/api-keys/{key_id} | Revoke an API key |
Shipments
Tracked shipments, their containers and events.
| get | /api/v1/shipments | List shipments |
| post | /api/v1/shipments | Track a shipment (single or bulk) |
| get | /api/v1/shipments/combined | List our shipments and those shared with us |
| get | /api/v1/shipments/combined/counts | Counts of the combined list per status chip |
| get | /api/v1/shipments/tags | Tags used in the list |
| get | /api/v1/shipments/export.csv | Export the list as CSV |
| get | /api/v1/shipments/merge-suggestions | Shipments of the same booking |
| post | /api/v1/shipments/{shipment_id}/merge | Merge shipments of one booking |
| get | /api/v1/shipments/{shipment_id} | Get a shipment |
| patch | /api/v1/shipments/{shipment_id} | Update a shipment |
| delete | /api/v1/shipments/{shipment_id} | Archive a shipment |
| post | /api/v1/shipments/{shipment_id}/containers | Add container numbers |
| patch | /api/v1/shipments/{shipment_id}/containers/{container_id} | Update a container (remark) |
| post | /api/v1/shipments/{shipment_id}/refresh | Refresh now (staff only) |
| get | /api/v1/shipments/{shipment_id}/events | Shipment timeline |
| get | /api/v1/shipments/{shipment_id}/changes | Shipment change history |
| get | /api/v1/shipments/{shipment_id}/callback-deliveries | Callback delivery log |
| post | /api/v1/shipments/{shipment_id}/shares | Tag connections |
| delete | /api/v1/shipments/{shipment_id}/shares/{handle} | Untag a connection |
| post | /api/v1/shipments/{shipment_id}/resume | Resume a paused shipment with a credit |
| post | /api/v1/shipments/{shipment_id}/track | Track a draft |
| get | /api/v1/shipments/{shipment_id}/watch | Your "tracks again" watch |
| put | /api/v1/shipments/{shipment_id}/watch | Tell me when it tracks again |
| delete | /api/v1/shipments/{shipment_id}/watch | Stop the "tracks again" watch |
Sharing
Public read-only tracking links (/t/{token}): one per shipment, regenerate or disable any time.
| get | /api/v1/shipments/{shipment_id}/share | Get the share link |
| post | /api/v1/shipments/{shipment_id}/share | Create the share link (or return the active one) |
| patch | /api/v1/shipments/{shipment_id}/share | Change share link options |
| delete | /api/v1/shipments/{shipment_id}/share | Disable the share link |
| post | /api/v1/shipments/{shipment_id}/share/regenerate | Regenerate the share link |
| get | /api/v1/public/track/{token} | Public tracking page data |
Reference data
Carrier coverage and reference detection.
| get | /api/v1/carriers | Carrier coverage |
| post | /api/v1/detect | Detect reference type and carrier |
| post | /api/v1/detect/parse | Extract references from text |
| get | /api/v1/containers/{number} | Look up a container |
Webhooks
Push notifications for shipment changes.
| get | /api/v1/webhooks/callback-secret | Company callback signing secret |
| post | /api/v1/webhooks/callback-secret/rotate | Rotate the company callback secret |
| get | /api/v1/webhooks | List webhook endpoints |
| post | /api/v1/webhooks | Create a webhook endpoint |
| get | /api/v1/webhooks/{webhook_id} | Get a webhook endpoint |
| patch | /api/v1/webhooks/{webhook_id} | Update a webhook |
| delete | /api/v1/webhooks/{webhook_id} | Delete a webhook endpoint |
| post | /api/v1/webhooks/{webhook_id}/test | Send a test event |
| get | /api/v1/webhooks/{webhook_id}/deliveries | Delivery log |
Notifications
Email alert rules, digests, unsubscribe. Mail is sent from automation@berthtime.com.
| get | /api/v1/notification-rules | List alert rules |
| post | /api/v1/notification-rules | Create an alert rule |
| get | /api/v1/notification-rules/{rule_id} | Get an alert rule |
| patch | /api/v1/notification-rules/{rule_id} | Update an alert rule |
| delete | /api/v1/notification-rules/{rule_id} | Delete an alert rule |
| get | /api/v1/email-types | Every email BerthTime sends |
| get | /api/v1/me/notification-preferences | My notification preferences |
| patch | /api/v1/me/notification-preferences | Update my notification preferences |
| put | /api/v1/me/notification-preferences/rules/{rule_id} | Opt in to / out of one alert rule |
| post | /api/v1/me/notification-preferences/test | Send me a test email |
| get | /api/v1/unsubscribe | What an unsubscribe link does (public) |
| post | /api/v1/unsubscribe | Unsubscribe (public, one-click) |
Usage
Plan, billable shipments per month, overage.
| get | /api/v1/usage | Plan and usage for a month |
| get | /api/v1/usage/shipments | Shipments counted in a month |
| get | /api/v1/usage/paid-backup | Trial: paid-backup containers used / left |
Billing
Stripe subscription: checkout, customer portal, webhook. 404 when billing is disabled.
| get | /api/v1/billing | Billing status |
| post | /api/v1/billing/checkout | Start a subscription |
| post | /api/v1/billing/portal | Manage billing |
| post | /api/v1/billing/subscription/resume | Keep my subscription (undo a scheduled cancellation) |
| post | /api/v1/billing/packs/checkout | Buy a shipment pack |
| get | /api/v1/billing/credits | Shipment credits |
Support
Contact form and support tickets (BT-1001): your company's requests, replies, close / reopen.
| get | /api/v1/support/tickets | Your company's support requests |
| post | /api/v1/support/tickets | New support request |
| get | /api/v1/support/tickets/{ticket_id} | A support request with its thread |
| post | /api/v1/support/tickets/{ticket_id}/messages | Reply |
| post | /api/v1/support/tickets/{ticket_id}/close | Close (solved, no answer needed) |
| post | /api/v1/support/tickets/{ticket_id}/reopen | Reopen |
| post | /api/v1/public/contact | Contact form (creates a ticket) |
| get | /api/v1/public/support/{token} | Ticket thread from an emailed link |
| post | /api/v1/public/support/{token}/messages | Reply from an emailed link |
Branding & portal
White-label branding, the customer tracking portal (/p/{slug}) and custom domains (Business and up; domains: Scale).
| get | /api/v1/branding | Branding and portal settings |
| put | /api/v1/branding | Update branding and portal settings |
| post | /api/v1/branding/logo | Upload the logo |
| delete | /api/v1/branding/logo | Remove the logo |
| put | /api/v1/branding/domain | Set the custom portal domain |
| delete | /api/v1/branding/domain | Remove the custom domain |
| post | /api/v1/branding/domain/verify | Check the DNS records now |
| get | /api/v1/public/portal/{slug} | Customer portal (public) |
| post | /api/v1/public/portal/{slug}/search | Search a portal |
| get | /api/v1/public/logo/{sha256} | Logo image (public) |
| get | /api/v1/public/portal-by-host | Portal slug for a custom domain |
| get | /api/v1/public/domain-allowed | Caddy on-demand TLS ask endpoint |
MCP
Model Context Protocol server for AI assistants.
| post | /api/v1/mcp | MCP server (Streamable HTTP) |
Network
| get | /api/v1/network/handle-check | Is this @handle free? |
| get | /api/v1/network/lookup | Look up one exact @handle |
| get | /api/v1/network/summary | Network badges |
| get | /api/v1/network/logo/{handle} | Logo of a connection |
| get | /api/v1/network/connections | Connections + requests |
| post | /api/v1/network/connections | Send a connection request |
| post | /api/v1/network/connections/{connection_id}/accept | Accept an incoming request |
| post | /api/v1/network/connections/{connection_id}/decline | Decline an incoming request |
| delete | /api/v1/network/connections/{connection_id} | Cancel a request or remove a connection |
| get | /api/v1/network/requests/outgoing | Tracking requests we sent |
| get | /api/v1/network/invite | Our invite link |
| post | /api/v1/network/invite | Create the invite link |
| delete | /api/v1/network/invite | Revoke the invite link |
| get | /api/v1/network/invites/{token} | Invite page (public) |
| get | /api/v1/network/invites/{token}/logo | Logo on the invite page (public) |
| post | /api/v1/network/invites/{token}/accept | Connect through an invite link |
| get | /api/v1/shared/shipments | Shipments shared with us |
| post | /api/v1/shared/shipments/seen | Mark all shares seen |
| get | /api/v1/shared/shipments/{shipment_id} | A shipment shared with us |
| post | /api/v1/shared/shipments/{shipment_id}/accept-tracking | Accept a tracking request |
| post | /api/v1/shared/shipments/{shipment_id}/decline-tracking | Decline a tracking request |
| post | /api/v1/shared/shipments/{shipment_id}/stop-tracking | Stop paying for a shipment's tracking |
OAuth (MCP)
| post | /api/v1/oauth/register | Register an OAuth client (RFC 7591) |
| get | /api/v1/oauth/authorize | Authorization endpoint |
| get | /api/v1/oauth/authorize/details | Consent page data (web app) |
| post | /api/v1/oauth/authorize/decision | Consent decision (web app) |
| post | /api/v1/oauth/token | Token endpoint |
| post | /api/v1/oauth/revoke | Token revocation (RFC 7009) |
| get | /api/v1/oauth/grants | Connected AI apps |
| delete | /api/v1/oauth/grants/{grant_id} | Disconnect an AI app |
Mobile app
| get | /api/v1/mobile/devices | My registered devices |
| post | /api/v1/mobile/devices | Register this app install for push |
| delete | /api/v1/mobile/devices/{device_id} | Unregister a device |
Check-in
| get | /api/v1/public/checkin/{token} | Check-in answer page: state (records nothing) |
| post | /api/v1/public/checkin/{token}/answer | Record "how did you find us" |
| post | /api/v1/public/checkin/{token}/comment | Send the optional comment |
Interactive reference
Try the endpoints below with your API key (Authorize).