v4

latestOpenAPI 3.0.0MIT2026-07-311494532.1 MB
Workflows

Update a workflow

Updates the details of an existing workflow, here workflowId is the identifier of the workflow

put/v2/workflows/{workflowId}

Path parameters

workflowIdstring required

Headers

idempotency-keystring

A header for idempotency purposes

Request body

namestring required

Name of the workflow

descriptionstring

Description of the workflow

tagsstring[]

Tags associated with the workflow

activeboolean

Whether the workflow is active

validatePayloadboolean

Enable or disable payload schema validation

payloadSchemaobject nullable

The payload JSON Schema for the workflow

isTranslationEnabledboolean

Enable or disable translations for this workflow

workflowIdstring

Workflow ID (allowed only for code-first workflows)

origin'novu-cloud' | 'novu-cloud-v1' | 'external'

Origin of the layout

severity'high' | 'medium' | 'low' | 'none'

Severity of the workflow

Example request

{
  "steps": [
    {
      "controlValues": {
        "skip": {
          "and": [
            {
              "==": [
                {
                  "var": "payload.tier"
                },
                "pro"
              ]
            },
            {
              "==": [
                {
                  "var": "subscriber.data.role"
                },
                "admin"
              ]
            },
            {
              ">": [
                {
                  "var": "payload.amount"
                },
                "4"
              ]
            }
          ]
        }
      }
    }
  ],
  "preferences": {
    "user": {
      "channels": {
        "email": {
          "enabled": true
        },
        "sms": {
          "enabled": false
        }
      }
    },
    "workflow": {
      "channels": {
        "email": {
          "enabled": true
        },
        "sms": {
          "enabled": false
        }
      }
    }
  }
}

Response

OK

namestring required

Name of the workflow

descriptionstring

Description of the workflow

tagsstring[]

Tags associated with the workflow

activeboolean

Whether the workflow is active

validatePayloadboolean

Enable or disable payload schema validation

payloadSchemaobject nullable

The payload JSON Schema for the workflow

isTranslationEnabledboolean

Enable or disable translations for this workflow

_idstring required

Database identifier of the workflow

workflowIdstring required

Workflow identifier

slugstring required

Slug of the workflow

updatedAtstring required

Last updated timestamp

createdAtstring required

Creation timestamp

lastPublishedAtstring nullable

Timestamp of the last workflow publication

origin'novu-cloud' | 'novu-cloud-v1' | 'external' required

Origin of the layout

status'ACTIVE' | 'INACTIVE' | 'ERROR' required

Status of the workflow

issuesobject

Runtime issues for workflow creation and update

lastTriggeredAtstring nullable

Timestamp of the last workflow trigger

payloadExampleobject nullable

Generated payload example based on the payload schema

severity'high' | 'medium' | 'low' | 'none' required

Severity of the workflow

Example response

{
  "steps": [
    {
      "controls": {
        "values": {
          "skip": {
            "and": [
              {
                "==": [
                  {
                    "var": "payload.tier"
                  },
                  "pro"
                ]
              },
              {
                "==": [
                  {
                    "var": "subscriber.data.role"
                  },
                  "admin"
                ]
              },
              {
                ">": [
                  {
                    "var": "payload.amount"
                  },
                  "4"
                ]
              }
            ]
          }
        }
      },
      "controlValues": {
        "skip": {
          "and": [
            {
              "==": [
                {
                  "var": "payload.tier"
                },
                "pro"
              ]
            },
            {
              "==": [
                {
                  "var": "subscriber.data.role"
                },
                "admin"
              ]
            },
            {
              ">": [
                {
                  "var": "payload.amount"
                },
                "4"
              ]
            }
          ]
        }
      },
      "providerOverrides": {
        "slack": {
          "text": "{{payload.title}}",
          "blocks": [
            {
              "type": "divider"
            }
          ]
        },
        "whatsapp-business": {
          "type": "text",
          "text": {
            "body": "{{payload.title}}"
          }
        },
        "pagerduty": {
          "severity": "warning",
          "source": "novu",
          "summary": "{{payload.title}}"
        }
      }
    }
  ],
  "preferences": {
    "user": {
      "channels": {
        "email": {
          "enabled": true
        },
        "sms": {
          "enabled": false
        }
      }
    },
    "default": {
      "channels": {
        "email": {
          "enabled": true
        },
        "sms": {
          "enabled": false
        }
      }
    }
  }
}