# Generate a component draft suggestion

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

Endpoint: POST /api/v1/components/drafts/suggestions
Version: v1
Security: Bearer

## Security:

  - `Bearer` (unknown)
    http Bearer

## Query parameters:

  - `environmentId` (string)
    The environment identifier. Defaults to "main". Currently only "main" is supported.

## Request body:

  - `application/json, text/json, application/*+json` (unknown)
    The prompt describing the desired component.

## Request fields (application/json):

  - `prompt` (string, required)
    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

## Response 200:

  - `200` (unknown)
    Successful operation

## Response 200 fields (application/json):

  - `name` (string)
    The suggested system name of the component, formatted in PascalCase without spaces.
    Example: HeroBanner

  - `displayName` (string)
    The human-readable display name of the component.
    Example: Hero Banner

  - `category` (string)
    The suggested category for the component draft.
    Example: Page Content

  - `description` (string)
    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 400:

  - `400` (unknown)
    One or more validation errors occurred

## Response 400 fields (application/json):

  - `type` (string)
    The type of the error response entity.

  - `title` (string)
    The title of the error response entity.

  - `status` (integer)
    The response status code.

  - `detail` (string)
    A detailed explanation, specific to this occurrence of the problem.

  - `instance` (string)
    If available, a URI reference that identifies the specific occurrence of the problem.

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `type` (string)
    The type of the error response entity.

  - `title` (string)
    The title of the error response entity.

  - `status` (integer)
    The response status code.

  - `detail` (string)
    A detailed explanation, specific to this occurrence of the problem.

  - `instance` (string)
    If available, a URI reference that identifies the specific occurrence of the problem.

