Request

Adds a component to a specific placeholder on a page. You can specify the component type, placeholder location, and configure its initial settings. Optionally, you can specify its position relative to an existing component.

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
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
componentRenderingIdstring, (uuid)(Componentrenderingid)required

The unique identifier of the component rendering definition.

Example:"86a03271-dff4-470a-92bd-b68c67de2e25"
placeholderPathstring(Placeholderpath)required

The path of the placeholder where the component will be placed.

Example:"/main/content"
componentItemNamestring(Componentitemname)required

The name of the component item to create.

Example:"New sidebar component"
languagestring(Language)

The language code for the component.

Default:"en"
Example:"en"
fieldsobject or null(Fields)
Any of:

Field values to set on the component or its datasource.

insertBeforeComponentIdstring or null(Insertbeforecomponentid)
Example:"9c6d53e3-fe57-4638-af7b-6d68304c7a94"
Any of:

The unique identifier of the component before which the new component will be inserted.

string (uuid)
insertAfterComponentIdstring or null(Insertaftercomponentid)
Example:"9c6d53e3-fe57-4638-af7b-6d68304c7a94"
Any of:

The unique identifier of the component after which the new component will be inserted.

string (uuid)
curl -i -X POST \
  https://edge-platform.sitecorecloud.io/stream/ai-agent-api/api/v1/pages/f0b81bcc-7388-46be-b109-6e73d1114470/components \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'x-sc-job-id: job-1234' \
  -d '{
    "componentRenderingId": "86a03271-dff4-470a-92bd-b68c67de2e25",
    "placeholderPath": "/main/content",
    "componentItemName": "New sidebar component",
    "language": "en",
    "fields": {},
    "insertBeforeComponentId": "9c6d53e3-fe57-4638-af7b-6d68304c7a94",
    "insertAfterComponentId": "9c6d53e3-fe57-4638-af7b-6d68304c7a94"
  }'

Responses

Successful response

Bodyapplication/json
componentIdstring, (uuid)(Componentid)

The unique identifier of the newly added component.

Example:"d290f1ee-6c54-4b01-90e6-d701748f0851"
pageIdstring, (uuid)(Pageid)

The unique identifier of the page to which the component was added.

Example:"3f2504e0-4f89-11d3-9a0c-0305e82c3301"
placeholderIdstring or null(Placeholderid)
Example:"123e4567-e89b-12d3-a456-426614174000"
Any of:

The unique identifier of the placeholder where the component was placed.

string
datasourceIdstring or null(Datasourceid)
Example:"9f8c7e6d-5b4a-4c3d-8e7f-1a2b3c4d5e6f"
Any of:

The unique identifier of the datasource used by the component, if applicable.

string (uuid)
Response
{ "componentId": "d290f1ee-6c54-4b01-90e6-d701748f0851", "pageId": "3f2504e0-4f89-11d3-9a0c-0305e82c3301", "placeholderId": "123e4567-e89b-12d3-a456-426614174000", "datasourceId": "9f8c7e6d-5b4a-4c3d-8e7f-1a2b3c4d5e6f" }