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

# Set Watch Paths

> PUT /agents/{agentName}/watch-paths sets the glob patterns a change must match for a project, its environments and its previews to deploy.



## OpenAPI

````yaml PUT /agents/{agentName}/watch-paths
openapi: 3.0.0
info:
  title: Pipecat Cloud
  version: 1.0.0
  description: >-
    REST API for Pipecat Cloud. The public API (`/v1/public`, authenticated with
    a public API key) starts agent sessions and proxies requests to them. The
    private API (`/v1`, authenticated with a private API key) manages agents,
    secrets, builds, regions, and organization settings.
servers:
  - url: https://api.pipecat.daily.co/v1
    description: Private API server
security: []
paths:
  /agents/{agentName}/watch-paths:
    put:
      summary: Set watch paths
      description: >-
        Sets the glob patterns a change has to match for a push to deploy the
        project, or for a pull request to get a PR preview. An empty array
        clears them, so every change deploys.


        Watch paths are a project setting: the project, its environments and its
        PR previews all follow this one list, so setting them on an environment
        is refused. The project needs a GitHub repository connected.


        Patterns are relative to the repository root. A leading `!` excludes and
        the last pattern a file matches decides, so a list of only exclusions is
        refused. `**` is allowed as a whole path level at most twice, and at
        most one `*` between slashes; `?` and braces are refused. A pattern that
        matches a folder also matches everything in it, and a trailing `/` is
        refused. The `Dockerfile` and `.dockerignore` always count as watched.
      operationId: updateWatchPaths
      parameters:
        - name: agentName
          in: path
          required: true
          description: Name of the project
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - watchPaths
              properties:
                watchPaths:
                  type: array
                  maxItems: 20
                  items:
                    type: string
                    maxLength: 200
                  description: >-
                    Glob patterns a change must match to deploy. An empty array
                    clears them.
            example:
              watchPaths:
                - bot/**
                - shared/**
                - '!**/*.md'
      responses:
        '200':
          description: The stored watch paths
          content:
            application/json:
              schema:
                type: object
                properties:
                  watchPaths:
                    type: array
                    items:
                      type: string
              example:
                watchPaths:
                  - bot/**
                  - shared/**
                  - '!**/*.md'
        '400':
          description: >-
            A malformed pattern, too many patterns, or no GitHub repository
            connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Watch paths need a GitHub repository connected to this agent
                code: '400'
        '404':
          description: Agent not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Service not found
                code: '404'
        '409':
          description: The agent is an environment of another agent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: >-
                  An environment of another agent follows its project's watch
                  paths; set them on the project
                code: '409'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Internal server error
                code: '500'
      security:
        - PrivateKeyAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message describing what went wrong
        code:
          type: string
          description: >-
            Error code for programmatic handling. For general errors it is the
            HTTP status as a string, such as `"404"`. Deployment-related codes
            (PCC-*) are documented at
            https://docs.pipecat.ai/pipecat-cloud/fundamentals/error-codes
      required:
        - error
        - code
  securitySchemes:
    PrivateKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Authentication requires a Pipecat Cloud Private API token.


        Generate a Private API key from your Dashboard (Settings > API Keys >
        Private > Create key) and include it as a Bearer token in the
        Authorization header.

````

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