> ## Documentation Index
> Fetch the complete documentation index at: https://repost.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# SDKs

> Generated, type-safe publishing clients for TypeScript, Go, Python, Java, and Kotlin, with retries, idempotency, and a no-network test mode built in.

`repost schema generate` produces a native client for your language: typed models for every payload and one method per event type.

```ts theme={"languages":{"custom":["/languages/repost.json"]}}
await repost.webhooks.order.created({
  customerId: "acme",
  data: { id: "order-1001", currency: "EUR" },
  idempotencyKey: "order-1001-created",
});
```

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`.

<Note>
  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.
</Note>

## Pick your language

Each language has its own guide covering setup, configuration, error handling, and testing:

* [**TypeScript**](/docs/send/typescript/quickstart): generated into `node_modules` and re-exported by `@repost/client`, the same pattern Prisma uses
* [**Go**](/docs/send/go/quickstart): a generated package you commit, with tri-state `Optional[T]` fields
* [**Python**](/docs/send/python/quickstart): a generated package you commit, with the `UNSET` sentinel for optional fields
* [**Java**](/docs/send/java/quickstart): Maven plugin, BOM, and Spring Boot or CDI injection
* [**Kotlin**](/docs/send/kotlin/quickstart): 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:

```ts theme={"languages":{"custom":["/languages/repost.json"]}}
import { createRepostClient } from "@repost/client";
import { stubTransport } from "@repost/client/runtime";

const repost = createRepostClient({ apiKey: "test", transport: stubTransport });
```

Each language guide has a testing page: [TypeScript](/docs/send/typescript/testing), [Go](/docs/send/go/testing), and [Python](/docs/send/python/testing). The JVM SDKs extend this into a full test kit with a recording transport and deterministic clocks; see [Java testing](/docs/send/java/testing) and [Kotlin testing](/docs/send/kotlin/testing).

## Continue

<Columns cols={3} className="gap-y-4">
  <Card title="HTTP API" icon="globe" href="/docs/send/publishing" cta="Raw API" arrow="true">
    The endpoint underneath every SDK.
  </Card>

  <Card title="Quickstart" icon="rocket" href="/docs/send/quickstart" cta="Build it" arrow="true">
    Generate a client and publish your first event.
  </Card>

  <Card title="Defining events" icon="braces" href="/docs/send/schema" cta="Schema" arrow="true">
    What each schema construct becomes in the generated client.
  </Card>
</Columns>
