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

# Save playbook



## OpenAPI

````yaml /agent-openapi.json post /api/v1/templates
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/templates:
    post:
      tags:
        - Playbooks
      summary: Save playbook
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Playbook name (kebab-case)
                description:
                  type: string
                  description: Human-readable description
                mission:
                  type: object
                  additionalProperties:
                    nullable: true
                  description: Mission playbook body with {{placeholder}} syntax
                parameters:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      description:
                        type: string
                      type:
                        type: string
                        enum:
                          - string
                          - number
                          - boolean
                      required:
                        type: boolean
                      default:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                      enum:
                        type: array
                        items:
                          anyOf:
                            - type: string
                            - type: number
                    required:
                      - name
                      - description
              required:
                - name
                - description
                - mission
      responses:
        '201':
          description: Playbook created
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  data:
                    nullable: true
                required:
                  - ok
        '400':
          description: Invalid playbook definition
          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.

````