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

# Update workflow

> Developer API operation for PATCH /dev/v1/workflows/{id}.



## OpenAPI

````yaml /openapi.json patch /dev/v1/workflows/{id}
openapi: 3.0.3
info:
  title: Shoppex Developer API
  description: Mintlify-compatible Developer API reference for Shoppex.
  version: 1.0.0
  contact:
    name: Shoppex Support
    email: support@shoppex.io
    url: https://shoppex.io
servers:
  - url: https://api.shoppex.io
security:
  - bearerAuth: []
paths:
  /dev/v1/workflows/{id}:
    patch:
      tags:
        - Workflows
      summary: Update workflow
      description: Developer API operation for PATCH /dev/v1/workflows/{id}.
      operationId: patchDevV1WorkflowsById
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 80
                note:
                  type: string
                  nullable: true
                  maxLength: 280
                definition:
                  type: object
                  required:
                    - trigger
                    - conditions
                    - steps
                    - settings
                  properties:
                    trigger:
                      type: object
                      required:
                        - type
                        - config
                      properties:
                        type:
                          type: string
                          maxLength: 64
                        config:
                          type: object
                          additionalProperties:
                            type: object
                            additionalProperties: true
                    conditions:
                      type: object
                      required:
                        - match
                        - conditions
                      properties:
                        match:
                          type: string
                          enum:
                            - all
                            - any
                        conditions:
                          type: array
                          maxItems: 50
                          items:
                            type: object
                            required:
                              - id
                              - field
                              - operator
                            properties:
                              id:
                                type: string
                                maxLength: 64
                              field:
                                type: string
                                maxLength: 64
                              operator:
                                type: string
                                maxLength: 32
                              value:
                                anyOf:
                                  - type: string
                                    nullable: true
                                    maxLength: 500
                                  - type: number
                                    nullable: true
                                  - type: boolean
                                    nullable: true
                                  - type: array
                                    nullable: true
                                    maxItems: 100
                                    items:
                                      type: string
                                      maxLength: 200
                    steps:
                      type: array
                      maxItems: 40
                      items:
                        anyOf:
                          - type: object
                            required:
                              - id
                              - kind
                              - action
                              - params
                              - continue_on_error
                            properties:
                              id:
                                type: string
                                maxLength: 64
                              kind:
                                type: string
                                enum:
                                  - action
                              action:
                                type: string
                                maxLength: 64
                              params:
                                type: object
                                additionalProperties:
                                  type: object
                                  additionalProperties: true
                              continue_on_error:
                                type: boolean
                          - type: object
                            required:
                              - id
                              - kind
                              - amount
                              - unit
                            properties:
                              id:
                                type: string
                                maxLength: 64
                              kind:
                                type: string
                                enum:
                                  - delay
                              amount:
                                type: number
                              unit:
                                type: string
                                enum:
                                  - minutes
                                  - hours
                                  - days
                          - type: object
                            required:
                              - id
                              - kind
                              - conditions
                            properties:
                              id:
                                type: string
                                maxLength: 64
                              kind:
                                type: string
                                enum:
                                  - check
                              conditions:
                                type: object
                                required:
                                  - match
                                  - conditions
                                properties:
                                  match:
                                    type: string
                                    enum:
                                      - all
                                      - any
                                  conditions:
                                    type: array
                                    maxItems: 50
                                    items:
                                      type: object
                                      required:
                                        - id
                                        - field
                                        - operator
                                      properties:
                                        id:
                                          type: string
                                          maxLength: 64
                                        field:
                                          type: string
                                          maxLength: 64
                                        operator:
                                          type: string
                                          maxLength: 32
                                        value:
                                          anyOf:
                                            - type: string
                                              nullable: true
                                              maxLength: 500
                                            - type: number
                                              nullable: true
                                            - type: boolean
                                              nullable: true
                                            - type: array
                                              nullable: true
                                              maxItems: 100
                                              items:
                                                type: string
                                                maxLength: 200
                    settings:
                      type: object
                      required:
                        - run_limit
                        - max_runs_per_hour
                      properties:
                        run_limit:
                          type: string
                          enum:
                            - every_time
                            - once_per_customer
                            - once_per_order
                        max_runs_per_hour:
                          type: number
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 80
                note:
                  type: string
                  nullable: true
                  maxLength: 280
                definition:
                  type: object
                  required:
                    - trigger
                    - conditions
                    - steps
                    - settings
                  properties:
                    trigger:
                      type: object
                      required:
                        - type
                        - config
                      properties:
                        type:
                          type: string
                          maxLength: 64
                        config:
                          type: object
                          additionalProperties:
                            type: object
                            additionalProperties: true
                    conditions:
                      type: object
                      required:
                        - match
                        - conditions
                      properties:
                        match:
                          type: string
                          enum:
                            - all
                            - any
                        conditions:
                          type: array
                          maxItems: 50
                          items:
                            type: object
                            required:
                              - id
                              - field
                              - operator
                            properties:
                              id:
                                type: string
                                maxLength: 64
                              field:
                                type: string
                                maxLength: 64
                              operator:
                                type: string
                                maxLength: 32
                              value:
                                anyOf:
                                  - type: string
                                    nullable: true
                                    maxLength: 500
                                  - type: number
                                    nullable: true
                                  - type: boolean
                                    nullable: true
                                  - type: array
                                    nullable: true
                                    maxItems: 100
                                    items:
                                      type: string
                                      maxLength: 200
                    steps:
                      type: array
                      maxItems: 40
                      items:
                        anyOf:
                          - type: object
                            required:
                              - id
                              - kind
                              - action
                              - params
                              - continue_on_error
                            properties:
                              id:
                                type: string
                                maxLength: 64
                              kind:
                                type: string
                                enum:
                                  - action
                              action:
                                type: string
                                maxLength: 64
                              params:
                                type: object
                                additionalProperties:
                                  type: object
                                  additionalProperties: true
                              continue_on_error:
                                type: boolean
                          - type: object
                            required:
                              - id
                              - kind
                              - amount
                              - unit
                            properties:
                              id:
                                type: string
                                maxLength: 64
                              kind:
                                type: string
                                enum:
                                  - delay
                              amount:
                                type: number
                              unit:
                                type: string
                                enum:
                                  - minutes
                                  - hours
                                  - days
                          - type: object
                            required:
                              - id
                              - kind
                              - conditions
                            properties:
                              id:
                                type: string
                                maxLength: 64
                              kind:
                                type: string
                                enum:
                                  - check
                              conditions:
                                type: object
                                required:
                                  - match
                                  - conditions
                                properties:
                                  match:
                                    type: string
                                    enum:
                                      - all
                                      - any
                                  conditions:
                                    type: array
                                    maxItems: 50
                                    items:
                                      type: object
                                      required:
                                        - id
                                        - field
                                        - operator
                                      properties:
                                        id:
                                          type: string
                                          maxLength: 64
                                        field:
                                          type: string
                                          maxLength: 64
                                        operator:
                                          type: string
                                          maxLength: 32
                                        value:
                                          anyOf:
                                            - type: string
                                              nullable: true
                                              maxLength: 500
                                            - type: number
                                              nullable: true
                                            - type: boolean
                                              nullable: true
                                            - type: array
                                              nullable: true
                                              maxItems: 100
                                              items:
                                                type: string
                                                maxLength: 200
                    settings:
                      type: object
                      required:
                        - run_limit
                        - max_runs_per_hour
                      properties:
                        run_limit:
                          type: string
                          enum:
                            - every_time
                            - once_per_customer
                            - once_per_order
                        max_runs_per_hour:
                          type: number
          multipart/form-data:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 80
                note:
                  type: string
                  nullable: true
                  maxLength: 280
                definition:
                  type: object
                  required:
                    - trigger
                    - conditions
                    - steps
                    - settings
                  properties:
                    trigger:
                      type: object
                      required:
                        - type
                        - config
                      properties:
                        type:
                          type: string
                          maxLength: 64
                        config:
                          type: object
                          additionalProperties:
                            type: object
                            additionalProperties: true
                    conditions:
                      type: object
                      required:
                        - match
                        - conditions
                      properties:
                        match:
                          type: string
                          enum:
                            - all
                            - any
                        conditions:
                          type: array
                          maxItems: 50
                          items:
                            type: object
                            required:
                              - id
                              - field
                              - operator
                            properties:
                              id:
                                type: string
                                maxLength: 64
                              field:
                                type: string
                                maxLength: 64
                              operator:
                                type: string
                                maxLength: 32
                              value:
                                anyOf:
                                  - type: string
                                    nullable: true
                                    maxLength: 500
                                  - type: number
                                    nullable: true
                                  - type: boolean
                                    nullable: true
                                  - type: array
                                    nullable: true
                                    maxItems: 100
                                    items:
                                      type: string
                                      maxLength: 200
                    steps:
                      type: array
                      maxItems: 40
                      items:
                        anyOf:
                          - type: object
                            required:
                              - id
                              - kind
                              - action
                              - params
                              - continue_on_error
                            properties:
                              id:
                                type: string
                                maxLength: 64
                              kind:
                                type: string
                                enum:
                                  - action
                              action:
                                type: string
                                maxLength: 64
                              params:
                                type: object
                                additionalProperties:
                                  type: object
                                  additionalProperties: true
                              continue_on_error:
                                type: boolean
                          - type: object
                            required:
                              - id
                              - kind
                              - amount
                              - unit
                            properties:
                              id:
                                type: string
                                maxLength: 64
                              kind:
                                type: string
                                enum:
                                  - delay
                              amount:
                                type: number
                              unit:
                                type: string
                                enum:
                                  - minutes
                                  - hours
                                  - days
                          - type: object
                            required:
                              - id
                              - kind
                              - conditions
                            properties:
                              id:
                                type: string
                                maxLength: 64
                              kind:
                                type: string
                                enum:
                                  - check
                              conditions:
                                type: object
                                required:
                                  - match
                                  - conditions
                                properties:
                                  match:
                                    type: string
                                    enum:
                                      - all
                                      - any
                                  conditions:
                                    type: array
                                    maxItems: 50
                                    items:
                                      type: object
                                      required:
                                        - id
                                        - field
                                        - operator
                                      properties:
                                        id:
                                          type: string
                                          maxLength: 64
                                        field:
                                          type: string
                                          maxLength: 64
                                        operator:
                                          type: string
                                          maxLength: 32
                                        value:
                                          anyOf:
                                            - type: string
                                              nullable: true
                                              maxLength: 500
                                            - type: number
                                              nullable: true
                                            - type: boolean
                                              nullable: true
                                            - type: array
                                              nullable: true
                                              maxItems: 100
                                              items:
                                                type: string
                                                maxLength: 200
                    settings:
                      type: object
                      required:
                        - run_limit
                        - max_runs_per_hour
                      properties:
                        run_limit:
                          type: string
                          enum:
                            - every_time
                            - once_per_customer
                            - once_per_order
                        max_runs_per_hour:
                          type: number
      responses:
        '200':
          description: Response for status 200
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    required:
                      - id
                      - name
                      - note
                      - status
                      - trigger_type
                      - created_at
                      - updated_at
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      note:
                        type: string
                        nullable: true
                      status:
                        type: string
                        enum:
                          - DRAFT
                          - ACTIVE
                          - PAUSED
                      trigger_type:
                        type: string
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      definition:
                        type: object
                        additionalProperties: true
                      issues:
                        type: array
                        items:
                          type: object
                          required:
                            - path
                            - message
                          properties:
                            path:
                              type: string
                            message:
                              type: string
                            code:
                              type: string
                              enum:
                                - EMAIL_ORDER_REQUIRED
                          additionalProperties: true
                    additionalProperties: true
                additionalProperties: true
        '400':
          description: Response for status 400
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - data
                  - error
                  - message
                  - log
                  - env
                properties:
                  status:
                    type: integer
                  data:
                    nullable: true
                  error:
                    type: string
                  message:
                    type: string
                    nullable: true
                  log:
                    nullable: true
                  env:
                    type: string
                additionalProperties: true
        '401':
          description: Response for status 401
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '403':
          description: Response for status 403
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '404':
          description: Response for status 404
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '409':
          description: Response for status 409
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '422':
          description: Response for status 422
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '429':
          description: Response for status 429
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '500':
          description: Response for status 500
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    required:
                      - error
                    properties:
                      error:
                        type: object
                        required:
                          - code
                          - message
                          - doc_url
                        properties:
                          code:
                            type: string
                          message:
                            type: string
                          doc_url:
                            type: string
                          details:
                            type: array
                            items:
                              type: object
                              required:
                                - field
                                - message
                              properties:
                                field:
                                  type: string
                                message:
                                  type: string
                              additionalProperties: true
                          subcode:
                            type: string
                        additionalProperties: true
                    additionalProperties: true
                  - type: object
                    required:
                      - status
                      - data
                      - error
                      - message
                      - log
                      - env
                    properties:
                      status:
                        type: integer
                      data:
                        nullable: true
                      error:
                        type: string
                      message:
                        type: string
                        nullable: true
                      log:
                        nullable: true
                      env:
                        type: string
                    additionalProperties: true
        '503':
          description: Response for status 503
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
      deprecated: false
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Use your Shoppex API key in the Authorization header.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.