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

# Update Prompt Suggestions

> Edit pending Prompt discovery suggestions (`pr_`) before accepting them: rewrite the text and/or replace the tag set per item. Editing keeps a suggestion pending — accept it to create the tracked prompt. Each item is independent: unknown ids are reported in `skipped`, and unsatisfiable items (a standard `ps_` suggestion, an unknown tag, a duplicate id, nothing to change) in `rejected`, so the batch never fails as a whole.



## OpenAPI

````yaml https://api.peec.ai/customer/v1/openapi/json post /prompts/suggestions/update
openapi: 3.0.3
info:
  title: Peec AI Customer API
  description: Development documentation
  version: 1.0.0
  contact:
    name: Peec AI Team
    email: support@peec.ai
servers:
  - url: https://api.peec.ai/customer/v1
security: []
paths:
  /prompts/suggestions/update:
    post:
      tags:
        - Project
      summary: Update Prompt Suggestions
      description: >-
        Edit pending Prompt discovery suggestions (`pr_`) before accepting them:
        rewrite the text and/or replace the tag set per item. Editing keeps a
        suggestion pending — accept it to create the tracked prompt. Each item
        is independent: unknown ids are reported in `skipped`, and unsatisfiable
        items (a standard `ps_` suggestion, an unknown tag, a duplicate id,
        nothing to change) in `rejected`, so the batch never fails as a whole.
      operationId: postPromptsSuggestionsUpdate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project_id:
                  description: Required if using a company api key
                  example: or_f45b94ba-5e35-4982-93ed-285e72ee14eb
                  type: string
                suggestions:
                  minItems: 1
                  maxItems: 1000
                  type: array
                  items:
                    type: object
                    properties:
                      prompt_suggestion_id:
                        type: string
                        description: The suggestion to edit, from GET /prompts/suggestions.
                        example: pr_93f790de-5b7a-45ee-b782-61103c81f20d
                      text:
                        description: >-
                          New prompt text, replacing the suggestion's current
                          text.
                        type: string
                        minLength: 1
                        maxLength: 2000
                      tag_ids:
                        description: >-
                          New tag set, replacing the suggestion's existing tags.
                          Each id must be an existing tag in the project.
                        type: array
                        items:
                          type: string
                    required:
                      - prompt_suggestion_id
              required:
                - suggestions
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                project_id:
                  description: Required if using a company api key
                  example: or_f45b94ba-5e35-4982-93ed-285e72ee14eb
                  type: string
                suggestions:
                  minItems: 1
                  maxItems: 1000
                  type: array
                  items:
                    type: object
                    properties:
                      prompt_suggestion_id:
                        type: string
                        description: The suggestion to edit, from GET /prompts/suggestions.
                        example: pr_93f790de-5b7a-45ee-b782-61103c81f20d
                      text:
                        description: >-
                          New prompt text, replacing the suggestion's current
                          text.
                        type: string
                        minLength: 1
                        maxLength: 2000
                      tag_ids:
                        description: >-
                          New tag set, replacing the suggestion's existing tags.
                          Each id must be an existing tag in the project.
                        type: array
                        items:
                          type: string
                    required:
                      - prompt_suggestion_id
              required:
                - suggestions
          multipart/form-data:
            schema:
              type: object
              properties:
                project_id:
                  description: Required if using a company api key
                  example: or_f45b94ba-5e35-4982-93ed-285e72ee14eb
                  type: string
                suggestions:
                  minItems: 1
                  maxItems: 1000
                  type: array
                  items:
                    type: object
                    properties:
                      prompt_suggestion_id:
                        type: string
                        description: The suggestion to edit, from GET /prompts/suggestions.
                        example: pr_93f790de-5b7a-45ee-b782-61103c81f20d
                      text:
                        description: >-
                          New prompt text, replacing the suggestion's current
                          text.
                        type: string
                        minLength: 1
                        maxLength: 2000
                      tag_ids:
                        description: >-
                          New tag set, replacing the suggestion's existing tags.
                          Each id must be an existing tag in the project.
                        type: array
                        items:
                          type: string
                    required:
                      - prompt_suggestion_id
              required:
                - suggestions
      responses:
        '200':
          description: Per-item update results
          content:
            application/json:
              schema:
                type: object
                properties:
                  updated:
                    type: array
                    items:
                      type: object
                      properties:
                        prompt_suggestion_id:
                          type: string
                      required:
                        - prompt_suggestion_id
                  skipped:
                    type: array
                    items:
                      type: object
                      properties:
                        prompt_suggestion_id:
                          type: string
                        reason:
                          type: string
                          enum:
                            - not_found
                      required:
                        - prompt_suggestion_id
                        - reason
                  rejected:
                    type: array
                    items:
                      type: object
                      properties:
                        prompt_suggestion_id:
                          type: string
                        reason:
                          type: string
                          enum:
                            - not_editable
                            - invalid_tag
                            - duplicate_id
                            - no_changes
                        message:
                          type: string
                      required:
                        - prompt_suggestion_id
                        - reason
                        - message
                required:
                  - updated
                  - skipped
                  - rejected
                description: Per-item update results
        '400':
          description: Response for status 400
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
      security:
        - APIKeyHeader: []
        - APIKeyQuery: []
        - BearerAuth: []
components:
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    APIKeyQuery:
      type: apiKey
      in: query
      name: api_key
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````