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

# Create watcher



## OpenAPI

````yaml /agent-openapi.json post /api/v1/watchers
openapi: 3.1.0
info:
  title: Polpo API
  version: 1.0.0
  description: >-
    REST API for Polpo — an AI agent that manages teams of AI coding agents.
    Manage tasks, missions, agents, playbooks, skills, and approvals. For
    conversational interaction, use the OpenAI-compatible POST
    /v1/chat/completions endpoint.
servers:
  - url: http://localhost:3890
    description: Local development
security:
  - bearerAuth: []
paths:
  /api/v1/watchers:
    post:
      tags:
        - Watchers
      summary: Create watcher
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                taskId:
                  type: string
                  minLength: 1
                targetStatus:
                  type: string
                  enum:
                    - pending
                    - assigned
                    - in_progress
                    - review
                    - done
                    - failed
                    - awaiting_approval
                action:
                  type: object
                  properties:
                    type:
                      type: string
                      minLength: 1
                  required:
                    - type
                  additionalProperties:
                    nullable: true
              required:
                - taskId
                - targetStatus
                - action
      responses:
        '201':
          description: Watcher created
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  data:
                    nullable: true
                required:
                  - ok
        '400':
          description: Watcher manager unavailable or task not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                required:
                  - ok
                  - error
                  - code
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key passed as a Bearer token. Configure via the apiKeys field in
        polpo.json or the POLPO_API_KEY environment variable.

````