Request

Retrieves the HTML for a specific page. This endpoint returns the raw HTML of the page as it would appear in the browser.

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

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

Example:550e8400-e29b-41d4-a716-446655440000
Query
languagestring(Language)required

The language code for the page content.

Example:language=en
versioninteger or null(Version)
Example:version=1
Any of:

The version number of the page to retrieve.

integer
variantIdstring or null(Variantid)
Example:variantId=8bd7a9ec96b8490f9b894e3866fefb79_2a5c1e8c8d244f569a44d6b28cbecb05
Any of:

The unique identifier of the personalization or A/B/n test variant to use. 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 HTML content is retrieved for the specified variant. If you omit this value, the HTML content for the base page is returned.

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/550e8400-e29b-41d4-a716-446655440000/html?language=en&version=1&variantId=8bd7a9ec96b8490f9b894e3866fefb79_2a5c1e8c8d244f569a44d6b28cbecb05' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'x-sc-job-id: job-1234'

Responses

Successful response

Bodyapplication/json
pageIdstring, (uuid)(Pageid)

The unique identifier of the page.

Example:"f0b81bcc-7388-46be-b109-6e73d1114470"
htmlstring(Html)

The HTML content of the page.

Example:"<html><body><h1>Webpage content</h1></body></html>"
renderingHostUrlstring(Renderinghosturl)

The origin (scheme and host only) of the rendering host that produced html. Root-relative asset references in html are resolved against this origin, not the site's public hostname, which may point to a separate deployment with different build hashes. The value is empty if the origin cannot be determined, in which case callers should fall back rather than fail.

Default:""
Example:"https://xmc-example-site.sitecorecloud.io"
Response
{ "pageId": "f0b81bcc-7388-46be-b109-6e73d1114470", "html": "<html><body><h1>Webpage content</h1></body></html>", "renderingHostUrl": "https://xmc-example-site.sitecorecloud.io" }