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

# Update automation

> Updates an existing automation with new parameters.



## OpenAPI

````yaml /openapi.yaml put /automations/{id}
openapi: 3.0.0
info:
  title: MailCare API
  version: '1.0'
  description: API documentation for MailCare
servers:
  - url: https://mailcare.io/api/teams/{teamId}
    variables:
      teamId:
        default: '0'
        description: The team identifier
security: []
paths:
  /automations/{id}:
    put:
      tags:
        - Automations
      summary: Update automation
      description: Updates an existing automation with new parameters.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            description: The unique identifier of the automation to update.
      requestBody:
        required: true
        content:
          application/vnd.mailcare.v1+json:
            schema:
              type: object
              required:
                - title
              properties:
                title:
                  type: string
                  description: Title of the automation
                  example: Save pdf invoices
                sender:
                  type: string
                  format: email
                  description: Sender that should match (optional)
                  example: shop@example.com
                inbox:
                  type: string
                  format: email
                  description: Inbox that should match (optional)
                  example: claire@example.com
                subject:
                  type: string
                  description: Subject that should match (optional)
                  example: New invoice
                has_attachments:
                  type: boolean
                  description: Email should have at least one attachment (optional)
                  example: true
                action_url:
                  type: string
                  format: uri
                  description: URL that will be called (optional)
                  example: https://example.com/webhooks/save-pdf-invoices
                action_secret_token:
                  type: string
                  description: Use this token to validate received payloads (optional)
                  example: SECRET12345$
                notification_email:
                  type: string
                  format: email
                  nullable: true
                  description: >-
                    Email address to notify on webhook failures (optional). If
                    empty, no notification is sent. At most one notification is
                    sent per automation per UTC day.
                  example: ops@example.com
                action_delete_email:
                  type: boolean
                  description: Email should be deleted after processing (optional)
                  example: true
                disabled:
                  type: boolean
                  description: Disable this automation without deleting it (optional)
                  example: false
                payload_format:
                  type: string
                  description: Payload format to use (optional)
                  enum:
                    - json
                    - raw
                    - json_with_bodies
                  example: json
      responses:
        '200':
          description: Automation successfully updated.
        '400':
          description: Bad request. Invalid input data.
        '401':
          description: Unauthorized. Authentication is required.
        '403':
          description: Forbidden. Insufficient permissions.
        '404':
          description: Not Found. The specified automation does not exist.
      security:
        - bearer_auth: []
components:
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````