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

# Toggle workflow on or off

> Enables or disables the workflow. Returns nothing.



## OpenAPI

````yaml /openapi.yaml post /workflow/{workflowId}
openapi: 3.1.0
info:
  version: 1.1.0
  title: Ocoya API
  description: REST API reference for Ocoya.
servers:
  - url: https://app.ocoya.com/api/_public/v1
security:
  - ApiKeyAuth: []
paths:
  /workflow/{workflowId}:
    post:
      summary: Toggle workflow on or off
      description: Enables or disables the workflow. Returns nothing.
      parameters:
        - in: path
          name: workflowId
          required: true
          description: Ocoya workflow ID.
          schema:
            type: string
            example: cmajvvb9q0003ja5vh0538j6r
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - 'on'
              properties:
                'on':
                  type: boolean
                  description: >-
                    Set to `true` to enable the workflow or `false` to disable
                    it.
                  example: true
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````