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

# Update vault credentials

> Partially update credential fields in an existing vault entry. Only the provided fields are merged — existing fields are preserved. Optionally update type and label.



## OpenAPI

````yaml /agent-openapi.json patch /api/v1/vault/entries/{agent}/{service}
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/{agent}/{service}:
    patch:
      tags:
        - Vault
      summary: Update vault credentials
      description: >-
        Partially update credential fields in an existing vault entry. Only the
        provided fields are merged — existing fields are preserved. Optionally
        update type and label.
      parameters:
        - schema:
            type: string
          required: true
          name: agent
          in: path
        - schema:
            type: string
          required: true
          name: service
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - smtp
                    - imap
                    - oauth
                    - api_key
                    - login
                    - custom
                  description: Update credential type
                label:
                  type: string
                  description: Update human-readable label
                credentials:
                  type: object
                  additionalProperties:
                    type: string
                  description: Credential fields to add or update (merged with existing)
      responses:
        '200':
          description: Vault entry updated 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
        '404':
          description: Vault entry not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  error:
                    type: string
                required:
                  - ok
                  - error
        '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.

````