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

# SDKs & Code Examples

> No official client libraries are published yet — here's how to integrate directly and how to generate your own typed client.

<Note>
  **Official SDKs aren't available yet.** Official client libraries for the Partner API aren't published yet. Every operation in the API Reference includes ready-to-use cURL, JavaScript, and Python samples generated directly from the API's OpenAPI spec in the meantime — for most integrations, that's a complete starting point without needing a dedicated package.
</Note>

## Calling the API directly

The three languages shown throughout this documentation cover the common cases:

**cURL** — for exploring an endpoint or debugging from a terminal.

```bash theme={null}
curl "https://api.spenza.com/api/v1.1/sims" \
  -H "Authorization: Bearer $SPENZA_TOKEN"
```

**JavaScript (`fetch`)** — no dependency needed in Node.js 18+ or any modern browser/edge runtime.

```js theme={null}
const res = await fetch("https://api.spenza.com/api/v1.1/sims", {
  headers: { Authorization: `Bearer ${token}` },
});
const { data, meta } = await res.json();
```

**Python (`requests`)**

```python theme={null}
import requests

res = requests.get(
    "https://api.spenza.com/api/v1.1/sims",
    headers={"Authorization": f"Bearer {token}"},
)
data = res.json()["data"]
```

Every operation's page in the reference has these three pre-filled with that operation's actual path, parameters and body — copy them directly rather than retyping from this page.

## Generating a typed client from the OpenAPI spec

The full API surface is published as an OpenAPI 3.1 document at **[`/openapi.yaml`](/openapi.yaml)**. You can point standard, widely-used open-source generators at it to get a typed client in your language without waiting on an official SDK:

```bash theme={null}
# TypeScript types only (lightweight, no runtime dependency)
npx openapi-typescript ./openapi.yaml -o spenza-api.d.ts

# Full client generation (many languages: TypeScript, Python, Go, Java, ...)
npx @openapitools/openapi-generator-cli generate \
  -i ./openapi.yaml \
  -g typescript-fetch \
  -o ./generated/spenza-client
```

These are general-purpose, third-party tools — not something Spenza maintains or supports directly — but because the spec is the same source of truth this documentation is generated from, a client built from it stays in sync with what's actually documented here.

## Next steps

* **[Quickstart](/quickstart)** for a complete flow using the raw-HTTP approach.
* **API Reference** (sidebar) for every endpoint's pre-built code samples.
