docusign.accounts.post-accounts
Creates new Docusign accounts. You can use this method to create a single account or up to 100 accounts at a time. Note: This method is restricted to partner integrations. You must work with Docusign Professional Services or Docusign Business Development, who will provide you with the Distributor Code and Distributor Password that you need to include in the request body. When creating a single account, the body of the request is a [newAccountRequest][newAccountRequest] object. Example: { "newAccountRequest": [ { "accountName":"Test Account", "distributorCode":"MY_DIST_CODE", "distributorPassword":"MY_DIST_PWD", "initialUser":{ "email":"user@emaildomain.com", "firstName":"John", "middleName": "Harry", "lastName":"Doe", "suffixName": "", "userName": "John Doe", "jobTitle": "Engineer", "company": "Test Company" }, "addressInformation":{ "address1": "1234 Main Street", "address2": "Suite 100", "city": "Seattle", "state": "WA", "postalCode": "98101", "country": "US", "phone": "1234567890", "fax": "1234567891" }, "planInformation":{ "planId":"37085696-xxxx-xxxx-xxxx-7ea067752959" }, "referralInformation":{ "includedSeats": "1", "referralCode": "code", "referrerName": "name" } } ] } If the request succeeds, it returns a 201 (Created) HTTP response code. The response returns the new account ID, password, and the default user information for each newly created account. When creating multiple accounts, the body of the request is a newAccountRequests object, which contains one or more [newAccountDefinition][newAccountDefinition] objects. You can create up to 100 new accounts at a time this way. The body for a multi-account creation request looks like this in JSON: { "newAccountRequests": [ { "accountName": "accountone", . . . }, { "accountName": "accounttwo", . . . } ] } A multi-account request looks like this in XML: <newAccountsDefinition xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi"> <newAccountRequests> <newAccountDefinition> . . . </newAccountDefinition> <newAccountDefinition> . . . </newAccountDefinition> </newAccountRequests> </newAccountsDefinition> A multi-account creation request may succeed (report a 201 code) even if some accounts could not be created. In this case, the errorDetails property in the response contains specific information about the failure. [newAccountDefinition]: #/definitions/newAccountDefinition [nameValue]: #/definitions/nameValue [newAccountRequest]: #/definitions/newAccountRequest
Creates new accounts.
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 |
accountname | string | No | — | The account name for the new account. |
accountsettings | json | No | — | Contains account settings information. Used in requests to set property values. Used in responses to report property values. |
addressinformation | json | No | — | Contains information about the address associated with the account. |
creditcardinformation | json | No | — | This object contains information about a credit card that is associated with an account. |
directdebitprocessorinformation | json | No | — | Contains information about a bank that processes a customer's direct debit payments. |
distributorcode | string | No | — | The Distributor Code that you received from Docusign. |
distributorpassword | string | No | — | The password for the distributorCode. |
enablepreauth | string | No | — | — |
envelopepartitionid | string | No | — | Reserved for Docusign. |
initialuser | json | No | — | User information. |
paymentmethod | string | No | — | The payment method used for the billing plan. Valid values are: - NotSupported - CreditCard - PurchaseOrder - Premium - Freemium - FreeTrial - AppStore - DigitalExternal - DirectDebit |
paymentprocessor | string | No | — | — |
paymentprocessorinformation | json | No | — | — |
planinformation | json | No | — | An object used to identify the features and attributes of the account being created. |
processpayment | string | No | — | — |
referralinformation | json | No | — | A complex type that contains the following information for entering referral and discount information. The following items are included in the referral information (all string content): enableSupport, includedSeats, saleDiscountPercent, saleDiscountAmount, saleDiscountFixedAmount, saleDiscountPeriods, saleDiscountSeatPriceOverride, planStartMonth, referralCode, referrerName, advertisementId, publisherId, shopperId, promoCode, groupMemberId, idType, and industry Note: saleDiscountPercent, saleDiscountAmount, saleDiscountFixedAmount, saleDiscountPeriods, and saleDiscountSeatPriceOverride are reserved for Docusign use only. |
socialaccountinformation | json | No | — | — |
taxexemptid | string | No | — | — |
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 |
accountname | string | No | — | The account name for the new account. |
accountsettings | json | No | — | Contains account settings information. Used in requests to set property values. Used in responses to report property values. |
addressinformation | json | No | — | Contains information about the address associated with the account. |
creditcardinformation | json | No | — | This object contains information about a credit card that is associated with an account. |
directdebitprocessorinformation | json | No | — | Contains information about a bank that processes a customer's direct debit payments. |
distributorcode | string | No | — | The Distributor Code that you received from Docusign. |
distributorpassword | string | No | — | The password for the distributorCode. |
enablepreauth | string | No | — | — |
envelopepartitionid | string | No | — | Reserved for Docusign. |
initialuser | json | No | — | User information. |
paymentmethod | string | No | — | The payment method used for the billing plan. Valid values are: - NotSupported - CreditCard - PurchaseOrder - Premium - Freemium - FreeTrial - AppStore - DigitalExternal - DirectDebit |
paymentprocessor | string | No | — | — |
paymentprocessorinformation | json | No | — | — |
planinformation | json | No | — | An object used to identify the features and attributes of the account being created. |
processpayment | string | No | — | — |
referralinformation | json | No | — | A complex type that contains the following information for entering referral and discount information. The following items are included in the referral information (all string content): enableSupport, includedSeats, saleDiscountPercent, saleDiscountAmount, saleDiscountFixedAmount, saleDiscountPeriods, saleDiscountSeatPriceOverride, planStartMonth, referralCode, referrerName, advertisementId, publisherId, shopperId, promoCode, groupMemberId, idType, and industry Note: saleDiscountPercent, saleDiscountAmount, saleDiscountFixedAmount, saleDiscountPeriods, and saleDiscountSeatPriceOverride are reserved for Docusign use only. |
socialaccountinformation | json | No | — | — |
taxexemptid | string | No | — | — |
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 |
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 |
* (any state) | fail | failed | Record the failure reason |
API Usage
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "docusign.accounts.post-accounts",
"initial_data": {
"base_url": "value"
}
}