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

# Replace a prompt, resetting history

> Reword a tracked prompt and reset its measurement history (archives the old prompt, tracks a new one in its place). Requires a paid plan.



## OpenAPI

````yaml https://api.spreadjam.com/openapi.json post /v1/prompts/{promptId}/replacements
openapi: 3.0.0
info:
  title: SpreadJam API
  version: 1.0.0
servers: []
security: []
tags:
  - name: Meta
    description: Identity and metadata about the authenticated key.
  - name: Keywords
    description: Keyword and topic visibility rankings.
  - name: API keys
    description: Manage the workspace's API keys.
  - name: Analytics
    description: AI-visibility analytics for the workspace.
  - name: Brand
    description: The workspace's brand profile and competitors.
  - name: Prompts
    description: Tracked GEO prompts and their cap state.
paths:
  /v1/prompts/{promptId}/replacements:
    post:
      tags:
        - Prompts
      summary: Replace a prompt, resetting history
      description: >-
        Reword a tracked prompt and reset its measurement history (archives the
        old prompt, tracks a new one in its place). Requires a paid plan.
      parameters:
        - schema:
            type: string
            minLength: 1
            example: prompt-123
          required: true
          name: promptId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RewordPrompt'
      responses:
        '201':
          description: The replacement prompt.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReplacePromptResult'
      security:
        - bearerAuth: []
components:
  schemas:
    RewordPrompt:
      type: object
      properties:
        text:
          type: string
          minLength: 3
          maxLength: 500
          description: The new prompt wording (3 to 500 characters).
      required:
        - text
    ReplacePromptResult:
      type: object
      properties:
        promptId:
          type: string
        archivedPromptId:
          type: string
      required:
        - promptId
        - archivedPromptId
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A workspace API key issued in Settings → Developer, sent as `Bearer
        sk_…`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.