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

# Introduction

> The Tavio API is a RESTful API that uses JSON for request and response bodies.

## Authentication

All requests must be authenticated using your API key in the `Authorization` header.

```bash theme={null}
Authorization: Bearer tv_live_xxxxxxxxxxxx
```

Use `tv_live_` prefixed keys for production and `tv_test_` prefixed keys for sandbox. API keys are generated and managed in the Tavio Dashboard under **Settings > API Keys**.

## Base URL

```bash theme={null}
https://api.tavio.io/v1
```

## Core Endpoints

| Method | Endpoint             | Description                 |
| :----- | :------------------- | :-------------------------- |
| `POST` | `/payments`          | Create a new payment        |
| `GET`  | `/payments/:id`      | Retrieve a payment          |
| `POST` | `/quotes`            | Get a conversion quote      |
| `POST` | `/payment-links`     | Create a payment link       |
| `GET`  | `/payment-links/:id` | Retrieve a payment link     |
| `POST` | `/invoices`          | Create an invoice           |
| `POST` | `/invoices/:id/send` | Send an invoice by email    |
| `POST` | `/payouts`           | Create a single payout      |
| `POST` | `/payouts/bulk`      | Bulk payout disbursement    |
| `GET`  | `/payouts/:id`       | Retrieve payout status      |
| `POST` | `/refunds`           | Initiate a refund           |
| `GET`  | `/transactions`      | List all transactions       |
| `POST` | `/webhooks`          | Register a webhook endpoint |

## Error Handling

All errors follow a consistent format with an HTTP status code, error code, and human-readable message.

```json theme={null}
{
  "error": {
    "code": "insufficient_liquidity",
    "message": "Unable to find a conversion path for the requested amount.",
    "docs": "https://docs.tavio.io/errors/insufficient_liquidity"
  }
}
```

| HTTP Code | Error Code               | Meaning                                 |
| :-------- | :----------------------- | :-------------------------------------- |
| **400**   | `invalid_request`        | Missing or malformed request parameters |
| **401**   | `unauthorized`           | Invalid or missing API key              |
| **404**   | `not_found`              | Resource does not exist                 |
| **409**   | `quote_expired`          | Quote has expired, request a new one    |
| **422**   | `insufficient_liquidity` | No path found for conversion            |
| **429**   | `rate_limited`           | Too many requests                       |
| **500**   | `internal_error`         | Tavio-side error                        |
