docusign.envelope-workflow-definition.put-envelope-workflow-step-definition
Updates the workflow step specified by workflowStepId for an envelope. You can use this endpoint to add or update delayed routing for a draft envelope. You can add or update delayed routing for a sent envelope as long as the previous workflow step has not been completed.
Updates the specified workflow step for an envelope.
Overview
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-docusign |
| Version | 1.0 |
Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
base_url | string | Yes | — | Docusign API root, e.g. https://<host>/api |
api_token | string | No | — | Bearer token; omit to use the workflow's token env var |
accountid | string | Yes | — | The external account number (int) or account ID GUID. |
envelopeid | string | Yes | — | The envelope's GUID. Example: 93be49ab-xxxx-xxxx-xxxx-f752070d71ec |
workflowstepid | string | Yes | — | The ID of the workflow step. |
action | string | No | — | Indicates the action to perform. Valid values: - pause_before: The workflow should pause before the trigger described by triggerOnItem is reached. |
completeddate | string | No | — | The timestamp of when the workflow step transitioned to completed status. This property is read-only. |
delayedrouting | json | No | — | A complex element that specifies the delayed routing settings for the workflow step. |
itemid | string | No | — | The unique ID of the item being triggered. |
recipientrouting | json | No | — | Describes the recipient routing rules. |
status | string | No | — | The status of the step. Valid values: - inactive - in_progress - paused - pending - completed This property is read-only. |
triggereddate | string | No | — | The timestamp of when the workflow step transitioned to in_progress status. This property is read-only. |
triggeronitem | string | No | — | The type of item that triggers this workflow step. Valid values: * routing_order |
workflowstepid_2 | string | No | — | A unique identifier for this workflow step. This property is read-only. |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
base_url | string | Yes | — | Docusign API root, e.g. https://<host>/api |
api_token | string | No | — | Bearer token; omit to use the workflow's token env var |
accountid | string | Yes | — | The external account number (int) or account ID GUID. |
envelopeid | string | Yes | — | The envelope's GUID. Example: 93be49ab-xxxx-xxxx-xxxx-f752070d71ec |
workflowstepid | string | Yes | — | The ID of the workflow step. |
action | string | No | — | Indicates the action to perform. Valid values: - pause_before: The workflow should pause before the trigger described by triggerOnItem is reached. |
completeddate | string | No | — | The timestamp of when the workflow step transitioned to completed status. This property is read-only. |
delayedrouting | json | No | — | A complex element that specifies the delayed routing settings for the workflow step. |
itemid | string | No | — | The unique ID of the item being triggered. |
recipientrouting | json | No | — | Describes the recipient routing rules. |
status | string | No | — | The status of the step. Valid values: - inactive - in_progress - paused - pending - completed This property is read-only. |
triggereddate | string | No | — | The timestamp of when the workflow step transitioned to in_progress status. This property is read-only. |
triggeronitem | string | No | — | The type of item that triggers this workflow step. Valid values: * routing_order |
workflowstepid_2 | string | No | — | A unique identifier for this workflow step. This property is read-only. |
status_code | integer | No | — | HTTP status code of the completed call |
response | json | No | — | Parsed JSON response body |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_at | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
failed_at_state | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | Waiting to call PUT /v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow/steps/ |
completed | No | Yes | Yes | — | HTTP call succeeded |
failed | No | Yes | No | — | HTTP call failed |
State Diagram
Transitions
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | Perform PUT /v2.1/accounts/{accountId}/envelopes/{envelopeId}/workflow/steps/ |
* (any state) | fail | failed | Record the failure reason |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "docusign.envelope-workflow-definition.put-envelope-workflow-step-definition",
"initial_data": {
"base_url": "value",
"accountid": "value",
"envelopeid": "value",
"workflowstepid": "value"
}
}