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

# Update watchlist tags query

> Replaces the tag-based query of an existing watchlist. This endpoint requires that the watchlist
currently uses tags (not keyphrases) and that at least one valid tag is provided.

## Request Formats

### V2 Format (Recommended)
Uses explicit `includeTags`/`excludeTags` arrays:
```json
{
  "includeTags": ["sports", "esports"],
  "excludeTags": ["politics"],
  "matchOperator": "OR"
}
```

### V1 Format (Deprecated - will be removed in future version)
Uses `tags` array with `include` boolean:
```json
{
  "tags": [
    {"tagSlug": "sports", "include": true}
  ],
  "searchMatchOperator": "OR"
}
```




## OpenAPI

````yaml openapi.json patch /watchlists/{watchlistId}/query/tags
openapi: 3.0.0
info:
  title: Nevua Markets API
  version: 0.0.1
  license:
    name: ISC
    url: https://opensource.org/licenses/ISC
servers:
  - url: https://api.nevua.markets
    description: Production
security: []
tags: []
paths:
  /watchlists/{watchlistId}/query/tags:
    patch:
      tags:
        - Watchlists
      summary: Update watchlist tags query
      description: >
        Replaces the tag-based query of an existing watchlist. This endpoint
        requires that the watchlist

        currently uses tags (not keyphrases) and that at least one valid tag is
        provided.


        ## Request Formats


        ### V2 Format (Recommended)

        Uses explicit `includeTags`/`excludeTags` arrays:

        ```json

        {
          "includeTags": ["sports", "esports"],
          "excludeTags": ["politics"],
          "matchOperator": "OR"
        }

        ```


        ### V1 Format (Deprecated - will be removed in future version)

        Uses `tags` array with `include` boolean:

        ```json

        {
          "tags": [
            {"tagSlug": "sports", "include": true}
          ],
          "searchMatchOperator": "OR"
        }

        ```
      operationId: updateWatchlistQueryTags
      parameters:
        - name: watchlistId
          in: path
          required: true
          schema:
            type: string
          description: Watchlist identifier.
          example: 507f1f77bcf86cd799439011
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/UpdateWatchListTagsJSONRequestV2'
                - $ref: '#/components/schemas/UpdateWatchListTagsJSONRequest'
            examples:
              v2_update_tags:
                summary: V2 - Update tags (recommended)
                value:
                  includeTags:
                    - sports
                    - esports
                  matchOperator: OR
              v2_with_exclusions:
                summary: V2 - Update with exclusions
                value:
                  includeTags:
                    - crypto
                  excludeTags:
                    - meme-coins
                  matchOperator: OR
              v1_update_tags_request:
                summary: V1 - Replace watchlist tags (deprecated)
                value:
                  tags:
                    - tagSlug: sports
                      include: true
                    - tagSlug: esports
                      include: true
                  searchMatchOperator: OR
      responses:
        '200':
          description: Tags updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateWatchListTagsJSONResponse'
              examples:
                success:
                  summary: Updated tags
                  value: {}
        '400':
          description: Bad request - validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                empty_tags:
                  summary: Tags list is empty
                  value:
                    error: Tags list is empty
                mixed_query:
                  summary: Watchlist has keyphrases
                  value:
                    error: >-
                      Watchlists with existing "keyphrases" cannot have "tags"
                      added. This will be supported in the future.
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '404':
          description: Watchlist not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                not_found:
                  summary: Watchlist not found
                  value:
                    error: Watchlist not found
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      security:
        - bearerAuth: []
components:
  schemas:
    UpdateWatchListTagsJSONRequestV2:
      type: object
      properties:
        includeTags:
          type: array
          items:
            type: string
        excludeTags:
          type: array
          items:
            type: string
        matchOperator:
          $ref: '#/components/schemas/SearchMatchOperator'
      additionalProperties: false
    UpdateWatchListTagsJSONRequest:
      type: object
      properties:
        tags:
          type: array
          items:
            $ref: '#/components/schemas/SearchTag'
        searchMatchOperator:
          $ref: '#/components/schemas/SearchMatchOperator'
      additionalProperties: false
      required:
        - tags
    UpdateWatchListTagsJSONResponse:
      type: object
      additionalProperties: false
    SearchMatchOperator:
      type: string
      enum:
        - AND
        - OR
    SearchTag:
      type: object
      properties:
        tagSlug:
          type: string
        include:
          type: boolean
      additionalProperties: false
      required:
        - tagSlug
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````