Workflows

Update a workflow

Partially updates a workflow by its unique identifier workflowId

patch/v2/workflows/{workflowId}

Request

  • Base URL: https://api.notifly.io
  • URL: https://api.notifly.io/v2/workflows/{workflowId}
  • Auth: API key in header Authorization

Path parameters

workflowIdstring required

Request body

activeboolean

Activate or deactivate the workflow

namestring

New name for the workflow

descriptionstring

Updated description of the workflow

tagsstring[]

Tags associated with the workflow

payloadSchemaobject nullable

The payload JSON Schema for the workflow

validatePayloadboolean

Enable or disable payload schema validation

isTranslationEnabledboolean

Enable or disable translations for this workflow

Response

OK

Example response

{
  "data": {
    "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
          }
        }
      }
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.