Envelope Workflow Definition

Adds a new step to a template's workflow

POST
/v2.1/accounts/{accountId}/templates/{templateId}/workflow/steps

Adds a new step to a template's workflow.

Authorization

OAuth2
AuthorizationBearer <token>

OAuth 2.0 access token obtained via Authorization Code Grant or JWT Grant.

In: header

Path Parameters

accountId*string

The external account number (int) or account ID GUID.

templateId*string

The ID of the template.

Request Body

application/json

Describes a single step in a workflow.

action?string

Indicates the action to perform. Valid values:

  • pause_before: The workflow should pause before the trigger described by triggerOnItem is reached.
completedDate?string

The timestamp of when the workflow step transitioned to completed status.

This property is read-only.

delayedRouting?

A complex element that specifies the delayed routing settings for the workflow step.

itemId?string

The unique ID of the item being triggered.

recipientRouting?

Describes the recipient routing rules.

status?string

The status of the step. Valid values:

  • inactive
  • in_progress
  • paused
  • pending
  • completed

This property is read-only.

triggeredDate?string

The timestamp of when the workflow step transitioned to in_progress status.

This property is read-only.

triggerOnItem?string

The type of item that triggers this workflow step. Valid values:

  • routing_order
workflowStepId?string

A unique identifier for this workflow step.

This property is read-only.

Response Body

application/json

application/json

curl -X POST "https://example.com/v2.1/accounts/string/templates/string/workflow/steps" \  -H "Content-Type: application/json" \  -d '{}'
{  "action": "string",  "completedDate": "string",  "delayedRouting": {    "resumeDate": "string",    "rules": [      {        "delay": "string",        "resumeDate": "string"      }    ],    "status": "string"  },  "itemId": "string",  "recipientRouting": {    "rules": {      "conditionalRecipients": [        {          "conditions": [            {              "filters": [                {                  "operator": "string",                  "recipientId": "string",                  "scope": "string",                  "tabId": "string",                  "tabLabel": "string",                  "tabType": "string",                  "value": "string"                }              ],              "order": "string",              "recipientLabel": "string"            }          ],          "order": "string",          "recipientGroup": {            "groupMessage": "string",            "groupName": "string",            "recipients": [              {                "email": "string",                "name": "string",                "recipientLabel": "string",                "roleName": "string",                "signingGroupId": "string"              }            ]          },          "recipientId": "string"        }      ]    }  },  "status": "string",  "triggeredDate": "string",  "triggerOnItem": "string",  "workflowStepId": "string"}