Request

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

Security
HTTPBearer
Path
pageIdstring, (uuid)(Pageid)required

The unique identifier of the page. To get this ID, use List pages of a site.

Example:f0b81bcc-7388-46be-b109-6e73d1114470
Query
versioninteger(Version)required

The version number of the page to retrieve the screenshot for.

Example:version=1
languagestring(Language)

The language code for the page.

Default:"en"
Example:language=en
widthinteger(Width)

The width of the screenshot in pixels.

Default:1200
Example:width=1200
heightinteger(Height)

The height of the screenshot in pixels.

Default:800
Example:height=800
variantIdstring or null(Variantid)
Example:variantId=8bd7a9ec96b8490f9b894e3866fefb79_2a5c1e8c8d244f569a44d6b28cbecb05
Any of:

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

string
Headers
x-sc-job-idany(X-Sc-Job-Id)

A unique identifier for the job, used to trace, audit, and revert actions performed by an AI agent through the Agent API.

Example:job-1234
curl -i -X GET \
  'https://edge-platform.sitecorecloud.io/stream/ai-agent-api/api/v1/pages/f0b81bcc-7388-46be-b109-6e73d1114470/screenshot?version=1&language=en&width=1200&height=800&variantId=8bd7a9ec96b8490f9b894e3866fefb79_2a5c1e8c8d244f569a44d6b28cbecb05' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'x-sc-job-id: job-1234'

Responses

Successful response

Bodyapplication/json
typestring(Type)

The type of screenshot.

Example:"png"
fullPageboolean(Fullpage)

Whether the screenshot is of the full page.

Example:true
encodingstring(Encoding)

The encoding format of the screenshot.

Example:"base64"
timestampstring, (date-time)(Timestamp)

The timestamp when the screenshot was taken.

Example:"2023-09-01T12:00:00Z"
screenshot_base64string(Screenshot Base64)

The base64-encoded screenshot data.

Example:"iVBORw0KGgoAAAANSUhEUgAA..."
Response
{ "type": "png", "fullPage": true, "encoding": "base64", "timestamp": "2023-09-01T12:00:00Z", "screenshot_base64": "iVBORw0KGgoAAAANSUhEUgAA..." }