> ## Documentation Index
> Fetch the complete documentation index at: https://developers.scrunch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Prompt

> Creates a new prompt with variants for the specified platforms. Requires the `configure` scope.

**Behavior:**
- `stage` is optional. If omitted, the journey stage is auto-classified against your brand's active stages using an LLM.
- If `stage` is provided, it must match one of your brand's active stages (case-sensitive display name). An unknown value returns `400`. An explicit stage is treated as a manual assertion and won't be overwritten by later re-classification.
- Creates variants for each specified platform.
- Reactivates an archived prompt if a duplicate exists.
- Dispatches collection events to begin tracking.



## OpenAPI

````yaml /api-reference/openapi.json post /{brand_id}/prompts
openapi: 3.1.0
info:
  title: Scrunch Data API
  version: 0.1.0
servers:
  - url: https://api.scrunchai.com/v1
security: []
paths:
  /{brand_id}/prompts:
    post:
      summary: Create Prompt
      description: >-
        Creates a new prompt with variants for the specified platforms. Requires
        the `configure` scope.


        **Behavior:**

        - `stage` is optional. If omitted, the journey stage is auto-classified
        against your brand's active stages using an LLM.

        - If `stage` is provided, it must match one of your brand's active
        stages (case-sensitive display name). An unknown value returns `400`. An
        explicit stage is treated as a manual assertion and won't be overwritten
        by later re-classification.

        - Creates variants for each specified platform.

        - Reactivates an archived prompt if a duplicate exists.

        - Dispatches collection events to begin tracking.
      operationId: createPrompt
      parameters:
        - name: brand_id
          in: path
          required: true
          schema:
            type: integer
            description: The unique identifier for the brand
            title: Brand Id
          description: The unique identifier for the brand
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/APIPromptInputModel'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptListing'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer:
            - configure
components:
  schemas:
    APIPromptInputModel:
      properties:
        text:
          type: string
          title: Text
          description: The prompt text to track across AI platforms
        persona_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Persona Id
          description: >-
            Optional persona ID to associate with this prompt for segmented
            analysis
        stage:
          anyOf:
            - type: string
            - type: 'null'
          title: Stage
          description: >-
            The customer journey stage this prompt represents. Must match one of
            your brand's active stages (case-sensitive display name); custom
            stage names are accepted. Omit to auto-classify against the brand's
            stage definitions.


            **Default stage sets:**

            - **Intent (v1)** — `Advice`, `Awareness`, `Evaluation`,
            `Comparison`, `Other`

            - **Funnel (v2)** — `Awareness`, `Consideration`, `Conversion`,
            `Loyalty`, `Other`


            Unknown stage names return `400 Bad Request`. An explicit stage is
            treated as a manual selection and won't be reclassified later.
        tags:
          items:
            type: string
          type: array
          title: Tags
          description: Custom tags for categorizing and filtering prompts
          default: []
        key_topics:
          items:
            type: string
          type: array
          title: Key Topics
          description: Key topics to associate with this prompt from the brand's topic list
          default: []
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
          description: >-
            Lowercase ISO 639-1 code of the language the prompt text is written
            in (e.g. `pt`, `ja`, `es`). Case-insensitive; uppercase input is
            normalized. Invalid codes return `422 Unprocessable Entity`. If
            omitted, the language is auto-detected from the prompt text, falling
            back to the brand's default language.
        platforms:
          items:
            type: string
            enum:
              - chatgpt
              - claude
              - google_ai_overviews
              - perplexity
              - meta
              - google_ai_mode
              - google_gemini
              - copilot
              - grok
          type: array
          title: Platforms
          description: >-
            AI platforms to track this prompt on. If empty, defaults to all
            supported platforms.


            **Supported platforms:**

            - `chatgpt` - OpenAI ChatGPT

            - `claude` - Anthropic Claude

            - `google_ai_overviews` - Google AI Overviews (Search)

            - `perplexity` - Perplexity AI

            - `meta` - Meta AI

            - `google_ai_mode` - Google AI Mode

            - `google_gemini` - Google Gemini

            - `copilot` - Microsoft Copilot
          default: []
      type: object
      required:
        - text
      title: APIPromptInputModel
      description: Input model for creating a new prompt to track AI visibility.
    PromptListing:
      properties:
        id:
          type: integer
          title: Id
          description: Unique identifier for the prompt
        text:
          type: string
          title: Text
          description: The prompt text being tracked
        stage:
          type: string
          title: Stage
          description: >-
            The customer journey stage this prompt represents. Returned as the
            display name of the brand's active stage — one of the brand's
            default set (`Advice`, `Awareness`, `Evaluation`, `Comparison`,
            `Other` for intent brands; `Awareness`, `Consideration`,
            `Conversion`, `Loyalty`, `Other` for funnel brands) or a custom
            stage name.
        persona_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Persona Id
          description: ID of the associated persona, if any
        platforms:
          items:
            type: string
            enum:
              - chatgpt
              - claude
              - google_ai_overviews
              - perplexity
              - meta
              - google_ai_mode
              - google_gemini
              - copilot
              - grok
          type: array
          title: Platforms
          description: AI platforms this prompt is tracked on
        tags:
          items:
            type: string
          type: array
          title: Tags
          description: Custom tags assigned to this prompt
        topics:
          items:
            type: string
          type: array
          title: Topics
          description: Auto-detected or assigned topics for this prompt
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Timestamp when the prompt was created
      type: object
      required:
        - id
        - text
        - stage
        - persona_id
        - platforms
        - tags
        - topics
        - created_at
      title: PromptListing
      description: >-
        Represents a prompt being tracked for AI visibility, including its
        configuration and metadata.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````