Skip to main content
repost schema generate produces a native client for your language: typed models for every payload and one method per event type.
A misspelled field, a missing required field, or a string where the schema says Float is a compile error.

What every SDK does

The five SDKs are generated from the same schema and behave identically, verified by a cross-language test suite. In every language you get:
  • Payloads that match the schema exactly. Fields serialize in declaration order under their wire names, declared defaults such as now() and uuid() are filled in, and absent optional fields are omitted rather than sent as null.
  • Automatic retries. Network failures, timeouts, and retryable server responses are retried with backoff, up to four attempts, honouring Retry-After. Other errors surface immediately as typed errors.
  • Idempotency by default. If you don’t pass a key, the SDK creates one per send and reuses it across its own retries, so a flaky connection cannot produce a duplicate. Pass your own key to make repeats safe across process restarts as well.
  • A stub transport for tests. It validates and serializes for real but returns a canned result, so tests never touch the network.
  • A version check at construction. A generated client and an incompatible runtime refuse to start, with a message saying whether to regenerate or upgrade.
Configuration works the same everywhere: the client reads REPOST_SEND_API_KEY at send time (an explicit apiKey option overrides it) and REPOST_API_URL when you target something other than https://api.repost.sh.
The publish key is a server-side secret. Don’t ship an SDK in a browser, a mobile app, or anything else your users can inspect.

Pick your language

Each language has its own guide covering setup, configuration, error handling, and testing:
  • TypeScript: generated into node_modules and re-exported by @repost/client, the same pattern Prisma uses
  • Go: a generated package you commit, with tri-state Optional[T] fields
  • Python: a generated package you commit, with the UNSET sentinel for optional fields
  • Java: Maven plugin, BOM, and Spring Boot or CDI injection
  • Kotlin: Gradle plugin and a coroutine-first client
The JVM SDKs also add an overall operation deadline, bounded in-flight admission, and a five-state delivery outcome model for reconciling ambiguous failures. Their guides run several pages each.

Testing

Every SDK ships a stub transport. Swap it in and tests publish for real, without a network:
Each language guide has a testing page: TypeScript, Go, and Python. The JVM SDKs extend this into a full test kit with a recording transport and deterministic clocks; see Java testing and Kotlin testing.

Continue

HTTP API

The endpoint underneath every SDK.

Quickstart

Generate a client and publish your first event.

Defining events

What each schema construct becomes in the generated client.