Create a workflow
Creates a new workflow in the Notifly environment
Creates a new workflow in the Notifly environment
Authorization
secretKey API key authentication. Allowed headers-- "Authorization: ApiKey <secret_key>".
In: header
Request Body
application/json
Workflow creation 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 POST "https://example.com/v2/workflows" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "workflowId": "string", "steps": [ { "name": "string", "type": "in_app" } ] }'{ "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" }}