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

# Update a vault item

> Updates an existing vault item, such as its name, secret value, or expiration date.



## OpenAPI

````yaml /api/en/workflows.yaml put /workflows/vault/{vaultId}
openapi: 3.0.3
info:
  title: Altostrat Workflows API
  version: 1.0.0
  description: >-
    Create, validate, execute, and monitor SDX workflows through the public
    `/workflows` gateway path. The reference intentionally omits internal
    dashboard-builder and local development endpoints.
servers:
  - url: https://v1.api.altostrat.io
    description: Altostrat SDX Production API
security: []
tags:
  - name: Workflows
    description: Manage workflow definitions, the core automation blueprints.
  - name: Workflow Runs
    description: Execute, monitor, and manage individual workflow executions.
  - name: Vault
    description: Securely store and manage secrets used by your workflows.
  - name: Webhooks
    description: Endpoints for triggering workflows from external systems.
  - name: Utilities
    description: Helper endpoints for building and debugging workflows.
  - name: Workflow Logs
    description: Inspect workflow execution logs and aggregate log statistics.
  - name: Authorizations
    description: Manage delegated account authorization for workflow runs.
paths:
  /workflows/vault/{vaultId}:
    put:
      tags:
        - Vault
      summary: Update a vault item
      description: >-
        Updates an existing vault item, such as its name, secret value, or
        expiration date.
      parameters:
        - $ref: '#/components/parameters/VaultId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateVaultItemRequest'
      responses:
        '200':
          description: The vault item was updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VaultItem'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - BearerAuth: []
components:
  parameters:
    VaultId:
      name: vaultId
      in: path
      required: true
      description: The prefixed ID of the vault item (e.g., `vlt_...`).
      schema:
        type: string
      example: vlt_01h3j4k5l6m7n8p9q0r1s2t3u4
  schemas:
    UpdateVaultItemRequest:
      type: object
      required:
        - name
        - secret
      properties:
        name:
          type: string
          example: My App's API Token (Updated)
        secret:
          type: string
          example: sec_newkey789
        expires_at:
          type: string
          format: date-time
          nullable: true
    VaultItem:
      type: object
      properties:
        id:
          type: string
          description: The unique prefixed identifier for the vault item.
          example: vlt_01h3j4k5l6m7n8p9q0r1s2t3u4
        name:
          type: string
          description: The name of the vault item. For API keys, use the `api-key:` prefix.
          example: External Service API Key
        created_at:
          type: string
          format: date-time
          description: The timestamp when the item was created.
          example: '2025-10-31T10:00:00.000000Z'
        expires_at:
          type: string
          format: date-time
          nullable: true
          description: The timestamp when the item expires and can no longer be used.
          example: '2026-10-31T10:00:00.000000Z'
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          description: A broad category for the error (e.g., 'invalid_request_error').
          example: invalid_request_error
        code:
          type: string
          description: A short, unique string identifying the specific error.
          example: parameter_missing
        message:
          type: string
          description: A human-readable description of what went wrong.
          example: The 'name' parameter is required for this request.
        doc_url:
          type: string
          description: >-
            A direct link to the documentation page for this specific error
            code.
          example: https://docs.altostrat.io/errors/parameter_missing
  responses:
    BadRequest:
      description: >-
        Bad Request - The request was malformed, missing required parameters, or
        invalid. The response body will contain details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: >-
        Unauthorized - The request requires authentication, but a valid token
        was not provided.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Not Found - The requested resource could not be found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    UnprocessableEntity:
      description: >-
        Unprocessable Entity - The request was well-formed but could not be
        processed due to semantic errors (e.g., validation failure).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ServerError:
      description: Internal Server Error - An unexpected error occurred on the server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Standard JWT for user sessions obtained via Altostrat authentication.

````