Hide a component on the default page variant

Request

Hides a component on the default page variant. Personalization must already exist on the page before you use this endpoint. A default page variant exists only after page variants have been created to personalize a page.

Security
HTTPBearer
Path
pageIdstring(Pageid)required

The unique identifier of the page that includes the default page variant where the component should be hidden. To get this ID, you can use the List pages of a site endpoint to retrieve the list of pages for a specific site.

componentIdstring(Componentid)required

The unique identifier of the component to hide on the default page variant. To get this ID, you can use the List components of a page endpoint to retrieve the list of components for a specific page.

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.

Bodyapplication/jsonrequired
languagestring or null(Language)
Example:"en"
Any of:

Language code for the page

string
page_versioninteger or null(Page Version)
Example:1
Any of:

The version of the page to use, or null for the latest version.

integer
curl -i -X POST \
  'https://edge-platform.sitecorecloud.io/stream/ai-agent-api/api/v1/personalization/{pageId}/components/{componentId}/hide' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'x-sc-job-id: {x-sc-job-id}' \
  -d '{
    "language": "en",
    "page_version": 1
  }'

Responses

Successful response

Bodyapplication/json
pageIdstring, (uuid)(Pageid)

The unique identifier of the page where the component was hidden.

Example:"3f2504e0-4f89-11d3-9a0c-0305e82c3301"
componentIdstring, (uuid)(Componentid)

The unique identifier of the component that was hidden.

Example:"86a03271-dff4-470a-92bd-b68c67de2e25"
languagestring(Language)

The language of the page.

Example:"en"
Response
{ "pageId": "3f2504e0-4f89-11d3-9a0c-0305e82c3301", "componentId": "86a03271-dff4-470a-92bd-b68c67de2e25", "language": "en" }