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

# Update Prompt

> Update an existing prompt.



## OpenAPI

````yaml /api-reference/openapi.json put /api/v1/public/prompts/{prompt_id}
openapi: 3.1.0
info:
  title: Hikoo REST API
  description: >-
    Programmatic access to your Hikoo data: citations, prompts, competitors,
    audits, health and more. Authenticate with a personal API key
    (`Authorization: Bearer <key>`) created from the dashboard settings.
  version: 1.0.0
servers:
  - url: https://api.tryhikoo.com
security:
  - apiKey: []
paths:
  /api/v1/public/prompts/{prompt_id}:
    put:
      tags:
        - Prompts
      summary: Update Prompt
      description: Update an existing prompt.
      operationId: update_prompt_api_v1_public_prompts__prompt_id__put
      parameters:
        - name: prompt_id
          in: path
          required: true
          schema:
            type: integer
            title: Prompt Id
        - name: website_id
          in: query
          required: true
          schema:
            type: integer
            description: Target website id
            title: Website Id
          description: Target website id
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Bearer <api_key>
            title: Authorization
          description: Bearer <api_key>
        - name: X-MCP-Secret
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Mcp-Secret
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PromptUpdateSchema'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptBaseSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PromptUpdateSchema:
      properties:
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
        topic_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Topic Id
        localizations:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Localizations
        intent:
          anyOf:
            - $ref: '#/components/schemas/PromptIntent'
            - type: 'null'
        journey_stage:
          anyOf:
            - $ref: '#/components/schemas/PromptJourneyStage'
            - type: 'null'
        source_keyword:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Keyword
      type: object
      title: PromptUpdateSchema
      description: Schema for updating a prompt
    PromptBaseSchema:
      properties:
        id:
          type: integer
          title: Id
        content:
          type: string
          title: Content
        topic_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Topic Id
        topic_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Topic Name
        localizations:
          items:
            type: string
          type: array
          title: Localizations
          default:
            - worldwide
        intent:
          anyOf:
            - $ref: '#/components/schemas/PromptIntent'
            - type: 'null'
        journey_stage:
          anyOf:
            - $ref: '#/components/schemas/PromptJourneyStage'
            - type: 'null'
        source_keyword:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Keyword
        visibility_score:
          type: number
          title: Visibility Score
          default: 0
        visibility_delta_7d:
          anyOf:
            - type: number
            - type: 'null'
          title: Visibility Delta 7D
        status:
          $ref: '#/components/schemas/PromptStatus'
          default: unclaimed
        top_platforms:
          items:
            $ref: '#/components/schemas/PromptPlatformBreakdownSchema'
          type: array
          title: Top Platforms
          default: []
        sentiment_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Sentiment Score
        sentiment_highlights_count:
          type: integer
          title: Sentiment Highlights Count
          default: 0
        sentiment_positive_count:
          type: integer
          title: Sentiment Positive Count
          default: 0
        sentiment_negative_count:
          type: integer
          title: Sentiment Negative Count
          default: 0
        sentiment_neutral_count:
          type: integer
          title: Sentiment Neutral Count
          default: 0
        ai_search_volume:
          anyOf:
            - type: integer
            - type: 'null'
          title: Ai Search Volume
        ai_volume_delta:
          anyOf:
            - type: number
            - type: 'null'
          title: Ai Volume Delta
        volume_updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Volume Updated At
        is_active:
          type: boolean
          title: Is Active
          default: true
        archived_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Archived At
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - content
        - created_at
      title: PromptBaseSchema
      description: Base prompt schema
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PromptIntent:
      type: string
      enum:
        - informational
        - comparative
        - transactional
        - navigational
      title: PromptIntent
    PromptJourneyStage:
      type: string
      enum:
        - discovery
        - consideration
        - decision
        - retention
      title: PromptJourneyStage
    PromptStatus:
      type: string
      enum:
        - winning
        - at_risk
        - losing
        - unclaimed
      title: PromptStatus
      description: |-
        Derived health status for a prompt.

        Computed at query time from the current visibility score and the 7-day
        delta. Not persisted: changing thresholds is a no-op migration.

        Thresholds (validated with product):
        - WINNING:   score >= 70 AND delta_7d >= 0
        - AT_RISK:   30 <= score < 70 OR delta_7d <= -10
        - LOSING:    score < 30 AND delta_7d < 0
        - UNCLAIMED: score == 0 (no platform cites the website)
    PromptPlatformBreakdownSchema:
      properties:
        platform:
          $ref: '#/components/schemas/AiPlatform'
        cited_count:
          type: integer
          title: Cited Count
        total_count:
          type: integer
          title: Total Count
      type: object
      required:
        - platform
        - cited_count
        - total_count
      title: PromptPlatformBreakdownSchema
      description: |-
        Per-prompt × platform aggregate.

        ``cited_count`` is the number of citations where the tracked website
        appears, out of ``total_count`` total citations on that platform for the
        prompt. The frontend derives a tri-state (cited / partial / not_cited)
        from the ratio.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    AiPlatform:
      type: string
      enum:
        - ChatGPT
        - Gemini
        - AI Overviews
        - Google AI Mode
        - Perplexity
        - Mistral
        - Claude
        - DeepSeek
        - Grok
        - Copilot
      title: AiPlatform
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: Personal API key created in the dashboard (Settings > API keys).

````