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

# Endpoints & URLs

> All base URLs and authentication endpoints for Fundflow API and Finance API — staging and production.

Use staging credentials and URLs during development. Staging calls do not move real funds.

***

## Authentication

Both the Fundflow API and Finance API use the same OAuth2 token endpoint:

| Environment | URL                                                                                     |
| ----------- | --------------------------------------------------------------------------------------- |
| Staging     | `https://login-staging.venly.io/auth/realms/VenlyFinance/protocol/openid-connect/token` |
| Production  | `https://login.venly.io/auth/realms/VenlyFinance/protocol/openid-connect/token`         |

**Request** (`application/x-www-form-urlencoded`):

| Parameter       | Value                |
| --------------- | -------------------- |
| `grant_type`    | `client_credentials` |
| `client_id`     | Your client ID       |
| `client_secret` | Your client secret   |

Tokens are valid for **5 minutes** (300 seconds). See the [Authentication guide](/getting-started/authentication) for refresh patterns.

***

## Fundflow API

| Environment | Base URL                                   |
| ----------- | ------------------------------------------ |
| Staging     | `https://api-fundflow-staging.venly.io/v1` |
| Production  | `https://api-fundflow.venly.io/v1`         |

### Key endpoints

| Endpoint                        | Method     | Description                       |
| ------------------------------- | ---------- | --------------------------------- |
| `/company`                      | GET        | Verify KYB status                 |
| `/ramp-requests`                | GET / POST | List or create ramp requests      |
| `/ramp-requests/{id}`           | GET        | Get ramp request by ID            |
| `/ramp-requests/{id}/approve`   | POST       | Approve a ramp request            |
| `/ramp-requests/{id}/reject`    | POST       | Reject a ramp request             |
| `/ramp-requests/{id}/cancel`    | POST       | Cancel a ramp request             |
| `/ramp-requests/on-ramp/pairs`  | GET        | Available on-ramp currency pairs  |
| `/ramp-requests/off-ramp/pairs` | GET        | Available off-ramp currency pairs |
| `/fees/calculate`               | POST       | Calculate fee for a ramp request  |
| `/company-bank-accounts`        | GET / POST | Manage company bank accounts      |
| `/company-wallets`              | GET / POST | Manage company wallets            |

***

## Finance API

| Environment | Base URL                                  |
| ----------- | ----------------------------------------- |
| Staging     | `https://api-staging.venlyfinance.com/v1` |
| Production  | `https://api.venlyfinance.com/v1`         |

### Key endpoints

| Endpoint                                                | Method               | Description                           |
| ------------------------------------------------------- | -------------------- | ------------------------------------- |
| `/parties`                                              | GET / POST           | List or create parties                |
| `/parties/{id}`                                         | GET / PATCH / DELETE | Get, update, or delete a party        |
| `/accounts`                                             | GET / POST           | List or create accounts               |
| `/accounts/{id}`                                        | GET                  | Get account details                   |
| `/accounts/{id}/party-roles`                            | GET / POST           | List or add party roles on an account |
| `/accounts/{id}/wallets`                                | GET                  | List wallets for an account           |
| `/accounts/{id}/virtual-bank-accounts`                  | GET / POST           | List or create IBANs                  |
| `/accounts/{id}/transfers`                              | GET                  | List transfers for an account         |
| `/accounts/{senderId}/transfers/crypto` · `/fiat`       | POST                 | Create a crypto or fiat transfer      |
| `/accounts/{id}/payment-requests` · `/payment-requests` | POST                 | Create a payment request              |

<Info>
  Relevant Finance API endpoints accept an `idempotencyKey` field in the request body to prevent duplicate operations on retry. Supply a unique UUID for every new request.
</Info>

***

## Quick Copy

<CodeGroup>
  ```bash Staging token theme={null}
  curl -X POST https://login-staging.venly.io/auth/realms/VenlyFinance/protocol/openid-connect/token \
    -H "Content-Type: application/x-www-form-urlencoded" \
    -d "grant_type=client_credentials" \
    -d "client_id=YOUR_CLIENT_ID" \
    -d "client_secret=YOUR_CLIENT_SECRET"
  ```

  ```bash Production token theme={null}
  curl -X POST https://login.venly.io/auth/realms/VenlyFinance/protocol/openid-connect/token \
    -H "Content-Type: application/x-www-form-urlencoded" \
    -d "grant_type=client_credentials" \
    -d "client_id=YOUR_CLIENT_ID" \
    -d "client_secret=YOUR_CLIENT_SECRET"
  ```
</CodeGroup>
