Request

Moves a component instance before or after another component instance on the base page layout. Components can move between compatible editable placeholders. Use targetPlaceholderPath when moving into an empty placeholder.

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
componentInstanceIdstring, (uuid)(Componentinstanceid)required

The unique identifier of the component instance on the page.

Example:550e8400-e29b-41d4-a716-446655440001
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
Bodyapplication/jsonrequired
targetPlaceholderPathstring or null(Targetplaceholderpath)
Example:"/headless-main/column-1-1"
Any of:

The destination placeholder path for the moved component.

string
insertBeforeComponentIdstring or null(Insertbeforecomponentid)
Example:"af4edf9c-aa98-4cd9-9807-88e0a411a7d4"
Any of:

The ID of the page-component instance before which to move the component.

string (uuid)
insertAfterComponentIdstring or null(Insertaftercomponentid)
Example:"3a6f45e9-9459-42d1-981f-0f2c97404bbd"
Any of:

The page-component instance ID after which to move the component.

string (uuid)
languagestring(Language)

The language of the page version to update.

Default:"en"
Example:"en"
curl -i -X PATCH \
  https://edge-platform.sitecorecloud.io/stream/ai-agent-api/api/v1/pages/550e8400-e29b-41d4-a716-446655440000/components/550e8400-e29b-41d4-a716-446655440001/position \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'x-sc-job-id: job-1234' \
  -d '{
    "targetPlaceholderPath": "/headless-main/column-1-1",
    "insertBeforeComponentId": "af4edf9c-aa98-4cd9-9807-88e0a411a7d4",
    "insertAfterComponentId": "3a6f45e9-9459-42d1-981f-0f2c97404bbd",
    "language": "en"
  }'

Responses

Successful response

Bodyapplication/json
successboolean(Success)

Whether the component was moved.

Example:true
pageIdstring, (uuid)(Pageid)

The unique identifier of the page containing the moved component.

Example:"6c7d6514-9660-4599-b310-240bdff5cb1b"
componentInstanceIdstring, (uuid)(Componentinstanceid)

The instance ID of the moved component.

Example:"3a6f45e9-9459-42d1-981f-0f2c97404bbd"
sourcePlaceholderPathstring or null(Sourceplaceholderpath)
Example:"/headless-main/column-1-1"
Any of:

The placeholder from which the component was moved.

string
targetPlaceholderPathstring or null(Targetplaceholderpath)
Example:"/headless-main/column-2-1/container-seventy-3"
Any of:

The placeholder to which the component was moved.

string
Response
{ "success": true, "pageId": "6c7d6514-9660-4599-b310-240bdff5cb1b", "componentInstanceId": "3a6f45e9-9459-42d1-981f-0f2c97404bbd", "sourcePlaceholderPath": "/headless-main/column-1-1", "targetPlaceholderPath": "/headless-main/column-2-1/container-seventy-3" }