Generate a component draft suggestion

Request

Generates a component draft suggestion from a natural-language prompt.

Security
Bearer
Query
environmentIdstring

The environment identifier. Defaults to "main". Currently only "main" is supported.

Example:environmentId=main
Bodyrequired

The prompt describing the desired component.

promptstring, [ 0 .. 1000 ] charactersrequired

A natural-language description of the component to generate a suggestion for. Must be between 5 and 1000 characters.

Example:"A full-width banner with a background image, headline, subtext, and a call-to-action button"
curl -i -X POST \
  'https://edge-platform.sitecorecloud.io/authoring/api/v1/components/drafts/suggestions?environmentId=main' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "prompt": "A full-width banner with a background image, headline, subtext, and a call-to-action button"
  }'

Responses

Successful operation

Bodyapplication/json
namestring or null

The suggested system name of the component, formatted in PascalCase without spaces.

Example:"HeroBanner"
displayNamestring or null

The human-readable display name of the component.

Example:"Hero Banner"
categorystring or null

The suggested category for the component draft.

Example:"Page Content"
descriptionstring or null

A generated description summarising the component's purpose and content structure.

Example:"A full-width banner section featuring a background image, headline, subtext, and a call-to-action button."
Response
{ "name": "HeroBanner", "displayName": "Hero Banner", "category": "Page Content", "description": "A full-width banner section featuring a background image, headline, subtext, and a call-to-action button." }