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

# OpenAPI Specification

> Use the Conduit OpenAPI spec to generate typed API clients

## OpenAPI Spec

The Conduit API publishes an [OpenAPI 3.0](https://spec.openapis.org/oas/v3.0.3) specification that describes every endpoint, request body, response schema, and error code.

The spec is available at `/v2/api-docs/openapi.json` on any environment:

| Environment | URL                                                              |
| ----------- | ---------------------------------------------------------------- |
| Production  | `https://api.conduit.financial/v2/api-docs/openapi.json`         |
| Sandbox     | `https://api.sandbox.conduit.financial/v2/api-docs/openapi.json` |

The spec is generated dynamically from the API source code, so it always reflects the current state of the API.

## Generate a Typed Client

Use the OpenAPI spec to generate a typed API client in any language. The full spec URLs are listed above — substitute `https://api.sandbox.conduit.financial/v2/api-docs/openapi.json` for sandbox or `https://api.conduit.financial/v2/api-docs/openapi.json` for production. The examples below use the sandbox spec.

### TypeScript / JavaScript

Using [openapi-typescript](https://github.com/openapi-ts/openapi-typescript):

```bash theme={null}
npx openapi-typescript https://api.sandbox.conduit.financial/v2/api-docs/openapi.json -o conduit-api.d.ts
```

Using [Orval](https://orval.dev) (generates fetch/axios clients with React Query hooks):

```bash theme={null}
npx orval --input https://api.sandbox.conduit.financial/v2/api-docs/openapi.json --output ./src/api
```

### Python

Using [openapi-python-client](https://github.com/openapi-generators/openapi-python-client):

```bash theme={null}
pip install openapi-python-client
openapi-python-client generate --url https://api.sandbox.conduit.financial/v2/api-docs/openapi.json
```

### Any Language

Using [OpenAPI Generator](https://openapi-generator.tech) (supports 50+ languages):

```bash theme={null}
npx @openapitools/openapi-generator-cli generate \
  -i https://api.sandbox.conduit.financial/v2/api-docs/openapi.json \
  -g <language> \
  -o ./conduit-client
```

Replace `<language>` with your target: `typescript-fetch`, `python`, `go`, `java`, `ruby`, `csharp`, `kotlin`, `swift`, etc.

## Import into Postman

You can import the OpenAPI spec directly into Postman for interactive API exploration:

1. Open Postman and click **Import**
2. Select **Link** and paste the spec URL: `https://api.sandbox.conduit.financial/v2/api-docs/openapi.json`
3. Postman generates a collection with all endpoints, request bodies, and example responses
4. Set the `x-api-key` variable in your Postman environment to authenticate requests
