docusign.bulk-send.post-bulk-send-test-request
This method tests a bulk send list for compatibility with the envelope or template that you want to send. For example, a template that has three roles is not compatible with a bulk send list that has only two recipients. For this reason, you might want to test compatibility first. A successful test result returns true for the canBeSent property. An unsuccessful test returns a JSON response that contains information about the errors that occurred. If the test is successful, you can then send the envelope or template by using the [BulkSend::createBulkSendRequest][BulkSendRequest] method. ## Envelope Compatibility Checks This section describes the envelope compatibility checks that the system performs. Top-Level Issues - Envelopes must be in a sendable state. - The bulk send list must contain at least one copy (instance of an envelope), and no more than the maximum number of copies allowed for the account. - The envelope must not be null and must be visible to the current user. - The account cannot have more queued envelopes than the maximum number configured for the account. - The bulk send list must exist. Recipients - The envelope must have recipients. - If you are using an envelope, all of the recipients defined in the bulk send list must have corresponding recipient IDs in the envelope definition. If you are using a template, you must either match the recipient IDs or role IDs. - The envelope cannot contain a bulk recipient (an artifact of the legacy version of Docusign's bulk send functionality). Recipient Tabs - Every recipient ID, tab label pair in the bulk send list must correspond to a tab in the envelope. Custom Fields - Each envelope-level custom field in the bulk send list must correspond to the name of a customField in the envelope definition. You do not have to match the recipient-level custom fields. [BulkSendRequest]: /docs/esign-rest-api/reference/bulkenvelopes/bulksend/createbulksendrequest/
Creates a bulk send test.
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. |
bulksendlistid | string | Yes | — | The GUID of the bulk send list. This property is created after you post a new bulk send list. |
batchname | string | No | — | The human-readable name of the batch. If you do not set this value, it defaults to the name property of the bulkSendingList object. |
envelopeortemplateid | string | No | — | The GUID of the envelope or template that you want to send in bulk. |
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. |
bulksendlistid | string | Yes | — | The GUID of the bulk send list. This property is created after you post a new bulk send list. |
batchname | string | No | — | The human-readable name of the batch. If you do not set this value, it defaults to the name property of the bulkSendingList object. |
envelopeortemplateid | string | No | — | The GUID of the envelope or template that you want to send in bulk. |
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 POST /v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}/test |
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 POST /v2.1/accounts/{accountId}/bulk_send_lists/{bulkSendListId}/test |
* (any state) | fail | failed | Record the failure reason |
API Usage
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "docusign.bulk-send.post-bulk-send-test-request",
"initial_data": {
"base_url": "value",
"accountid": "value",
"bulksendlistid": "value"
}
}