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

# Edit Queries Definitions

> Adds and/or removes query definitions (prompts) from a query group.

A query group represents a set of related queries for a specific product line or campaign. Customers can have multiple query groups. You can add new queries, remove existing ones, or both in a single call. At least one of `addedQueries` or `deletedQueriesIds` must contain values. The caller must own the query group through their organization.

**Note:** Each query group is limited to a maximum of 150 active (non-deleted) queries.



## OpenAPI

````yaml POST /edit-queries-definitions
openapi: 3.1.0
info:
  title: Mindshare API
  description: >-
    The Mindshare API provides comprehensive access to brand visibility
    analytics, customer intelligence, and growth tracking. Use this API to
    retrieve customer data, query groups, execution results, domain insights,
    and actionable recommendations for improving your brand's AI visibility.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.mindshare.so/customer/v1
security:
  - apiKeyHeader: []
paths:
  /edit-queries-definitions:
    post:
      description: >-
        Adds and/or removes query definitions (prompts) from a query group.


        A query group represents a set of related queries for a specific product
        line or campaign. Customers can have multiple query groups. You can add
        new queries, remove existing ones, or both in a single call. At least
        one of `addedQueries` or `deletedQueriesIds` must contain values. The
        caller must own the query group through their organization.


        **Note:** Each query group is limited to a maximum of 150 active
        (non-deleted) queries.
      requestBody:
        description: Query definitions to add and/or remove
        content:
          application/json:
            schema:
              type: object
              properties:
                queryGroupId:
                  type: number
                  description: The ID of the query group to edit.
                addedQueries:
                  type: array
                  items:
                    type: string
                  description: >-
                    List of new query texts to add. Can be an empty array if
                    only deleting.
                deletedQueriesIds:
                  type: array
                  items:
                    type: number
                  description: >-
                    List of query IDs to remove (soft-delete). Can be an empty
                    array if only adding.
                comments:
                  type: string
                  description: >-
                    A comment describing the reason for the edit. Stored as part
                    of the version history.
              required:
                - queryGroupId
                - addedQueries
                - deletedQueriesIds
        required: true
      responses:
        '200':
          description: Query definitions updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
components:
  schemas:
    MessageResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            message:
              type: string
              description: Success message
          required:
            - message
          description: Response details
        version:
          type: string
          description: API version
        env:
          type: string
          description: Environment name
      required:
        - data
        - version
        - env
  securitySchemes:
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````