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

# Migrate from v1 to v2

> Move from the legacy verb-style v1 surface to the RESTful v2 API

`v2` is the current, stable API; `v1` is legacy and deprecated. The two surfaces
differ in shape, not in access: `v1` is a verb/RPC-style API with ad-hoc responses,
while `v2` is RESTful with a consistent envelope, cursor pagination, and structured
errors. This page maps the old paths to the new ones and lists what changes in your
code.

<Note>
  Your **authentication doesn't change**. Both surfaces use the same `Authorization:
      Bearer YOUR_API_KEY` header — keep your existing key. See
  [Authentication](/api-reference/authentication).
</Note>

## What changes at a high level

* **RESTful resources replace verb paths.** Actions like `add-creator` and
  `creator/delete` become standard methods on resources (`POST /v2/creators`,
  `DELETE /v2/creators/{id}`).
* **A consistent response envelope.** `v2` wraps every response in `{ data }` or
  `{ data, pagination }`; `v1` returned ad-hoc shapes. Update your parsers to read
  `data`.
* **Cursor pagination.** `v2` list endpoints page with `limit` + `cursor` and return
  a `pagination` block. Adopt the [pagination loop](/api-reference/pagination).
* **RFC 9457 errors.** `v2` returns `application/problem+json` with a machine-readable
  `code`. Branch your error handling on `status` + `code` — see
  [Errors](/api-reference/errors).
* **Unified videos.** `v1` had separate Instagram-post and TikTok-video endpoints.
  `v2` has a single `/videos` resource with a `platform` field.

## Path mapping

The tables below map each legacy `v1` path to its `v2` method and path. Where a
`v1` verb toggled state (activate/deactivate), the `v2` equivalent is a `PATCH` that
sets `is_active`.

### Creators

| v1 path                           | v2 method + path                                 |
| --------------------------------- | ------------------------------------------------ |
| `POST /v1/add-creator`            | `POST /v2/creators`                              |
| `GET /v1/list-creators`           | `GET /v2/creators`                               |
| `GET /v1/creator`                 | `GET /v2/creators/{id}`                          |
| `POST /v1/creator/modify`         | `PATCH /v2/creators/{id}`                        |
| `DELETE /v1/creator/delete`       | `DELETE /v2/creators/{id}`                       |
| `POST /v1/creator/activate`       | `PATCH /v2/creators/{id}` (set `is_active`)      |
| `POST /v1/creator/de-activate`    | `PATCH /v2/creators/{id}` (set `is_active`)      |
| `POST /v1/creator/add-account`    | `PUT /v2/creators/{id}/accounts/{account_id}`    |
| `POST /v1/creator/remove-account` | `DELETE /v2/creators/{id}/accounts/{account_id}` |

### Accounts

| v1 path                                                   | v2 method + path                                          |
| --------------------------------------------------------- | --------------------------------------------------------- |
| `POST /v1/add-account`, `POST /v1/account/start-tracking` | `POST /v2/accounts`                                       |
| `GET /v1/list-accounts`                                   | `GET /v2/accounts`                                        |
| `GET /v1/account`                                         | `GET /v2/accounts/{id}`                                   |
| `POST /v1/account/modify`                                 | `PATCH /v2/accounts/{id}`                                 |
| `POST /v1/account/stop-tracking`                          | `DELETE /v2/accounts/{id}` (or `PATCH` `is_active=false`) |
| `DELETE /v1/account/delete`                               | `DELETE /v2/accounts/{id}` (or `PATCH` `is_active=false`) |
| `GET /v1/account/video`                                   | `GET /v2/accounts/{id}/videos`                            |

### Videos

`v2` unifies the platform-specific endpoints into one `/videos` resource. Pass
`platform` (and an identifier) on create, and filter by `platform=…` on list.

| v1 path                                                      | v2 method + path                            |
| ------------------------------------------------------------ | ------------------------------------------- |
| `POST /v1/add-instagram-post`, `POST /v1/add-tiktok-video`   | `POST /v2/videos` (`platform` + identifier) |
| `GET /v1/list-instagram-posts`, `GET /v1/list-tiktok-videos` | `GET /v2/videos` (filter `platform=…`)      |
| `GET /v1/instagram-post/{id}`, `GET /v1/tiktok-video`        | `GET /v2/videos/{id}`                       |
| `*/modify`                                                   | `PATCH /v2/videos/{id}`                     |
| `*/activate`, `*/deactivate`                                 | `PATCH /v2/videos/{id}` (set `is_active`)   |
| `DELETE` (per platform)                                      | `DELETE /v2/videos/{id}`                    |
| `GET /v1/video-deltas`                                       | `GET /v2/videos/deltas`                     |

### Analytics & system

| v1 path                   | v2 method + path                                                    |
| ------------------------- | ------------------------------------------------------------------- |
| `GET /v1/daily-analytics` | `GET /v2/analytics/timeseries`, `GET /v2/{resource}/{id}/analytics` |
| `GET /v1/overview-stats`  | `GET /v2/overview`                                                  |
| `GET /v1/health`          | `GET /v2/health`                                                    |

## What else changes in your code

Beyond swapping paths, three conventions change across the board:

* **Envelope parsing.** Read results from `data` (single resource) or `data` plus
  `pagination` (collections) instead of the ad-hoc `v1` shapes.
* **Pagination loop.** For list endpoints, request a `limit`, then follow
  `pagination.next_cursor` while `pagination.has_next` is true. See
  [Pagination](/api-reference/pagination).
* **Error handling.** Catch `application/problem+json` responses and branch on the
  numeric `status` plus the machine-readable `code`. See [Errors](/api-reference/errors).

## Next steps

Start from the [Introduction](/api-reference/introduction) for the full `v2`
envelope and conventions, then review [Pagination](/api-reference/pagination),
[Errors](/api-reference/errors), and [Versioning](/api-reference/versioning) before
you cut over.
