Code samples

A companion repository of runnable starter projects shows the same workflow — authenticate, list projects, create a project — in several languages. Clone it and use whichever language fits your stack as a starting point for your own integration.

Get the samples

git clone https://github.com/Stardraw/stardraw-cloud-samples.git
cd stardraw-cloud-samples

Each sample reads your credentials from environment variables, so nothing secret is committed:

export STARDRAW_EMAIL="you@example.com"
export STARDRAW_PASSWORD="YOUR_PASSWORD"
# optional, defaults to https://stardraw.cloud/api/v1/
export STARDRAW_BASE="https://stardraw.cloud/api/v1/"

Languages

LanguageWhat it shows
cURLPlain HTTP scripts — get a token, list projects, create a project.
JavaScript / TypeScriptNode with openapi-fetch and types generated from the public OpenAPI document.
PythonA small httpx client with token refresh and the same example calls.
C#A minimal console app using HttpClient.

Generated client SDKs

The samples above hand-write the HTTP calls. For a fully typed client instead, the openapi-generator/ folder generates an SDK straight from the OpenAPI document with openapi-generator, so you call the API through typed methods like getApplication(), getProjectsGrid(…) and createProject(…). Each language has a generate.sh that reads the spec from the SPEC environment variable (defaulting to the live document) and writes the client into a git-ignored generated/ directory — you regenerate it rather than commit it.

LanguageGenerator
TypeScripttypescript-fetch
Pythonpython
C#csharp
Javajava

openapi-generator is a Java tool, so generating needs a Java runtime — the scripts invoke it through the @openapitools/openapi-generator-cli npm wrapper — alongside each language’s own toolchain.

Webhook receivers

The webhooks/ folder holds a minimal receiver per language that verifies the Standard Webhooks signature and handles the event, plus two cURL scripts that register an endpoint and list its deliveries through the Admin API (curl/05-register-webhook.sh and curl/06-list-deliveries.sh).

LanguageWhat it shows
JavaScriptwebhooks/javascript — Express with express.raw and the standardwebhooks package.
Pythonwebhooks/python — FastAPI reading the raw body and verifying with standardwebhooks.
C#webhooks/csharp — an ASP.NET Core minimal API verifying the HMAC by hand.

The event catalog, the envelope and the signature scheme they implement are described on the Webhooks page.

Every sample also demonstrates honoring a 429 / Retry-After response (see Conventions). You’ll need a Stardraw Cloud account to run them — the credentials drive the password grant.