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

# Update Vault Template



## OpenAPI

````yaml https://odyssey.asteroid.ai/agents/v2/openapi.yaml patch /vault/templates/{templateId}
openapi: 3.1.0
info:
  title: Agent Service
  version: v1
servers:
  - description: V2 API
    url: https://odyssey.asteroid.ai/agents/v2
security:
  - ApiKeyAuth: []
tags:
  - name: Agents
  - name: Environments
  - name: Schedules
  - name: Execution
  - name: Files
  - name: Agent Profiles
  - name: Agent Profile Pools
  - name: Workflows
  - name: Execution Batches
  - name: Scheduled Executions
  - name: Schema
  - name: Documentation
  - name: Context
  - name: Admin Customer Activity
  - name: Reference
  - name: Workflow Tags
  - name: Vault
paths:
  /vault/templates/{templateId}:
    patch:
      tags:
        - Vault
      summary: Update Vault Template
      operationId: VaultTemplateUpdate
      parameters:
        - in: path
          name: templateId
          required: true
          schema:
            $ref: '#/components/schemas/Common.uuid'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Agents.Vault.UpdateVaultTemplateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agents.Vault.VaultTemplate'
          description: The request has succeeded.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.BadRequestErrorBody'
          description: The server could not understand the request due to invalid syntax.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.UnauthorizedErrorBody'
          description: Access is unauthorized.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.ForbiddenErrorBody'
          description: Access is forbidden.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.NotFoundErrorBody'
          description: The server cannot find the requested resource.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.InternalServerErrorBody'
          description: Server error
components:
  schemas:
    Common.uuid:
      format: uuid
      type: string
    Agents.Vault.UpdateVaultTemplateRequest:
      properties:
        description:
          type: string
        fields:
          items:
            $ref: '#/components/schemas/Agents.Vault.FieldSpecInput'
          type: array
        kind:
          $ref: '#/components/schemas/Agents.Vault.ItemKind'
        name:
          maxLength: 200
          minLength: 1
          type: string
        steps:
          items:
            $ref: '#/components/schemas/Agents.Vault.TemplateStep'
          maxItems: 20
          type: array
      type: object
    Agents.Vault.VaultTemplate:
      description: >-
        A vault template: an ordered field blueprint. organizationId is omitted
        on master presets.
      properties:
        createdAt:
          format: date-time
          type: string
        createdBy:
          $ref: '#/components/schemas/Common.uuid'
        description:
          type: string
        fields:
          items:
            $ref: '#/components/schemas/Agents.Vault.FieldSpec'
          type: array
        id:
          $ref: '#/components/schemas/Common.uuid'
        kind:
          $ref: '#/components/schemas/Agents.Vault.ItemKind'
        name:
          maxLength: 200
          minLength: 1
          type: string
        organizationId:
          allOf:
            - $ref: '#/components/schemas/Common.uuid'
          description: Owning organization. Omitted on master presets.
        origin:
          $ref: '#/components/schemas/Agents.Vault.TemplateOrigin'
        sourceTemplateId:
          allOf:
            - $ref: '#/components/schemas/Common.uuid'
          description: Template this row was copied from. Provenance only.
        steps:
          items:
            $ref: '#/components/schemas/Agents.Vault.TemplateStep'
          maxItems: 20
          type: array
        updatedAt:
          format: date-time
          type: string
      required:
        - id
        - kind
        - name
        - fields
        - steps
        - origin
        - createdAt
        - updatedAt
      type: object
    Common.BadRequestErrorBody:
      properties:
        code:
          enum:
            - 400
          type: number
          x-enum-varnames:
            - BadRequest
        message:
          type: string
      required:
        - code
        - message
      type: object
    Common.UnauthorizedErrorBody:
      properties:
        code:
          enum:
            - 401
          type: number
          x-enum-varnames:
            - Unauthorized
        message:
          type: string
      required:
        - code
        - message
      type: object
    Common.ForbiddenErrorBody:
      properties:
        code:
          enum:
            - 403
          type: number
          x-enum-varnames:
            - Forbidden
        message:
          type: string
      required:
        - code
        - message
      type: object
    Common.NotFoundErrorBody:
      properties:
        code:
          enum:
            - 404
          type: number
          x-enum-varnames:
            - NotFound
        message:
          type: string
      required:
        - code
        - message
      type: object
    Common.InternalServerErrorBody:
      properties:
        code:
          enum:
            - 500
          type: number
          x-enum-varnames:
            - InternalServerError
        message:
          type: string
      required:
        - code
        - message
      type: object
    Agents.Vault.FieldSpecInput:
      description: Write shape for a field. The server derives key from label.
      properties:
        hint:
          description: >-
            Optional guidance shown next to the field, copied from catalog
            credentials when generating masters.
          maxLength: 500
          type: string
        label:
          description: >-
            Human label shown in forms. The field key is UPPER_SNAKE of this
            label.
          maxLength: 200
          minLength: 1
          type: string
        required:
          type: boolean
        type:
          $ref: '#/components/schemas/Agents.Vault.FieldType'
      required:
        - type
        - label
        - required
      type: object
    Agents.Vault.ItemKind:
      description: >-
        Kind of vault item. Templates and items need at least one field.
        Completeness is per-field required.
      enum:
        - login
        - api_key
        - card
        - custom
      type: string
      x-enum-varnames:
        - VaultItemKindLogin
        - VaultItemKindApiKey
        - VaultItemKindCard
        - VaultItemKindCustom
    Agents.Vault.TemplateStep:
      description: >-
        One page of a template's collection wizard. Steps only group and explain
        fields; fields stay the source of truth.
      properties:
        fieldKeys:
          description: >-
            Field keys shown on this step, in order. Each field belongs to at
            most one step. May be empty only when instructions is set.
          items:
            $ref: '#/components/schemas/Agents.Vault.FieldKey'
          type: array
        instructions:
          description: Markdown shown above the step's fields
          maxLength: 4000
          type: string
        key:
          description: Stable identifier. Lower-case slug, unique within the template.
          maxLength: 64
          pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
          type: string
        title:
          maxLength: 200
          minLength: 1
          type: string
      required:
        - key
        - title
        - fieldKeys
      type: object
    Agents.Vault.FieldSpec:
      description: >-
        A field on a template or item. Array order is display order. Sensitivity
        follows FieldType — this model has no hidden flag.
      properties:
        hint:
          description: >-
            Optional guidance shown next to the field, copied from catalog
            credentials when generating masters.
          maxLength: 500
          type: string
        key:
          allOf:
            - $ref: '#/components/schemas/Agents.Vault.FieldKey'
          description: 'Derived from label: UPPER_SNAKE. Read-only.'
        label:
          description: >-
            Human label shown in forms. The field key is UPPER_SNAKE of this
            label.
          maxLength: 200
          minLength: 1
          type: string
        required:
          type: boolean
        type:
          $ref: '#/components/schemas/Agents.Vault.FieldType'
      required:
        - type
        - label
        - required
        - key
      type: object
    Agents.Vault.TemplateOrigin:
      description: >-
        Whether a vault template was generated from the catalog or created by
        hand.
      enum:
        - generated
        - manual
      type: string
      x-enum-varnames:
        - VaultTemplateOriginGenerated
        - VaultTemplateOriginManual
    Agents.Vault.FieldType:
      description: >-
        Type of a vault field. Sensitivity is derived from the type: username,
        email, url, phone, text, card_expiry, and cardholder_name are readable;
        password, hidden, totp_seed, api_key, card_number, and card_cvv are
        write-only. There is no separate hidden flag.
      enum:
        - username
        - email
        - url
        - phone
        - text
        - password
        - hidden
        - totp_seed
        - api_key
        - card_number
        - card_expiry
        - card_cvv
        - cardholder_name
      type: string
      x-enum-varnames:
        - VaultFieldTypeUsername
        - VaultFieldTypeEmail
        - VaultFieldTypeUrl
        - VaultFieldTypePhone
        - VaultFieldTypeText
        - VaultFieldTypePassword
        - VaultFieldTypeHidden
        - VaultFieldTypeTotpSeed
        - VaultFieldTypeApiKey
        - VaultFieldTypeCardNumber
        - VaultFieldTypeCardExpiry
        - VaultFieldTypeCardCvv
        - VaultFieldTypeCardholderName
    Agents.Vault.FieldKey:
      description: UPPER_SNAKE field key, unique within a template or item.
      maxLength: 64
      minLength: 1
      pattern: ^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$
      type: string
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: X-Api-Key
      type: apiKey

````