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

# Update an attachment's declarations

> Replace an attachment's static declaration values and reconcile ``options``, re-running
the attach validators and reconcilers and recomposing the effective schema.



## OpenAPI

````yaml /openapi.json patch /api/states/{name}/attachments/{template}
openapi: 3.1.0
info:
  description: The operator HTTP surface served under /api/*.
  title: tai42-skeleton API
  version: 14.0.2
servers: []
security: []
paths:
  /api/states/{name}/attachments/{template}:
    patch:
      tags:
        - states
      summary: Update an attachment's declarations
      description: >-
        Replace an attachment's static declaration values and reconcile
        ``options``, re-running

        the attach validators and reconcilers and recomposing the effective
        schema.
      operationId: patch_api_states_name_attachments_template
      parameters:
        - in: path
          name: name
          required: true
          schema:
            type: string
        - in: path
          name: template
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/AttachUpdateAck'
                required:
                  - data
                type: object
          description: Success.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Missing or invalid api key.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Resource not found.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Conflict with the current resource state.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Request failed validation.
        '501':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Error.
      security:
        - ApiKeyAuth: []
components:
  schemas:
    AttachUpdateAck:
      description: >-
        An attachment-declarations update confirmation — the ``state`` and
        ``template``

        updated.
      properties:
        state:
          title: State
          type: string
        template:
          title: Template
          type: string
        updated:
          title: Updated
          type: boolean
      required:
        - updated
        - state
        - template
      title: AttachUpdateAck
      type: object
    Error:
      properties:
        code:
          description: >-
            Stable machine-readable reason a client keys a dedicated error state
            on, present on refusals that opt in (e.g. a 501 not-configured
            refusal). Optional: absent when the error carries only a
            human-readable message.
          type: string
        error:
          type: string
      required:
        - error
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````