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

# Update user automation preference (enable/disable)

> Sets the calling user's per-automation enabled flag. The flag is stored on the User document (under `automations[id].enabled`), not on the Automation itself — different users can have different on/off states for the same automation.



## OpenAPI

````yaml /api-reference/openapi.yaml patch /api/automations/{id}/preference
openapi: 3.0.3
info:
  title: Tether Relay and Tether API
  version: 1.0.0
  description: >-
    Route-derived OpenAPI contract generated from tether-relay backend sources.
    Regenerate with scripts/sync-openapi-from-backend.mjs.
servers:
  - url: https://your-instance.example.com
    description: Production
  - url: http://localhost:2212
    description: Local API service
security: []
tags:
  - name: AI
  - name: Applications
  - name: Approval
  - name: Auth
  - name: Automations
  - name: Calls
  - name: Campaigns
  - name: Contact Analytics
  - name: Contact Metrics
  - name: Contact Notes
  - name: Contacts
  - name: Conversation Monitor
  - name: Conversations
  - name: Departments
  - name: Email
  - name: Escalation Dashboard
  - name: Event Logs
  - name: Google Sheets
  - name: Marketplace
  - name: Messages
  - name: Notification Sounds
  - name: Notifications
  - name: Org Snapshots
  - name: Organizations
  - name: Outreach
  - name: Outreach Metrics
  - name: Outreach Sources
  - name: Pipelines
  - name: Processes
  - name: Prompts
  - name: Reminders
  - name: Sms
  - name: Templates
  - name: Traces
  - name: Training
  - name: Upload
  - name: User Snapshots
  - name: Users
  - name: Vertical
  - name: Webchats
  - name: Webhook
paths:
  /api/automations/{id}/preference:
    patch:
      tags:
        - Automations
      summary: Update user automation preference (enable/disable)
      description: >-
        Sets the calling user's per-automation enabled flag. The flag is stored
        on the User document (under `automations[id].enabled`), not on the
        Automation itself — different users can have different on/off states for
        the same automation.
      operationId: patch_automations_preference
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AutomationPreferenceRequest'
      responses:
        '200':
          description: Automation preference updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationPreferenceResponse'
        '400':
          description: enabled field is required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationsErrorResponse'
        '404':
          description: Automation not found in your organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationsErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    AutomationPreferenceRequest:
      type: object
      properties:
        enabled:
          type: boolean
          description: >-
            Per-user on/off flag for the automation; stored on the User document
            (not the Automation itself).
      required:
        - enabled
      additionalProperties: true
      example:
        enabled: true
    AutomationPreferenceResponse:
      type: object
      description: >-
        Returned after a user toggles per-user enabled state for an automation.
        The flag is stored on the User document, not the Automation.
      properties:
        success:
          type: boolean
          enum:
            - true
        message:
          type: string
        data:
          type: object
          properties:
            automationId:
              type: string
            enabled:
              type: boolean
          required:
            - automationId
            - enabled
          additionalProperties: true
      required:
        - success
        - data
      additionalProperties: true
      example:
        success: true
        message: Automation enabled successfully
        data:
          automationId: 64d2f9c5e8a1d4e001a0b1c2
          enabled: true
    AutomationsErrorResponse:
      type: object
      description: Standard error envelope for Automations endpoints.
      properties:
        success:
          type: boolean
          enum:
            - false
        message:
          type: string
      required:
        - success
      additionalProperties: true
      example:
        success: false
        message: Automation not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````