https://www.docusign.com/v2.1/accounts/{accountId}/foldersReturns 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
The external account number (int) or account ID GUID.
The maximum number of results to return.
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.
Indicates whether folder items are included in the response. If this parameter is omitted, the default is false.
The zero-based index of the result from which to start returning results. The default value is `0`.
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.
This parameter is deprecated as of version 2.1. Use `include` instead.
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.
{
"success": true,
"data": {
"id": "abc123",
"created_at": "2025-01-01T00:00:00Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}1curl --request GET \2 --url 'https://www.docusign.com/v2.1/accounts/{accountId}/folders' \3 --header 'accept: application/json' \4 --header 'content-type: application/json'1{2 "success": true,3 "data": {4 "id": "abc123",5 "created_at": "2025-01-01T00:00:00Z"6 }7}https://www.docusign.com/v2.1/accounts/{accountId}/foldersReturns 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
The external account number (int) or account ID GUID.
The maximum number of results to return.
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.
Indicates whether folder items are included in the response. If this parameter is omitted, the default is false.
The zero-based index of the result from which to start returning results. The default value is `0`.
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.
This parameter is deprecated as of version 2.1. Use `include` instead.
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.
{
"success": true,
"data": {
"id": "abc123",
"created_at": "2025-01-01T00:00:00Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}1curl --request GET \2 --url 'https://www.docusign.com/v2.1/accounts/{accountId}/folders' \3 --header 'accept: application/json' \4 --header 'content-type: application/json'1{2 "success": true,3 "data": {4 "id": "abc123",5 "created_at": "2025-01-01T00:00:00Z"6 }7}