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

# Update automation

> Updates an existing automation's settings. Only the fields included in the request body are updated.



## OpenAPI

````yaml /openapi.json put /updateAutomation
openapi: 3.1.0
info:
  title: DocsAutomator API
  version: '2.0'
  description: >-
    REST API for programmatic document generation, automation management, and
    e-signature workflows.
  contact:
    name: DocsAutomator Support
    email: support@docsautomator.co
    url: https://docsautomator.co
servers:
  - url: https://api.docsautomator.co
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Documents
    description: Create documents and manage async jobs
  - name: Automations
    description: CRUD operations for automations
  - name: Templates
    description: Template placeholders and duplication
  - name: E-Signatures
    description: Manage signing sessions, links, and audit trails
  - name: Email
    description: Test email delivery
paths:
  /updateAutomation:
    put:
      tags:
        - Automations
      summary: Update automation
      description: >-
        Updates an existing automation's settings. Only the fields included in
        the request body are updated.
      operationId: updateAutomation
      parameters:
        - name: docId
          in: query
          required: true
          schema:
            type: string
          description: The automation ID to update.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: Automation name.
                docTemplateLink:
                  type: string
                  format: uri
                  description: Google Doc template URL.
                newDocumentNameField:
                  type: string
                  description: Field name or formula for generated document names.
                isActive:
                  type: boolean
                  description: Whether the automation is active.
                saveGoogleDoc:
                  type: boolean
                  description: Save a Google Doc copy alongside the PDF.
                googleDocDestinationFolderUrl:
                  type: string
                  format: uri
                  description: Google Drive folder URL for saved documents.
                locale:
                  type: string
                  description: >-
                    Locale for date and number formatting (e.g., `en-us`,
                    `de-de`).
                formatNumbersWithLocale:
                  type: boolean
                  description: Format numbers using the automation's locale.
                pdfExpiration:
                  type: string
                  nullable: true
                  enum:
                    - never
                    - immediate
                    - oneday
                    - threedays
                    - oneweek
                    - twoweeks
                    - onemonth
                    - threemonths
                    - sixmonths
                    - oneyear
                  description: >-
                    PDF expiration period. `never` means PDFs never expire,
                    `immediate` means they expire right away, and other values
                    set the expiration window.
                imageOptions:
                  type: object
                  properties:
                    quality:
                      type: integer
                      description: Image quality (1-100).
                    maxWidth:
                      type: integer
                      description: Maximum image width in pixels.
            example:
              title: Updated Invoice Generator
              isActive: true
              locale: en-us
      responses:
        '200':
          description: Automation updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Success
                  updatedAutomation:
                    $ref: '#/components/schemas/Automation'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    Automation:
      type: object
      properties:
        _id:
          type: string
          description: Automation ID.
        title:
          type: string
        dataSource:
          type: object
          properties:
            name:
              type: string
        dataSourceName:
          type: string
        docTemplateLink:
          type: string
          format: uri
          description: Google Doc template URL.
        newDocumentNameField:
          type: string
        isActive:
          type: boolean
        saveGoogleDoc:
          type: boolean
        locale:
          type: string
        formatNumbersWithLocale:
          type: boolean
        pdfExpiration:
          type: string
          nullable: true
        dateCreated:
          type: string
          format: date-time
        lastPreviewPdf:
          type: string
          format: uri
        esignature:
          type: object
          description: The automation's signing or acceptance step.
          properties:
            enabled:
              type: boolean
            closeType:
              type: string
              enum:
                - signature
                - acceptance
            recipientCount:
              type: integer
            signers:
              type: array
              description: >-
                Each signer as saved. `signer` is the number that
                `recipients[].signer` uses in a document request.
              items:
                type: object
                properties:
                  signer:
                    type: integer
                  role:
                    type: string
                    nullable: true
                  emailSource:
                    type: string
                    enum:
                      - static
                      - placeholder
                      - request
                    description: >-
                      static: a fixed address. placeholder: read from a field or
                      placeholder. request: given with each request in
                      `recipients`.
                  email:
                    type: string
                    nullable: true
                    description: >-
                      The fixed address, or the field or placeholder it reads.
                      Null for request.
                  name:
                    type: string
                    nullable: true
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message.
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Missing required parameter
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key from your workspace settings. Pass as `Authorization: Bearer
        <key>` or `X-API-Key: <key>`. Find it at
        [app.docsautomator.co/settings/workspace/api](https://app.docsautomator.co/settings/workspace/api).

````