Skip to main content
You can send events straight to Tranthor’s Segment-compatible HTTP API. This is handy when you’d prefer to skip an external connector such as our Segment source.

Endpoints

Tranthor’s REST interface uses the same schema as Segment’s HTTP API.

Authentication

Tranthor’s REST API authenticates using Write Keys. Find yours in the dashboard at /dashboard/settings#write-key. Include write keys as an HTTP Authorization: Basic <base64(secretId:secret)> header in your requests. Copy the full value, including Basic , from the dashboard. It’s safe to include this write key in your client (e.g. your web client javascript payload). For example, you can use the following to submit an identify request to our demo workspace:

Deduplication and backfills

  • messageId is the idempotency key. An event whose messageId was already received for the same user is discarded rather than stored a second time, for every call type, so a retry or a repeated sync is safe. The request is still accepted with 204; the response carries x-tranthor-deduplicated-events with the number of events discarded this way. Requests that discard nothing omit the header.
  • The deduplication window is 30 days, the same as Customer.io’s. A messageId received more than 30 days ago is treated as new: the event is stored again and, unless it is a backfill, can start its journeys again. Give a record that changes a messageId that carries its version, rather than relying on the window.
  • To replay historical events, for example a store’s history import, set "backfill": true on each event. A backfilled event is stored and deduplicated like any other and is visible to segments and analytics, but it never starts a journey. Events without the field are live events.

Limits

  • A request body may be up to 1 MiB on the wire. Send Content-Encoding: gzip to compress it; the decompressed body may be up to 5 MiB.
  • /api/public/apps/batch accepts at most 2500 items. A larger batch is rejected with 413 and a JSON message.
  • A single event may be up to 64 KB of JSON. Larger events are dropped and the rest of the request is accepted with 204. When a request drops events, the response carries x-tranthor-dropped-events with the number discarded, so a 204 is never silent about data loss. Requests that drop nothing omit the header.
  • Requests over the rate limit get 429 with a Retry-After header (seconds). Retry after that delay.

SDK’s

Prefer using a client library? Tranthor offers platform-specific SDKs for added convenience.