> ## 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 vault entry

> Save credentials to the encrypted vault store. Credentials are encrypted at rest (AES-256-GCM) and never logged or persisted in chat history.



## OpenAPI

````yaml /agent-openapi.json post /api/v1/vault/entries
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/vault/entries:
    post:
      tags:
        - Vault
      summary: Save vault entry
      description: >-
        Save credentials to the encrypted vault store. Credentials are encrypted
        at rest (AES-256-GCM) and never logged or persisted in chat history.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                agent:
                  type: string
                  minLength: 1
                  description: Agent name
                service:
                  type: string
                  minLength: 1
                  description: Service name (vault key)
                type:
                  type: string
                  enum:
                    - smtp
                    - imap
                    - oauth
                    - api_key
                    - login
                    - custom
                  description: Credential type
                label:
                  type: string
                  description: Human-readable label
                credentials:
                  type: object
                  additionalProperties:
                    type: string
                  description: Key-value credential fields
              required:
                - agent
                - service
                - type
                - credentials
      responses:
        '200':
          description: Vault entry saved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  data:
                    type: object
                    properties:
                      agent:
                        type: string
                      service:
                        type: string
                      type:
                        type: string
                      keys:
                        type: array
                        items:
                          type: string
                    required:
                      - agent
                      - service
                      - type
                      - keys
                required:
                  - ok
                  - data
        '503':
          description: Vault store not available
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  error:
                    type: string
                required:
                  - ok
                  - error
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.

````