# Retrieve the screenshot of a page

Captures and returns a base64-encoded screenshot of a page.

Endpoint: GET /api/v1/pages/{pageId}/screenshot
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:

  - `version` (integer, required)
    The version number of the page to retrieve the screenshot for.

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

  - `width` (integer)
    The width of the screenshot in pixels.

  - `height` (integer)
    The height of the screenshot in pixels.

  - `variantId` (any)
    The unique identifier of the personalization or A/B/n test variant to show in the screenshot. 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 screenshot is captured for the specified variant. If you omit this value, the screenshot is captured for the base page.

## 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):

  - `type` (string)
    The type of screenshot.
    Example: png

  - `fullPage` (boolean)
    Whether the screenshot is of the full page.
    Example: true

  - `encoding` (string)
    The encoding format of the screenshot.
    Example: base64

  - `timestamp` (string)
    The timestamp when the screenshot was taken.
    Example: 2023-09-01T12:00:00Z

  - `screenshot_base64` (string)
    The base64-encoded screenshot data.
    Example: iVBORw0KGgoAAAANSUhEUgAA...

## 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.

