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

# Update Prompt(s)

> Update one or more prompts in a single request.

**Single mode** — supply `promptId` plus any subset of editable fields (`prompt`, `language`, `geolocation`, `isActive`). Returns the updated prompt.

**Batch mode** — supply `updates: [...]` where each entry carries its own `promptId` and the fields to change for that prompt. Different prompts can receive different patches in the same call. Maximum 100 updates per request.

Set `isActive` to `false` to pause tracking for a prompt without deleting it.



## OpenAPI

````yaml patch /entities/updateprompt
openapi: 3.1.0
info:
  title: Geogen API
  description: >-
    API for accessing LLM visibility data, managing entities, and tracking AI
    mentions.
  version: 1.0.0
servers:
  - url: https://api.geogen.io/v1
    description: Production server
security:
  - bearerAuth: []
paths:
  /entities/updateprompt:
    patch:
      tags:
        - Entities
      summary: Update Prompt(s)
      description: >-
        Update one or more prompts in a single request.


        **Single mode** — supply `promptId` plus any subset of editable fields
        (`prompt`, `language`, `geolocation`, `isActive`). Returns the updated
        prompt.


        **Batch mode** — supply `updates: [...]` where each entry carries its
        own `promptId` and the fields to change for that prompt. Different
        prompts can receive different patches in the same call. Maximum 100
        updates per request.


        Set `isActive` to `false` to pause tracking for a prompt without
        deleting it.
      operationId: updatePrompt
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - title: Single update
                  type: object
                  required:
                    - promptId
                  properties:
                    promptId:
                      type: string
                      description: Prompt ID to update
                    prompt:
                      type: string
                      description: New prompt text
                    language:
                      type: string
                      description: New language code (e.g., 'en', 'fr', 'de')
                    geolocation:
                      type: string
                      description: New geolocation code (e.g., 'global', 'us', 'gb')
                    isActive:
                      type: boolean
                      description: >-
                        Set to false to pause tracking for this prompt, or true
                        to re-activate it
                - title: Batch update
                  type: object
                  required:
                    - updates
                  properties:
                    updates:
                      type: array
                      minItems: 1
                      maxItems: 100
                      description: >-
                        Array of per-prompt patches. Each entry must include
                        `promptId` and at least one editable field.
                      items:
                        type: object
                        required:
                          - promptId
                        properties:
                          promptId:
                            type: string
                            description: Prompt ID to update
                          prompt:
                            type: string
                            description: New prompt text
                          language:
                            type: string
                            description: New language code (e.g., 'en', 'fr', 'de')
                          geolocation:
                            type: string
                            description: New geolocation code (e.g., 'global', 'us', 'gb')
                          isActive:
                            type: boolean
                            description: >-
                              Set to false to pause tracking for this prompt, or
                              true to re-activate it
            examples:
              update_text:
                summary: Update prompt text (single)
                value:
                  promptId: abc123def456...
                  prompt: What are the best tools for SEO in 2026?
              update_language_geo:
                summary: Update language and geolocation (single)
                value:
                  promptId: abc123def456...
                  language: fr
                  geolocation: fr
              deactivate_prompt:
                summary: Deactivate a prompt (single)
                value:
                  promptId: abc123def456...
                  isActive: false
              batch_mixed:
                summary: Batch update with different fields per prompt
                value:
                  updates:
                    - promptId: abc123def456...
                      prompt: Rewritten prompt copy
                    - promptId: ghi789jkl012...
                      language: fr
                      isActive: true
                    - promptId: mno345pqr678...
                      isActive: false
      responses:
        '200':
          description: >-
            Prompt(s) updated successfully. Single mode returns the updated
            prompt; batch mode returns per-item results.
          content:
            application/json:
              schema:
                oneOf:
                  - title: Single update response
                    type: object
                    properties:
                      success:
                        type: boolean
                      prompt:
                        $ref: '#/components/schemas/Prompt'
                  - title: Batch update response
                    type: object
                    properties:
                      success:
                        type: boolean
                      updatedCount:
                        type: integer
                        description: Number of prompts successfully updated
                      requestedCount:
                        type: integer
                        description: Number of prompts requested in the batch
                      results:
                        type: array
                        items:
                          type: object
                          properties:
                            promptId:
                              type: string
                            success:
                              type: boolean
                            error:
                              type: string
                              description: Present only when `success` is false
                            prompt:
                              $ref: '#/components/schemas/Prompt'
                              description: >-
                                Updated prompt object; present only when
                                `success` is true
        '400':
          description: Bad request - invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            Prompt not found (single mode only). In batch mode, per-prompt
            not-found errors are returned inside `results[]` with a 200
            response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Prompt:
      type: object
      properties:
        id:
          type: string
          description: Prompt ID
        prompt:
          type: string
          description: Prompt text
        language:
          type: string
          description: Language code
        geolocation:
          type: string
          description: Geolocation code
        createdAt:
          type: number
          description: Creation timestamp
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'API key authentication. Format: Bearer wsk_your_api_key'

````