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

# Overview

> Integrate users, accounts, custody wallets, ramps and fiat payments with the Kravata Stack API.

The Kravata Stack API lets you operate on behalf of your end users: you register them, register their bank accounts and wallets, and create operations that move value between fiat and digital assets.

## Environments

| Environment | Base URL | Use |
| - | - | - |
| Test | `https://test-api-kore.kravata.co` | Development and testing. |
| Production | `https://api-kore.kravata.co` | Real operations. |

Every endpoint lives under `/api/v1`. The credentials for each environment are different.

## Typical flow

<Steps>
  <Step title="Authenticate">
    Exchange your `apiKey` and `secretKey` for an access token. See [Authentication](/stack/authentication).
  </Step>

  <Step title="Register your users">
    Register each end user with **POST /api/v1/users/register** and check their status with **GET /api/v1/admin/users**. A user must be `APPROVED` before operating.
  </Step>

  <Step title="Register accounts and wallets">
    Register bank accounts with **POST /api/v1/admin/account/\{user\_id}** and external wallets with **POST /api/v1/admin/wallets/external/\{user\_id}**, or create a Kravata custody wallet with **POST /api/v1/admin/wallet/\{user\_id}**. Accounts and wallets must be `APPROVED` to be used.
  </Step>

  <Step title="Quote and operate">
    Get a quote with **POST /api/v1/admin/operations/custodian-quote**, then create a deposit, withdrawal, on-ramp or off-ramp. For fiat-only flows use the pay-in, payout and payment endpoints.
  </Step>

  <Step title="Track the result">
    Query **GET /api/v1/admin/operation/\{operation\_id}** or subscribe to [webhooks](/stack/webhooks) to be notified when the status changes.
  </Step>
</Steps>

## Conventions

### Pagination

List endpoints accept `page` (starting at 1) and `pageSize` query parameters and return this envelope:

```json theme={null}
{
  "items": [],
  "total": 0,
  "page": 1,
  "pageSize": 10,
  "orderBy": null,
  "orderDirection": null
}
```

The operations endpoints (`/admin/operations`, `/admin/balances`) use `page` and `page_size` (maximum 100) instead.

### Errors

Errors return an HTTP status code and a JSON body with a `detail` field:

```json theme={null}
{ "detail": "User is not APPROVED" }
```

| Status | Meaning |
| - | - |
| 400 | The request is invalid or cannot be processed (for example, insufficient funds). |
| 401 | Missing or expired access token. |
| 403 | The user, account or wallet is not in a state that allows the operation. |
| 404 | The resource does not exist or does not belong to your client. |
| 409 | The resource already exists. |
| 422 | Validation error in the request body or parameters. |
| 502 | An upstream provider could not complete the request. Retry later. |

### Postman collection

Ask your Kravata point of contact for the **Kravata Stack** Postman collection. It includes every endpoint with example requests and responses.
