# Retrieve the page preview URL

Retrieves the preview URL for a specific page.

Endpoint: GET /api/v1/pages/{pageId}/preview-url
Version: v2.0
Security: HTTPBearer

## Security:

  - `HTTPBearer` (unknown)
    http bearer JWT

## Path parameters:

  - `pageId` (string, required)
    The unique identifier of the page. To get this ID, use [List pages of a site](#operation/sites-get_all_pages_by_site).

## Query parameters:

  - `language` (string)
    The language code for the page content.

  - `version` (any)
    The version number of the page to retrieve the preview URL for.

  - `variantId` (any)
    The unique identifier of the personalization or A/B/n test variant to preview. To get this ID, you can use the [List flow definitions](#operation/flows-list_flow_definitions_by_page) endpoint. Use the `transpiledVariants[].ref`, or `variants[].ref` when available.
 
If you provide this value, the preview URL is retrieved for the specified variant. If you omit this value, the preview URL for the base page is returned.

## Header parameters:

  - `x-sc-job-id` (any)
    A unique identifier for the job, used to trace, audit, and revert actions performed by an AI agent through the Agent API.

## Response 200:

  - `200` (unknown)
    Successful response

## Response 200 fields (application/json):

  - `pageId` (string)
    The unique identifier of the page.
    Example: f0b81bcc-7388-46be-b109-6e73d1114470

  - `previewUrl` (string)
    The preview URL of the page.
    Example: https://preview.example.com/page/f0b81bc-7388-46be-b109-6e73d1114470

## Response 422:

  - `422` (unknown)
    Unprocessable entity

## Response 422 fields (application/json):

  - `detail` (array)

  - `detail.loc` (array)
    The location of the error in the request.

  - `detail.msg` (string)
    The error message.

  - `detail.type` (string)
    The type of error.

  - `detail.input` (any)
    The input that caused the error.

  - `detail.ctx` (object)
    The context in which the error occurred.

