---
title: "OpenAPI schema"
icon: "code"
description: "Download the machine-readable OpenAPI 3.1 schema for the Lending API"
---

> For the complete documentation index, see [llms.txt](/llms.txt).

The full Lending API schema is published as a single OpenAPI 3.1 document.
Point your tooling or your AI coding assistant at it directly.

<CardGroup cols={2}>
  <Card title="Download openapi.json" icon="code" href="/openapi.json">
    OpenAPI 3.1, version `v2.2`
  </Card>
  <Card title="Download full documentation as .txt" icon="file-lines" href="/llms-full.txt">
    Every page in one file, for AI tools
  </Card>
</CardGroup>

<Prompt description="Fetch it from your terminal" actions={["copy"]}>
curl -O https://lending-api-docs.iwoca.co.uk/openapi.json
</Prompt>

## What's inside

| | |
|---|---|
| Specification | OpenAPI 3.1 |
| API version | `v2.2` |
| Endpoints | 18 paths, 26 operations |
| Webhook events | 10, under the top-level `webhooks` map |
| Authentication | Bearer token — see [Access the API](/guides/getting-started/authentication) |

## Webhook payload schemas

Every webhook event carries its full payload schema in the same document, under the
top-level `webhooks` map — the OpenAPI 3.1 feature designed for exactly this.

<Note>
If you have previously had to reverse-engineer webhook payloads from example JSON, this is
the structured description you were missing. `application_offered` alone documents 17 fields.
</Note>

## Using it with tooling

<Tabs>
  <Tab title="Postman">
    **Import → Link**, then paste `https://lending-api-docs.iwoca.co.uk/openapi.json`. Postman
    generates a collection covering every endpoint.
  </Tab>
  <Tab title="Insomnia">
    **Import From → URL**, then paste the same link.
  </Tab>
  <Tab title="Code generation">
    The schema works with `openapi-generator`, `oapi-codegen` and similar tools:

    ```bash
    openapi-generator generate \
      -i https://lending-api-docs.iwoca.co.uk/openapi.json \
      -g typescript-fetch \
      -o ./iwoca-client
    ```
  </Tab>
</Tabs>

<Warning>
The schema is **fully dereferenced** — every `$ref` is expanded in place, so there is no `components/schemas` section.
Generated clients will therefore produce inline anonymous types rather than named, reusable models.
If that causes you a problem, tell us.
</Warning>
