> ## 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.

# Toggle workflow enabled state

> Sets the workflow's `enabled` flag (organization-scoped) without modifying the canvas. Disabled workflows are skipped by the trigger system even when their conditions match.



## OpenAPI

````yaml /api-reference/openapi.yaml patch /api/workflows/{id}/toggle
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/workflows/{id}/toggle:
    patch:
      tags:
        - Workflows
      summary: Toggle workflow enabled state
      description: >-
        Sets the workflow's `enabled` flag (organization-scoped) without
        modifying the canvas. Disabled workflows are skipped by the trigger
        system even when their conditions match.
      operationId: patch_workflows_toggle
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowToggleRequest'
      responses:
        '200':
          description: Workflow toggled successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowMutationResponse'
        '400':
          description: Enabled status must be a boolean
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowsErrorResponse'
        '404':
          description: Workflow not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowsErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    WorkflowToggleRequest:
      type: object
      properties:
        enabled:
          type: boolean
          description: >-
            New enabled state. When false, the trigger system skips this
            workflow even when conditions match.
      required:
        - enabled
      additionalProperties: true
      example:
        enabled: false
    WorkflowMutationResponse:
      type: object
      description: >-
        Returned by create/update/toggle. Wraps the resulting `WorkflowDocument`
        plus a status message.
      properties:
        success:
          type: boolean
          enum:
            - true
        message:
          type: string
        data:
          $ref: '#/components/schemas/WorkflowDocument'
      required:
        - success
        - message
        - data
      additionalProperties: true
      example:
        success: true
        message: Workflow created successfully
        data:
          _id: 64d2f9c5e8a1d4e001a0b1c2
          name: New Lead Welcome
          description: Greet new leads and assign them to a leasing agent.
          organizationId: 64a1b2c3d4e5f60012345678
          userId: 64a1b2c3d4e5f60012345679
          nodes: []
          edges: []
          viewport:
            x: 0
            'y': 0
            zoom: 1
          enabled: false
          createdAt: '2026-04-12T14:22:10.000Z'
          updatedAt: '2026-04-12T14:22:10.000Z'
    WorkflowsErrorResponse:
      type: object
      description: Standard error envelope for Workflows endpoints.
      properties:
        success:
          type: boolean
          enum:
            - false
        message:
          type: string
      required:
        - success
      additionalProperties: true
      example:
        success: false
        message: Workflow not found
    WorkflowDocument:
      type: object
      description: >-
        A `Workflow` document — visual builder canvas (nodes + edges) plus
        enabled flag and metadata.
      properties:
        _id:
          type: string
        name:
          type: string
        description:
          type: string
        organizationId:
          type: string
        userId:
          type: string
        nodes:
          type: array
          items:
            type: object
            additionalProperties: true
        edges:
          type: array
          items:
            type: object
            additionalProperties: true
        viewport:
          type: object
          properties:
            x:
              type: number
            'y':
              type: number
            zoom:
              type: number
          additionalProperties: true
        enabled:
          type: boolean
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      additionalProperties: true
      example:
        _id: 64d2f9c5e8a1d4e001a0b1c2
        name: New Lead Welcome
        description: Greet new leads and assign them to a leasing agent.
        organizationId: 64a1b2c3d4e5f60012345678
        userId: 64a1b2c3d4e5f60012345679
        nodes:
          - id: n1
            type: trigger
            position:
              x: 50
              'y': 50
            data:
              event: application.created
          - id: n2
            type: sendMessage
            position:
              x: 250
              'y': 50
            data:
              template: welcome-sms
        edges:
          - id: e1
            source: n1
            target: n2
        viewport:
          x: 0
          'y': 0
          zoom: 1
        enabled: true
        createdAt: '2026-04-12T14:22:10.000Z'
        updatedAt: '2026-04-22T10:14:00.000Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````