Notifly
API ReferenceWorkflows

Sync a workflow

Synchronizes a workflow to the target environment

PUT
/v2/workflows/{workflowId}/sync

Synchronizes a workflow to the target environment

Authorization

secretKey
Authorization<token>

API key authentication. Allowed headers-- "Authorization: ApiKey <secret_key>".

In: header

Path Parameters

workflowId*string

Request Body

application/json

Sync workflow details

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/v2/workflows/string/sync" \  -H "Content-Type: application/json" \  -d '{    "targetEnvironmentId": "string"  }'
{  "data": {    "name": "string",    "description": "string",    "tags": [      "string"    ],    "active": false,    "validatePayload": true,    "payloadSchema": {},    "isTranslationEnabled": false,    "_id": "string",    "workflowId": "string",    "slug": "string",    "updatedAt": "string",    "createdAt": "string",    "updatedBy": {      "_id": "string",      "firstName": "string",      "lastName": "string",      "externalId": "string"    },    "lastPublishedAt": "string",    "lastPublishedBy": {      "_id": "string",      "firstName": "string",      "lastName": "string",      "externalId": "string"    },    "steps": [      {        "controls": {          "dataSchema": {},          "uiSchema": {            "group": "IN_APP",            "properties": {              "property1": {                "placeholder": "string",                "component": "EMAIL_EDITOR_SELECT",                "properties": {                  "property1": {},                  "property2": {}                }              },              "property2": {                "placeholder": "string",                "component": "EMAIL_EDITOR_SELECT",                "properties": {                  "property1": {},                  "property2": {}                }              }            }          },          "values": {            "skip": {              "and": [                {                  "==": [                    {                      "var": "payload.tier"                    },                    "pro"                  ]                },                {                  "==": [                    {                      "var": "subscriber.data.role"                    },                    "admin"                  ]                },                {                  ">": [                    {                      "var": "payload.amount"                    },                    "4"                  ]                }              ]            },            "body": "string",            "subject": "string",            "avatar": "string",            "primaryAction": {              "label": "string",              "redirect": {                "url": "string",                "target": "_self"              }            },            "secondaryAction": {              "label": "string",              "redirect": {                "url": "string",                "target": "_self"              }            },            "redirect": {              "url": "string",              "target": "_self"            },            "disableOutputSanitization": false,            "data": {}          }        },        "controlValues": {          "skip": {            "and": [              {                "==": [                  {                    "var": "payload.tier"                  },                  "pro"                ]              },              {                "==": [                  {                    "var": "subscriber.data.role"                  },                  "admin"                ]              },              {                ">": [                  {                    "var": "payload.amount"                  },                  "4"                ]              }            ]          },          "body": "string",          "subject": "string",          "avatar": "string",          "primaryAction": {            "label": "string",            "redirect": {              "url": "string",              "target": "_self"            }          },          "secondaryAction": {            "label": "string",            "redirect": {              "url": "string",              "target": "_self"            }          },          "redirect": {            "url": "string",            "target": "_self"          },          "disableOutputSanitization": false,          "data": {}        },        "variables": {},        "stepId": "string",        "_id": "string",        "name": "string",        "slug": "string",        "type": "in_app",        "origin": "novu-cloud",        "workflowId": "string",        "workflowDatabaseId": "string",        "issues": {          "controls": {            "property1": [              {                "issueType": "ILLEGAL_VARIABLE_IN_CONTROL_VALUE",                "variableName": "string",                "message": "string"              }            ],            "property2": [              {                "issueType": "ILLEGAL_VARIABLE_IN_CONTROL_VALUE",                "variableName": "string",                "message": "string"              }            ]          },          "integration": {            "property1": [              {                "issueType": "MISSING_INTEGRATION",                "variableName": "string",                "message": "string"              }            ],            "property2": [              {                "issueType": "MISSING_INTEGRATION",                "variableName": "string",                "message": "string"              }            ]          }        },        "stepResolverHash": "string"      }    ],    "origin": "novu-cloud",    "preferences": {      "user": {        "all": {          "enabled": true,          "readOnly": false        },        "channels": {          "email": {            "enabled": true          },          "sms": {            "enabled": false          }        }      },      "default": {        "all": {          "enabled": true,          "readOnly": false        },        "channels": {          "email": {            "enabled": true          },          "sms": {            "enabled": false          }        }      }    },    "status": "ACTIVE",    "issues": {      "property1": {},      "property2": {}    },    "lastTriggeredAt": "string",    "payloadExample": {},    "severity": "high"  }}