Get a one-time export download link

THE CALL, PART BY PART

method

POST

host

strait.link

version

/v1

resource

/export/token

POST /v1/export/token

Auth: secret key as Authorization: Bearer. Server-side only.

Request

Issues a token for one download of one export part: GET /v1/export?part=…&token=… works once, within 60 seconds, with no Authorization header — so a browser can save a large export directly to disk. Only the token hash is stored. Used by the dashboard (a signed-in owner or admin); a secret key works too.

Body (JSON)

part required "links" | "taps" | "events" | "installs" | "webhooks" | "worker"
from string
taps / events / installs: inclusive start
to string
taps / events / installs: exclusive end

Response

  • 201 The token
  • 400 Unknown part or a bad from / to
  • 401 Missing or invalid secret key
Request · curl
curl -X POST https://strait.link/v1/export/token \
  -H "Authorization: Bearer $SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "part": "taps",
    "from": "2026-09-01",
    "to": "2026-10-01"
  }'

The response, printed

Response 201
{
  "token": "stx_…",
  "part": "taps",
  "expiresAt": "2026-10-01T10:01:00.000Z",
  "path": "/v1/export?part=taps&token=stx_…"
}