Skip to main content
The C# client is generated from your .repost schema into a folder in your project: immutable model classes, a Webhooks.<Catalog>.<Member>Async() method tree, and a shared runtime that owns serialization, retries, idempotency, and delivery outcomes. The same schema and wire format back the TypeScript, Go, Python, and Java SDKs, pinned by a cross-language conformance suite. .NET 8, .NET Framework 4.7.2, or any netstandard2.0 target is supported. The runtime is server-side only — it holds a publish credential and must not ship in a client app.
The runtime package Repost.Client is version 1.0.0 and the schema engine is 0.10.0.
1

Install the CLI and the runtime package

2

Create a schema workspace

This scaffolds repost/schema.repost with a starter event and a .env file with an empty REPOST_SEND_API_KEY. A C# generator block sets three things the other languages don’t need — output, namespace, and clientName:
repost/schema.repost
output is resolved relative to the schema file, so ../Generated writes the client to a Generated/ folder next to your .csproj. Code generation explains each field and the build-time MSBuild alternative.
3

Record the schema and generate

This records your schema as a migration and generates the client into Generated/Client.cs, Descriptors.cs, and Models.cs, plus a copy of the schema and a marker file. The .cs files compile through your project’s default glob, so there is nothing to wire up.
4

Connect an environment

Create an environment in the dashboard, copy its publish API key into .env, and deploy your schema:
Load .env however your app already loads configuration; the runtime reads REPOST_SEND_API_KEY from the environment at send time.

Your first send

The generated client is IAsyncDisposable. Open it with await using; with no ApiKey set the runtime resolves the credential and endpoint from the environment on the first send:
new RepostClient(...) validates its options and runs the descriptor-version handshake at construction; a missing credential surfaces on the first send. CustomerId names the customer receiving the event. IdempotencyKey is optional; reusing it with the same payload is safe, and Reliability explains when to pass your own. The compiler rejects unknown events, missing required fields, and wrong types before a send ever leaves your process.

Continue

Code generation

What lands in Generated/, build-time MSBuild generation, and the version handshake.

Configuration

Client options, credential precedence, and transport tuning.

Reliability

Retries, idempotency, the delivery states, and the exception taxonomy.