> ## 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 task



## OpenAPI

````yaml /agent-openapi.json post /api/v1/tasks
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/tasks:
    post:
      tags:
        - Tasks
      summary: Create task
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  minLength: 1
                description:
                  type: string
                  minLength: 1
                assignTo:
                  type: string
                  minLength: 1
                draft:
                  type: boolean
                expectations:
                  type: array
                  items:
                    nullable: true
                expectedOutcomes:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - file
                          - text
                          - url
                          - json
                          - media
                      label:
                        type: string
                        minLength: 1
                      description:
                        type: string
                      path:
                        type: string
                      mimeType:
                        type: string
                      required:
                        type: boolean
                      tags:
                        type: array
                        items:
                          type: string
                    required:
                      - type
                      - label
                dependsOn:
                  type: array
                  items:
                    type: string
                group:
                  type: string
                maxDuration:
                  type: number
                  minimum: 0
                  exclusiveMinimum: true
                retryPolicy:
                  type: object
                  properties:
                    escalateAfter:
                      type: integer
                      minimum: 0
                    fallbackAgent:
                      type: string
                    escalateModel:
                      type: string
                notifications:
                  type: object
                  properties:
                    rules:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            minLength: 1
                          name:
                            type: string
                            minLength: 1
                          events:
                            type: array
                            items:
                              type: string
                              minLength: 1
                            minItems: 1
                          condition:
                            nullable: true
                          channels:
                            type: array
                            items:
                              type: string
                              minLength: 1
                            minItems: 1
                          severity:
                            type: string
                            enum:
                              - info
                              - warning
                              - critical
                          template:
                            type: string
                          cooldownMs:
                            type: integer
                            minimum: 0
                          includeOutcomes:
                            type: boolean
                          outcomeFilter:
                            type: array
                            items:
                              type: string
                              enum:
                                - file
                                - text
                                - url
                                - json
                                - media
                          maxAttachmentSize:
                            type: integer
                            minimum: 0
                        required:
                          - id
                          - name
                          - events
                          - channels
                    inherit:
                      type: boolean
                  required:
                    - rules
                sideEffects:
                  type: boolean
              required:
                - title
                - description
                - assignTo
      responses:
        '201':
          description: Task created
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  data:
                    nullable: true
                required:
                  - ok
        '409':
          description: A task with this title already exists among active tasks
          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.

````