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

# Site pages migration

> Migrate deprecated TPC Site Pages API integrations to the content lifecycle API.

# Site pages migration

<Warning>
  `/api/v1/site/pages` is deprecated. Use `/api/v1/content` for new integrations.
</Warning>

The unified content API covers creation, generation, review, publishing, updates, and archival. You need `content:read` for reads and `content:write` for writes.

## Endpoint mapping

| Legacy operation | Content API replacement |
| - | - |
| `GET /api/v1/site/pages` | `GET /api/v1/content` |
| `POST /api/v1/site/pages` | `POST /api/v1/content` |
| `PATCH /api/v1/site/pages` with a `pages` batch | `PUT /api/v1/content/{documentId}` for each live document |
| `DELETE /api/v1/site/pages` with a `pageIds` batch | `DELETE /api/v1/content/{id}` for each item |

For list and create requests, send one product selector: `productId` or `productSlug`. List requests default to published pages. Use `status=pending_review` to list drafts awaiting review; the items in that response have a draft shape rather than the live-page shape.

## Creation and publishing

You can create up to 25 pages per request. Each page requires `slug`, `title`, and Markdown `content`. Use `canonicalDomainId` to choose a publishing destination; the unified create endpoint rejects unsupported page fields such as `domainIds`.

Creation returns review drafts, not published pages. Save each `created[].id` as a draft ID and inspect `failedCount` and `failed` for per-page failures even when the response has `ok: true`.

Approve a draft with `POST /api/v1/content/{draftId}/review` and `{"action":"approve"}`. Approval queues publishing for publishable content. Use `/revision` to edit a draft; use `PUT /api/v1/content/{documentId}` to update a live document. The unified `PUT` schema does not accept the legacy `status` field: use the review and publishing actions for lifecycle changes.

## Retry behavior

Send a distinct `Idempotency-Key` for each write operation and retain it with the exact request body for retries. When converting a batch update or delete into individual requests, track the result of each item independently.

Follow the [quickstart](/api/quickstart) for a complete create request and the [content documents guide](/api/content/documents) for review, update, domain, and archival operations.


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