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

# Partner API overview

> Base URL, X-API-Key auth, success/error envelopes, and pagination for the RaaS Widgets Partner API

## Scope

This reference covers the **Partner API** only — server-to-server calls authenticated with your `X-API-Key`.

<Note>
  **Out of scope here:** Widget API (magic-link end-user calls) and Superadmin / Leap Portal APIs. Integrate those surfaces only under separate Leap guidance.
</Note>

## Base URL

| Environment  | Base URL                                              |
| ------------ | ----------------------------------------------------- |
| Sandbox (QA) | `https://raas-widgets-backend-sandbox.up.railway.app` |

Production hosts are provided when you go live. Always develop against sandbox first.

## Authentication

Send your key on every request:

```bash theme={null}
curl https://raas-widgets-backend-sandbox.up.railway.app/partner/me \
  -H "X-API-Key: raas_sandbox_your_api_key_here"
```

| Prefix          | Environment |
| --------------- | ----------- |
| `raas_sandbox_` | Sandbox     |
| `raas_live_`    | Production  |

Manage keys in the [Partner Portal](https://raas-widgets-partner-portal-sandbox.up.railway.app/). See [Authentication](/raas-widgets/authentication).

<ParamField header="X-API-Key" type="string" required>
  Partner API key. Never embed production keys in client apps or public repos.
</ParamField>

## Success envelope

```json theme={null}
{
  "success": true,
  "data": {}
}
```

## Error envelope

```json theme={null}
{
  "success": false,
  "error": {
    "code": "INVALID_REQUEST",
    "message": "The referenceId field is required",
    "details": null
  }
}
```

### Common HTTP status codes

| Status        | Meaning                                       |
| ------------- | --------------------------------------------- |
| `200` / `201` | Success / created                             |
| `400`         | Validation error                              |
| `401`         | Missing or invalid API key                    |
| `403`         | Forbidden (flow not allowed, user blocked, …) |
| `404`         | Resource not found                            |
| `409`         | Conflict                                      |
| `429`         | Rate limited                                  |
| `500`         | Server error                                  |

## Pagination

List endpoints (links, users, operations, …) use **`page`** and **`limit`**:

```json theme={null}
{
  "success": true,
  "data": {
    "items": [],
    "pagination": {
      "page": 1,
      "limit": 20,
      "total": 85,
      "totalPages": 5
    }
  }
}
```

## Rate limits

Some endpoints publish specific limits (for example, pre-quote lite is **30 requests/minute**). For general Partner API quotas on your account, contact [support@leapfinancial.com](mailto:support@leapfinancial.com).

When you receive `429`, back off and retry with jitter.

## Where to go next

<CardGroup cols={2}>
  <Card title="Create links" icon="link" href="/raas-widgets/guides/create-links">
    `POST /partner/links` discriminated by `flow`.
  </Card>

  <Card title="Operations" icon="list" href="/raas-widgets/ops/operations">
    List and fetch transfer operations.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/raas-widgets/webhooks/overview">
    Event delivery and `X-RAAS-*` signature headers.
  </Card>

  <Card title="Quick start" icon="rocket" href="/raas-widgets/quickstart">
    Mint your first sandbox link.
  </Card>
</CardGroup>
