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

# API Reference Overview

> Complete reference for all Zet API endpoints

# API Reference

The Zet API is organized around REST principles. All endpoints accept JSON request bodies and return JSON responses.

## Base URL

```
https://api.zet.money/v1
```

## Authentication

All endpoints require an API key via the `x-api-key` header. See [Authentication](/authentication) for details.

## Endpoint groups

<CardGroup cols={2}>
  <Card title="Wallets" icon="wallet" href="/api-reference/wallets/create-wallet">
    Create and manage Smart Wallets for your users.
  </Card>

  <Card title="On-Ramp" icon="arrow-up-right-dots" href="/api-reference/onramp/get-quote">
    Buy crypto with Nigerian Naira (NGN).
  </Card>

  <Card title="Off-Ramp" icon="building-columns" href="/api-reference/offramp/get-quote">
    Sell crypto for NGN to a bank account.
  </Card>

  <Card title="Swap" icon="arrows-rotate" href="/api-reference/swap/get-quote">
    Swap tokens on the same chain or across chains.
  </Card>

  <Card title="Cross-Chain Transfer" icon="bridge" href="/api-reference/transfer/get-quote">
    Bridge tokens across different blockchains.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/api-reference/webhooks/register">
    Register endpoints for real-time event notifications.
  </Card>

  <Card title="Transactions" icon="receipt" href="/api-reference/transactions/list">
    Query transaction history and details.
  </Card>
</CardGroup>

## Common patterns

### Quotes → Execute

Most operations follow a two-step pattern:

1. **Get a quote** — call the quote endpoint to get pricing, fees, and a `quoteId`
2. **Execute** — pass the `quoteId` to initiate/execute the transaction

Quotes are valid for \~5 minutes. If expired, request a new one.

### Custodial vs Non-Custodial

Every execute/initiate endpoint accepts either:

* `walletId` — for Zet-managed wallets (custodial, gasless)
* `sourceAddress` / `destinationAddress` — for user-managed wallets (non-custodial)

### Idempotency

Pass a `reference` string with your initiate/execute calls. If you retry with the same reference, the existing transaction is returned instead of creating a duplicate.

### Pagination

List endpoints support `page` and `limit` query parameters. Response includes a `meta` object with pagination info.
