POST /shipments/{id}/share

Create a public tracking link

Create a public, sanitised tracking page for a customer.

Mints a branded, revocable /s/<token> link your customer can open without an account. IDEMPOTENT: while a link is live, calling again returns the SAME url with created: false — the first one may already be in somebody’s inbox. The link is shared with the dashboard, so one minted here is the one the Share button shows. PRIVACY: the public page renders a SANITIZED view built from an allow-list — no customer, no vendor, no notes, no internal references. That is deliberate: the page is for your customer, and it must not disclose who else is on the trade. Never consumes a shipment slot.

Request

POST https://traqocontainer.com/api/v1/shipments/{id}/share

Authentication.

Your API key as a Bearer token: Authorization: Bearer YOUR_API_KEY.

Rate limit.Each API key gets 120 requests per minute by default; your key's own budget comes back in the X-RateLimit-* headers.Limits by plan.

Parameters

NameInTypeRequiredDescription
idpathstringYes

The shipment id (the name field from /shipments) OR the container / bill-of-lading number you track it by, e.g. HAMU2423388. Either works; the reference is the one a human will recognise in a support conversation.

Example request

curl -X POST "https://traqocontainer.com/api/v1/shipments/MSCU1234567/share" \
  -H "Authorization: Bearer YOUR_API_KEY"

Run it in the sandbox — no key, no account: the same request answers at https://traqocontainer.com/api/v1/sandbox/shipments/{id}/share with a schema-identical reply.

Responses

Example 201 body:

{
  "success": true,
  "data": {
    "url": "https://traqocontainer.com/s/c2FuZGJveA.sandbox-token-not-a-real-link",
    "created": true,
    "created_at": "2026-08-01T09:00:00.000Z"
  }
}
StatusMeaning
200

A live link already existed and was returned unchanged.

201

A new link was minted.

400

Bad request — check required parameters.

401

Invalid or missing API key.

403

Developer mode not enabled, or the feature is not on your plan.

404

Resource not found.

429

Rate limit exceeded — see the Retry-After header. The body names the plan the limit was computed from (plan, always the ORGANISATION’s plan, not the row your key hangs off) and what would raise it: upgrade with next_plan and next_limit_per_min, or contactUrl when there is no plan above yours. Exactly one of the two is present.

Error bodies and retry advice: Errors.