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

# API Introduction

> Overview of the Proxy API

# API Reference

The Proxy API enables you to programmatically manage customers, agents, cards, and transactions.

## Base URL

```
https://api.useproxy.ai/v1
```

## Request Format

All requests use JSON bodies and require the `Content-Type: application/json` header.

```bash theme={"system"}
curl -X POST https://api.useproxy.ai/v1/customers \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"type": "consumer", "email": "alice@example.com"}'
```

## Response Format

Responses are JSON with consistent structure:

```json theme={"system"}
{
  "id": "cust_xxx",
  "type": "consumer",
  "email": "alice@example.com",
  "createdAt": "2024-01-15T10:30:00Z"
}
```

## Errors

Errors return appropriate HTTP status codes with details:

```json theme={"system"}
{
  "error": {
    "code": "invalid_request",
    "message": "Email is required"
  }
}
```

| Status | Description                        |
| ------ | ---------------------------------- |
| 400    | Bad request - invalid parameters   |
| 401    | Unauthorized - invalid API key     |
| 404    | Not found - resource doesn't exist |
| 429    | Rate limited - too many requests   |
| 500    | Server error                       |

## Idempotency

For POST requests, include an `Idempotency-Key` header to ensure operations are only performed once:

```bash theme={"system"}
curl -X POST https://api.useproxy.ai/v1/cards \
  -H "Authorization: Bearer your_api_key" \
  -H "Idempotency-Key: unique-request-id" \
  -d '{"customerId": "cust_xxx"}'
```

Idempotency keys are cached for 24 hours.

## Pagination

List endpoints support pagination:

```bash theme={"system"}
curl "https://api.useproxy.ai/v1/transactions?limit=10&cursor=cur_xxx" \
  -H "Authorization: Bearer your_api_key"
```

Response includes pagination info:

```json theme={"system"}
{
  "data": [...],
  "hasMore": true,
  "nextCursor": "cur_yyy"
}
```

## Rate Limits

| Tier       | Requests/minute |
| ---------- | --------------- |
| Standard   | 100             |
| Pro        | 1000            |
| Enterprise | Custom          |

## Next Steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/api-reference/authentication">
    Set up API authentication
  </Card>

  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Make your first API call
  </Card>
</CardGroup>
