Skip to content
Proud to collaborate with Microsoft for Startups

docusign.folders.get-folders ​

Returns a list of the account's folders. Use the include query parameter to specify the kinds of folders to return. By default, only the first level of subfolders is shown. Set the sub_folder_depth query parameter to -1 to return the entire folder hierarchy. <ds-column> <ds-step open="false" hideIcon="true"> Default returns only top-level folders. Click to show. <div> GET 'https://demo.docusign.net/restapi/v2.1/accounts/624e3e00-xxxx-xxxx-xxxx-43918c520dab/folders' json { "resultSetSize": "5", "startPosition": "0", "endPosition": "4", "totalSetSize": "5", "folders": [ { "name": "Draft", "type": "draft", "itemCount": "1", "subFolderCount": "0", "hasSubFolders": "false" }, { "name": "Inbox", "type": "inbox", "itemCount": "0", "subFolderCount": "1", "hasSubFolders": "true", "folders": [ { "name": "Project Fair", "type": "normal", "hasSubFolders": "false", "parentFolderId": "3ed02ee3-xxxx-xxxx-xxxx-e6795f96a840", "parentFolderUri": "/folders/3ed02ee3-xxxx-xxxx-xxxx-e6795f96a840" } ] }, { "name": "Deleted Items", "type": "recyclebin", "itemCount": "0", "subFolderCount": "0", "hasSubFolders": "false" }, { "name": "Sent Items", "type": "sentitems", "itemCount": "3", "subFolderCount": "0", "hasSubFolders": "false" } ] } </div></ds-step> <ds-step open="false" hideIcon="true"> Setting sub_folder_depth to -1 returns the entire folder hierarchy. Click to show. <div> GET 'https://demo.docusign.net/restapi/v2.1/accounts/624e3e00-xxxx-xxxx-xxxx-43918c520dab/folders?sub_folder_depth=-1' One envelope has been moved from the Inbox folder to the Project Fair/Phase 1 folder, and the endpoint is invoked with sub_folder_depth=-1. json { "resultSetSize": "5", "startPosition": "0", "endPosition": "4", "totalSetSize": "4", "folders": [ { "name": "Draft", "type": "draft", "itemCount": "1", "hasSubFolders": "false" }, { "name": "Inbox", "type": "inbox", "itemCount": "0", "hasSubFolders": "true", "folders": [ { "name": "Project Fair", "type": "normal", "itemCount": "0", "hasSubFolders": "true", "parentFolderId": "3ed02ee3-xxxx-xxxx-xxxx-e6795f96a840", "parentFolderUri": "/folders/3ed02ee3-xxxx-xxxx-xxxx-e6795f96a840", "folders": [ { "name": "NDAs", "type": "normal", "itemCount": "0", "hasSubFolders": "false", "parentFolderId": "12882f2f-xxxx-xxxx-xxxx-e04a714f8e2d", "parentFolderUri": "/folders/12882f2f-xxxx-xxxx-xxxx-e04a714f8e2d" }, { "name": "Phase 1", "type": "normal", "itemCount": "1", "hasSubFolders": "false", "parentFolderId": "12882f2f-xxxx-xxxx-xxxx-e04a714f8e2d", "parentFolderUri": "/folders/12882f2f-xxxx-xxxx-xxxx-e04a714f8e2d" } ] } ] }, { "name": "Deleted Items", "type": "recyclebin", "itemCount": "0", "hasSubFolders": "false" }, { "name": "Sent Items", "type": "sentitems", "itemCount": "1", "hasSubFolders": "false" } ] } </div></ds-step> </ds-column> ### Related topics - Searching for envelopes - Sharing templates

Returns a list of the account's folders.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-docusign
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
base_urlstringYes—Docusign API root, e.g. https://<host>/api
api_tokenstringNo—Bearer token; omit to use the workflow's token env var
accountidstringYes—The external account number (int) or account ID GUID.
countstringNo—The maximum number of results to return.
includestringNo—A comma-separated list of folder types to include in the response. Valid values are: - envelope_folders: Returns a list of envelope folders. (Default) - template_folders: Returns a list of template folders. - shared_template_folders: Returns a list of shared template folders.
include_itemsstringNo—Indicates whether folder items are included in the response. If this parameter is omitted, the default is false.
start_positionstringNo—The zero-based index of the result from which to start returning results. The default value is 0.
sub_folder_depthstringNo—If missing or any value other than -1, the returned list contains only the top-level folders. A value of -1 returns the complete folder hierarchy.
templatestringNo—This parameter is deprecated as of version 2.1. Use include instead.
user_filterstringNo—Narrows down the resulting folder list by the following values: - all: Returns all templates owned or shared with the user. (default) - owned_by_me: Returns only templates the user owns. - shared_with_me: Returns only templates that are shared with the user.

Output Schema ​

FieldTypeRequiredDefaultDescription
base_urlstringYes—Docusign API root, e.g. https://<host>/api
api_tokenstringNo—Bearer token; omit to use the workflow's token env var
accountidstringYes—The external account number (int) or account ID GUID.
countstringNo—The maximum number of results to return.
includestringNo—A comma-separated list of folder types to include in the response. Valid values are: - envelope_folders: Returns a list of envelope folders. (Default) - template_folders: Returns a list of template folders. - shared_template_folders: Returns a list of shared template folders.
include_itemsstringNo—Indicates whether folder items are included in the response. If this parameter is omitted, the default is false.
start_positionstringNo—The zero-based index of the result from which to start returning results. The default value is 0.
sub_folder_depthstringNo—If missing or any value other than -1, the returned list contains only the top-level folders. A value of -1 returns the complete folder hierarchy.
templatestringNo—This parameter is deprecated as of version 2.1. Use include instead.
user_filterstringNo—Narrows down the resulting folder list by the following values: - all: Returns all templates owned or shared with the user. (default) - owned_by_me: Returns only templates the user owns. - shared_with_me: Returns only templates that are shared with the user.
status_codeintegerNo—HTTP status code of the completed call
responsejsonNo—Parsed JSON response body
failure_reasonstringNo——
failure_typestringNo——
failed_atstringNo——
failed_stepstringNo——
failed_layerstringNo——
failed_at_statestringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—executeWaiting to call GET /v2.1/accounts/{accountId}/folders
completedNoYesYes—HTTP call succeeded
failedNoYesNo—HTTP call failed

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompletedPerform GET /v2.1/accounts/{accountId}/folders
* (any state)failfailedRecord the failure reason

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "docusign.folders.get-folders",
  "initial_data": {
    "base_url": "value",
    "accountid": "value"
  }
}