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

# Add a selection of queries to a schedule

> A query runs on one schedule: one on another moves here.



## OpenAPI

````yaml https://api.mentionlab.io/api/docs/v2-json post /api/v2/projects/{projectId}/recurrence-settings/{recurrenceSettingId}/queries/bulk/add
openapi: 3.0.0
info:
  title: MentionLab Public API v2
  description: ''
  version: 0.6.27-rc
  contact: {}
servers:
  - url: https://api.mentionlab.io
security: []
tags: []
paths:
  /api/v2/projects/{projectId}/recurrence-settings/{recurrenceSettingId}/queries/bulk/add:
    post:
      tags:
        - Recurrence settings
      summary: Add a selection of queries to a schedule
      description: 'A query runs on one schedule: one on another moves here.'
      operationId: ProjectRecurrenceSettingsV2Controller_addQueries_v2
      parameters:
        - name: recurrenceSettingId
          required: true
          in: path
          schema:
            type: string
        - name: x-project-id
          in: header
          description: Project ID to specify the project context
          required: true
          schema:
            type: string
        - name: projectId
          required: true
          in: path
          schema:
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecurrenceSettingQueriesV2Dto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkActionResponse'
        '400':
          description: >-
            The request failed validation — the body, query or path parameters
            are malformed or out of range.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: The request is missing valid authentication credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '403':
          description: >-
            The authenticated principal lacks the required permission, or access
            to the requested organisation/project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
components:
  schemas:
    RecurrenceSettingQueriesV2Dto:
      type: object
      properties:
        selection:
          description: >-
            Queries by id, or every query the filter matches minus its
            exclusions
          allOf:
            - $ref: '#/components/schemas/QuerySelectionV2Dto'
      required:
        - selection
    BulkActionResponse:
      type: object
      properties:
        affected:
          type: number
          description: Number of rows affected by the action.
          example: 42
      required:
        - affected
    ApiErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code of the error.
          example: 400
        message:
          type: string
          description: >-
            Human-readable description of the error. Validation failures return
            an array of per-field validation errors instead of a single string.
          example: Validation failed
        error:
          type: string
          description: Short name of the HTTP error.
          example: Bad Request
      required:
        - statusCode
    QuerySelectionV2Dto:
      type: object
      properties:
        mode:
          type: string
          enum:
            - include
            - all
          description: >-
            How the target set is defined. "include" acts on the given ids;
            "all" acts on everything matching the filter except the excluded
            ids.
        ids:
          description: Uuids of the rows to act on, required when mode is "include"
          example:
            - 018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42
          type: array
          items:
            type: string
            format: uuid
        excludedIds:
          description: Uuids to subtract from the matched set, only used when mode is "all"
          example:
            - 018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42
          type: array
          items:
            type: string
            format: uuid
        filter:
          description: Used when mode is "all"
          allOf:
            - $ref: '#/components/schemas/ListQueriesV2Dto'
      required:
        - mode
    ListQueriesV2Dto:
      type: object
      properties:
        page:
          type: number
          description: >-
            Which slice of the matched rows to return, counted from 1. Rows
            skipped are (page - 1) * limit.
          default: 1
          minimum: 1
          example: 2
        limit:
          type: number
          description: >-
            How many rows one page holds, capped at 100 to keep a single
            response bounded.
          default: 25
          minimum: 1
          maximum: 100
          example: 50
        search:
          type: string
          description: Substring of the query text, accents and apostrophes folded
          example: running shoes
        languages:
          description: >-
            Queries in any of these languages, as reference locale language
            codes
          example:
            - en
            - fr
          type: array
          items:
            type: string
        countries:
          description: >-
            Queries run for any of these markets, as country codes of the
            reference locales
          example:
            - US
            - GB
          type: array
          items:
            type: string
        types:
          type: array
          description: An untyped query matches none
          items:
            $ref: '#/components/schemas/QueryType'
        tagIds:
          description: Queries carrying these tags, by tag id. See tagMode
          example:
            - 12
            - 34
          type: array
          items:
            type: number
        tagGroupIds:
          description: Queries with a tag of these groups. See tagMode
          example:
            - 018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42
          type: array
          items:
            type: string
            format: uuid
        tagMode:
          type: string
          enum:
            - and
            - or
          description: >-
            "and" (default): every tag, and a tag of each group. "or": any tag,
            or a tag of any group
        recurrenceSettingIds:
          description: Queries on any of these schedules
          example:
            - 018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42
          type: array
          items:
            type: string
            format: uuid
        hasRecurrenceSetting:
          type: boolean
          description: Whether a schedule runs them
          example: true
        sort:
          type: string
          description: 'Comma-separated field:asc|desc pairs. Sortable: query, updatedAt.'
          example: query:asc
    QueryType:
      type: string
      enum:
        - comparative
        - informative
        - perception
      description: >-
        The type of question the query asks: "comparative" (compares options),
        "informative" (seeks facts or how-to information) or "perception"
        (probes opinions about a brand).

````

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