v1

latestSwagger 2.02026-07-134146194.6 MB
Folders

Returns a list of the account's 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'

{
  "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.

{
  "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
get/v2.1/accounts/{accountId}/folders

Path parameters

accountIdstring required

The external account number (int) or account ID GUID.

Query parameters

countstring

The maximum number of results to return.

includestring

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_itemsstring

Indicates whether folder items are included in the response. If this parameter is omitted, the default is false.

start_positionstring

The zero-based index of the result from which to start returning results.

The default value is 0.

sub_folder_depthstring

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.

templatestring

This parameter is deprecated as of version 2.1. Use include instead.

user_filterstring

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.

Response

Successful response.