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

> ## Agent Instructions
> If you are an AI assistant operating Infinite for a user, read the skill first: https://docs.infinite.dev/agent-skill.md (setup per host, tool reference, rules for moving money, journeys).
> When operating Infinite for a user, use the MCP server. Sign in at https://bot.api.infinite.dev/mcp (production, acts as the user) or send `Authorization: Bearer <key>` to https://bot.api.infinite.dev/mcp/sse. Prefer its tools over raw HTTP; use REST only for steps no tool covers, and check `get_endpoint_schema` before guessing a request shape.
> Net-new Infinite Connect (org_connect) is operator-assisted: do not grant end users shared org_connect Auth Kit membership or the shared platform org API key — those credentials are org-wide on /v1. BYO org keys onboard under that customer's org id. Operator sessions should show org_connect in get_organization_info.
> The key decides the tools. Every organization key (`sk_sandbox_…` / `sk_live_…`) gets docs, onboarding, `get_account_balance`, and request logs for your own organization. BYO organizations add payees an agent will pay with `create_payee` (payable once ACTIVE). Platform Connect sessions instead get bound-customer payment lookups (`get_quote`, `get_transfer`, `list_transfers`, `list_account_balances`), payee drafts (`create_payee_draft` / `get_payee_draft`; screening only, never payable), and transfer drafts that wait for Infinite approval (`create_transfer_draft` / `get_transfer_draft`; never POST /v1/transfers). Where offered, platform `create_transfer` files a real transfer that Infinite holds in review before funding; it cannot be submitted from DRAFT.
> An agent key (`sk_sandbox_agent_…` / `sk_live_agent_…`) moves money within that agent's limits: `create_transfer` → `submit_transfer` → `wait_for_transfer`.
> On sandbox organization-key sessions, `sandbox_approve_customer` (makes the capabilities you pass READY, and related ones may turn READY too; `request_capabilities` is not needed), `sandbox_fund_account`, and `sandbox_complete_transfer` stand in for verification, funding, and settlement, so a whole flow runs from MCP. BYO keys can pass `customerId` on each call without binding; platform sessions must bind a customer first (`create_business_customer` auto-binds, or send `X-Infinite-On-Behalf-Of`).
> When searching documentation without a key, use the docs MCP at https://docs.infinite.dev/mcp.
> Start in sandbox (https://sandbox.api.infinite.dev). Do not use production unless the user explicitly asks.
> Confirm amount, currency, and payee with the user before any payment is submitted. Pass the invoice number as `reference` on `create_transfer`; the summary says what the payee will see.
> REST amounts are integer minor units (`"4000"` = 40.00 USD). MCP payment tools take exact decimal strings (`"40.00"`). Never mix them.
> Agent denials return `403 { denial: { code, message, window, limit, used, remaining, attemptedAmount, currency }, hint }` with decimal amounts; per-transfer denials omit `used` and `remaining`. Report them to the user; do not work around them.

# Introduction

# API Reference

Welcome to the Infinite API reference documentation. Our REST API allows you to programmatically manage customers, handle verification workflows, process transfers, and more. We're also preparing to launch card issuing capabilities - stay tuned!

## Base URLs

| Environment | Base URL |
| - | - |
| Sandbox | `https://sandbox.api.infinite.dev` |
| Production | `https://api.infinite.dev` |

## CLI and MCP examples

Every endpoint page includes **CLI** and **MCP** tabs next to the usual HTTP snippets.

* **CLI** — [`@infinite_dev/cli`](https://www.npmjs.com/package/@infinite_dev/cli). Prefer typed commands (`infinite customers list`) when available; otherwise use the escape hatch `infinite api <METHOD> <path>`.
* **MCP** — [Infinite MCP Server](/guides/mcp). The tab is the natural-language prompt for an MCP-connected assistant. MCP is read-only, so write prompts note that the CLI tab executes.

## OpenAPI Specification

The complete API specification is available in OpenAPI 3.0 format:

| Environment | Swagger UI | JSON Spec |
| - | - | - |
| Sandbox | [sandbox.api.infinite.dev/api](https://sandbox.api.infinite.dev/api) | [sandbox.api.infinite.dev/api-json](https://sandbox.api.infinite.dev/api-json) |
| Production | [api.infinite.dev/api](https://api.infinite.dev/api) | [api.infinite.dev/api-json](https://api.infinite.dev/api-json) |

We recommend generating a typed OpenAPI against the file so you can update the OpenAPI very trivially and regenerate the client.

## API Versioning

The Infinite API uses URI versioning. All endpoints are prefixed with `/v1/` to indicate the API version.

```
https://api.infinite.dev/v1/customers
```

## Response Format

All API responses follow a consistent JSON format:

### Success Response

```json theme={null}
{
  "data": {
    // Resource data
  },
  "meta": {
    // Metadata (pagination, counts, etc.)
  }
}
```

### Error Response

```json theme={null}
{
  "error": "ValidationError",
  "message": "Invalid request parameters",
  "statusCode": 400,
  "details": [
    {
      "field": "email",
      "message": "Invalid email format"
    }
  ]
}
```

## HTTP Status Codes

The API uses standard HTTP status codes:

| Code | Description |
| - | - |
| `200` | OK - Request succeeded |
| `201` | Created - Resource created successfully |
| `400` | Bad Request - Invalid request parameters |
| `401` | Unauthorized - Invalid or missing API key |
| `403` | Forbidden - Insufficient permissions |
| `404` | Not Found - Resource not found |
| `422` | Unprocessable Entity - Validation error |
| `429` | Too Many Requests - Rate limit exceeded |
| `500` | Internal Server Error - Something went wrong |

## Request Headers

### Required Headers

```
Authorization: Bearer sk_live_your_api_key
Content-Type: application/json
```

## Pagination

List endpoints support pagination. Most endpoints use offset-based pagination, while high-volume endpoints (like transfers) use cursor-based pagination.

### Offset-Based Pagination

Used by most list endpoints (customers, accounts, etc.).

**Request**

```bash theme={null}
curl "https://api.infinite.dev/v1/customers?limit=20&offset=0" \
  -H "Authorization: Bearer sk_live_..."
```

**Response**

```json theme={null}
{
  "data": [...],
  "total": 150,
  "limit": 20,
  "offset": 0
}
```

**Parameters**

* `limit` - Number of items to return (1-1000, default 50)
* `offset` - Number of items to skip (default 0)

### Cursor-Based Pagination

Used by high-volume endpoints like transfers for better performance with large datasets.

**Request**

```bash theme={null}
curl "https://api.infinite.dev/v1/transfers?page_size=20&starting_after=txn_abc123" \
  -H "Authorization: Bearer sk_live_..."
```

**Response**

```json theme={null}
{
  "has_more": true,
  "page_size": 20,
  "url": "https://api.infinite.dev/v1/transfers?page_size=20&starting_after=txn_abc123",
  "data": [...],
  "page_next": "https://api.infinite.dev/v1/transfers?starting_after=txn_xyz789&page_size=20",
  "page_prev": null
}
```

**Parameters**

* `page_size` - Number of items to return (1-1000, default 50)
* `starting_after` - ID of the last item from the previous page

## Data Types

### Enums

Enum values use `SCREAMING_SNAKE_CASE` (e.g., `PENDING`, `IN_PROGRESS`, `PROOF_OF_ADDRESS`).

**Exception:** Payment rails use lowercase (e.g., `ach`, `wire`, `swift`, `sepa`).

### Dates and Timestamps

* **Dates** (without time): `YYYY-MM-DD` format (e.g., `2026-01-09`)
* **Timestamps** (with time): ISO 8601 format with timezone `YYYY-MM-DDTHH:mm:ssZ` (e.g., `2026-01-09T14:30:00Z`)

### Country and Currency Codes

* **Country codes**: Two-letter ISO 3166-1 alpha-2 (e.g., `US`, `GB`, `DE`)
* **Currency codes**: Three-letter ISO 4217 (e.g., `USD`, `EUR`, `USDC`)

## Filtering and Sorting

Many list endpoints support filtering and sorting:

### Filtering

```bash theme={null}
# Filter by status
curl "https://api.infinite.dev/v1/customers?status=ACTIVE"

# Filter by type
curl "https://api.infinite.dev/v1/customers?type=INDIVIDUAL"

# Filter by country
curl "https://api.infinite.dev/v1/customers?countryCode=US"
```

### Sorting

```bash theme={null}
# Sort by creation date (newest first)
curl "https://api.infinite.dev/v1/customers?sort=-createdAt"

# Sort by name (A-Z)
curl "https://api.infinite.dev/v1/customers?sort=customerName"
```

## Idempotency

To prevent duplicate requests, include an `Idempotency-Key` header with a unique value:

```bash theme={null}
curl -X POST "https://api.infinite.dev/v1/customers/individuals" \
  -H "Authorization: Bearer sk_live_..." \
  -H "Idempotency-Key: unique-request-id-123" \
  -H "Content-Type: application/json" \
  -d '{...}'
```

## Webhooks

Infinite sends webhooks for important events. Configure webhook endpoints in your dashboard to receive real-time notifications.

Common webhook events:

* `customer.created`
* `verification.completed`
* `transfer.processed`
* `invoice.paid`

See our [Webhooks Guide](/guides/webhooks) for implementation details.

## Support

Need help with the API?

* Check our [guides section](/guides/webhooks) for common integration patterns
* Review [error handling](/guides/error-handling) best practices
* Contact support at [support@infinite.dev](mailto:support@infinite.dev)


## Related topics

- [Introduction](/introduction.md)
- [Read an FX trade](/api-reference/fx/read-an-fx-trade.md)
- [Quote a transfer intent](/api-reference/transfers/quote-a-transfer-intent.md)
- [Simulate account funding](/api-reference/sandbox/simulate-account-funding.md)
- [Save individual customer verification](/api-reference/customers/save-individual-customer-verification.md)
