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

# Migrate from v1

> What changes moving from the v1 API to v2. Same key, same resources, new base path and response shape.

v2 keeps the same resources and the same API key. Most integrations only change the base URL and how they read responses.

v1

**GET /v1/partners**authBearer \<key>successvarieserrorsvarieslistsvaries

v2

**GET /v2/partners**platform.tolt.comauthsame keysuccess\{ success, data }errorscode, doc\_urllistshas\_more, next\_cursor

Error responses carry a [stable `code`](/api-reference/errors) and a `doc_url`. Everything is `snake_case`. Money is in minor units: send integers (`4900`), read strings (`"4900"`).

## Page with cursors

Pass `next_cursor` as `starting_after` to get the next page, and `prev_cursor` as `ending_before` to go back. Stop when `has_more` is `false`.

```ts TypeScript theme={"system"}
import { ToltApiClient } from "@tolt/api";

const tolt = new ToltApiClient({ token: process.env.TOLT_API_KEY! });

for await (const customer of await tolt.customers.list({ limit: 100 })) {
  // customer ...
}
```

```bash cURL theme={"system"}
curl -G https://platform.tolt.com/v2/customers \
  -d limit=100 \
  -d starting_after=cur_WyJjcmVhdGVkX2F0Ii... \
  -H "Authorization: Bearer $TOLT_API_KEY"
```

Report breakdowns (`/v2/reports/partners`, `/v2/reports/links`) page with `limit` and `offset` instead. See [Pagination](/api-reference/pagination).

## Endpoints that moved

| v1 | v2 |
| - | - |
| `POST /v1/customers/per-partner` | `POST /v2/customers` with `partner_id` or `link_id` in the body |
| `PUT /v1/transactions/{id}/refund` | `POST /v2/transactions/{id}/refund` |
| `GET /v1/links/by-param-value` | `GET /v2/links/by-param-value` (same lookup) |

## Endpoints that were retired

| v1 | Use instead |
| - | - |
| `DELETE /v1/partners/{id}` | `POST /v2/partners/{id}/suspend` or `/reject`. Partners are never hard-deleted. |
| `POST /v1/referrals`, `/v1/referrals/{id}` | [tolt.js](/tracking/script) in the browser, or `POST /v2/clicks` and `POST /v2/customers` [server-side](/tracking/server-side) |

## New in v2

| Feature | What you get |
| - | - |
| [Reports](/guides/reporting) | Overview, timeseries, and per-partner and per-link totals |
| [Embedded dashboard](/guides/refer-a-friend) | `POST /v2/embed-tokens` and the `@tolt/embed` component |
| [Bulk actions](/guides/approve-commissions) | Approve or decline up to 100 commissions or partners per call |
| [SDKs](/sdks/overview) | Typed clients for TypeScript and Python |
| Flows and groups | Read-only `GET /v2/flows` and `GET /v2/groups` |
| Rerun flows | `POST /v2/transactions/{id}/rerun-flows` |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.