> ## Documentation Index
> Fetch the complete documentation index at: https://open-fi.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference Overview

> Base URL, environments, and conventions used across the OpenFi API.

## Base URL

```text theme={null}
https://api.openfi.co/v1
```

Testnet requests use the same base URL. The environment is determined by which API key you send (`sk_testnet_...` vs `sk_live_...`).

## Conventions

* All request and response bodies are JSON.
* Amounts are decimal strings or numbers in the currency's major unit (e.g. `25.00` = \$25.00), not minor units, unless otherwise noted.
* All timestamps are ISO 8601 UTC.
* Idempotency: pass an `Idempotency-Key` header on any `POST` to safely retry a request.

## Resource groups

<CardGroup cols={2}>
  <Card title="Payments" icon="money-bill" href="/api-reference/payments/create-payment">
    One-time push/pull transfers. No standing authorization.
  </Card>

  <Card title="Agentic" icon="robot" href="/api-reference/agentic/create-mandate">
    Mandates, session keys, and debit pulls for recurring, agent-initiated transactions.
  </Card>

  <Card title="Identity" icon="fingerprint" href="/api-reference/identity/overview">
    Verifiable Credential issuance and verification.
  </Card>

  <Card title="Data" icon="database" href="/api-reference/oracles/overview">
    ZK-TLS financial data oracle (V2 roadmap).
  </Card>
</CardGroup>

## Errors

OpenFi uses standard HTTP status codes. Error responses share a common shape:

```json theme={null}
{
  "error": {
    "type": "invalid_request_error",
    "code": "mandate_not_found",
    "message": "No mandate found with id 'man_123'."
  }
}
```

| Status | Meaning                                                                                                            |
| ------ | ------------------------------------------------------------------------------------------------------------------ |
| `400`  | Malformed request or failed validation                                                                             |
| `401`  | Missing or invalid API key / session key                                                                           |
| `403`  | Authenticated, but not authorized for this action (e.g. session key over its velocity limit)                       |
| `404`  | Resource not found                                                                                                 |
| `409`  | Conflict (e.g. idempotency key reused with a different payload)                                                    |
| `422`  | Request understood but rejected by a rail-specific constraint (see [Supported Rails](/essentials/supported-rails)) |
| `429`  | Rate limited                                                                                                       |
| `5xx`  | OpenFi-side error                                                                                                  |
