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

# Update a workflow

> Update an existing workflow given its UUID.



## OpenAPI

````yaml PATCH /transform/v1/workflows/{id}
openapi: 3.0.0
info:
  contact:
    email: dev@invopop.com
    name: Invopop Developers
  description: >-
    The Invopop Transform Service API offers end points to be able to manage
    tasks and workflows with the primary objective being to send requests for
    jobs.
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  title: Transform Service API
  version: 1.0.1
servers:
  - description: production
    url: https://api.invopop.com
security:
  - authToken: []
paths:
  /transform/v1/workflows/{id}:
    patch:
      description: Update an existing workflow given its UUID.
      parameters:
        - description: UUID of the workflow to update.
          in: path
          name: id
          required: true
          schema:
            description: UUID of the workflow to update.
            example: 186522a6-e697-4e34-8498-eee961bcb845
            title: ID
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransformUpdateWorkflow'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransformWorkflow'
          description: OK
components:
  schemas:
    TransformUpdateWorkflow:
      properties:
        description:
          description: Updated description.
          title: Description
          type: string
        draft:
          description: >-
            When true, the current version of the workflow will not be
            published.
          title: Draft
          type: boolean
        name:
          description: New name for the workflow.
          title: Name
          type: string
        rescue:
          description: Array of steps to execute en case of an unmanaged KO.
          items:
            $ref: '#/components/schemas/TransformStep'
          nullable: true
          title: Rescue
          type: array
        steps:
          description: Array of Steps to use for this workflow.
          items:
            $ref: '#/components/schemas/TransformStep'
          nullable: true
          title: Steps
          type: array
      type: object
    TransformWorkflow:
      properties:
        country:
          description: ISO country code the workflow will be used for.
          title: Country
          type: string
        created_at:
          description: When the workflow was created.
          title: Created At
          type: string
        description:
          description: Description of the workflow
          title: Description
          type: string
        disabled:
          description: When true, this workflow can no longer be used.
          title: Disabled
          type: boolean
        draft:
          description: >-
            When true, this workflow is still in draft mode and will not be used
            in jobs.
          title: Draft
          type: boolean
        hash:
          description: Partial SHA256 hash of the workflow's contents.
          title: Hash
          type: string
        id:
          description: The UUID (any version) of the workflow.
          example: 186522a6-e697-4e34-8498-eee961bcb845
          title: ID
          type: string
        name:
          description: Name of the workflow
          title: Name
          type: string
        rescue:
          description: >-
            List of steps to execute when a KO status is returned by a previous
            step and not explicitly managed.
          items:
            $ref: '#/components/schemas/TransformStep'
          nullable: true
          title: Rescue
          type: array
        schema:
          description: Short schema name that the workflow will be allowed to process.
          title: Schema
          type: string
        steps:
          description: List of steps to execute.
          items:
            $ref: '#/components/schemas/TransformStep'
          nullable: true
          title: Steps
          type: array
        updated_at:
          description: When the workflow was last updated.
          title: Updated At
          type: string
        version:
          description: Version of the workflow's contents currently defined.
          title: Version
          type: string
        versions:
          description: >-
            List of previously published versions of this workflow, only
            provided when requesting the primary workflow.
          items:
            $ref: '#/components/schemas/TransformWorkflowVersion'
          title: Versions
          type: array
      type: object
    TransformStep:
      properties:
        action:
          description: ID of the action to execute
          example: email.send
          title: Action
          type: string
        config:
          description: JSON configuration sent to the provider
          title: Configuration
          type: object
        id:
          description: The UUID (any version) of the step.
          example: 186522a6-e697-4e34-8498-eee961bcb845
          title: ID
          type: string
        name:
          description: Name of the step
          title: Name
          type: string
        next:
          description: Optional array of next steps to execute after this one.
          items:
            $ref: '#/components/schemas/TransformNext'
          title: Next
          type: array
        notes:
          description: Additional internal details
          title: Notes
          type: string
        summary:
          description: Summary of the step's configuration.
          title: Summary
          type: string
      type: object
    TransformWorkflowVersion:
      properties:
        created_at:
          description: Timestamp of when the version was created.
          title: Created At
          type: string
        hash:
          description: Partial hash to identify the workflow definition.
          title: Hash
          type: string
        name:
          description: Name of the previous version.
          title: Name
          type: string
        src:
          description: Key for the source of the version when created, like 'user'.
          title: Src
          type: string
        src_id:
          description: ID of the source object that published the version.
          title: Src ID
          type: string
        version:
          description: Version number of the workflow.
          title: Version
          type: string
      type: object
    TransformNext:
      properties:
        code:
          description: Code to match against
          title: Code
          type: string
        status:
          description: >-
            Step status to match against, when empty this next step will always
            be executed.
          enum:
            - OK
            - SKIP
            - KO
            - TIMEOUT
          title: Status
          type: string
        step_id:
          description: ID of the step to execute next.
          example: 186522a6-e697-4e34-8498-eee961bcb845
          title: Step ID
          type: string
        steps:
          description: Array of steps to execute
          items:
            $ref: '#/components/schemas/TransformStep'
          title: Steps
          type: array
        stop:
          description: When true, the workflow will stop.
          title: Stop
          type: boolean
      type: object
  securitySchemes:
    authToken:
      bearerFormat: JWT
      description: >-
        Use the `Bearer` scheme with a valid JWT token to authenticate requests.
        Example: `Authorization: Bearer <token>`
      scheme: bearer
      type: http

````