# `DocuSign.Api.Folders`
[🔗](https://github.com/neilberkman/docusign_elixir/blob/v3.4.0/lib/docusign/api/folders.ex#L5)

API calls for all endpoints tagged `Folders`.

# `folders_get_folder_items`

```elixir
@spec folders_get_folder_items(
  DocuSign.Connection.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, DocuSign.Model.FolderItemsResponse.t()} | {:error, Req.Response.t()}
```

Gets information about items in a specified folder. 
Gets information about items in the specified folder.   To include a list of the items in the folder, set the `include_items` query parameter to **true.**  ### Related topics  - [Searching for envelopes](/docs/esign-rest-api/esign101/concepts/envelopes/search/) - [Sharing templates](/docs/esign-rest-api/esign101/concepts/templates/sharing/) 

### Parameters

- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `folder_id` (String.t): The ID of the folder.
- `opts` (keyword): Optional parameters
  - `:from_date` (String.t): Reserved for Docusign.
  - `:include_items` (String.t): Indicates whether folder items are included in the response. If this parameter is omitted, the default is false.
  - `:owner_email` (String.t): Reserved for Docusign.
  - `:owner_name` (String.t): Reserved for Docusign.
  - `:search_text` (String.t): Reserved for Docusign.
  - `:start_position` (String.t): Reserved for Docusign.
  - `:status` (String.t): Reserved for Docusign.
  - `:to_date` (String.t): Reserved for Docusign.

### Returns

- `{:ok, DocuSign.Model.FolderItemsResponse.t}` on success
- `{:error, Req.Response.t}` on failure

# `folders_get_folders`

```elixir
@spec folders_get_folders(DocuSign.Connection.t(), String.t(), keyword()) ::
  {:ok, DocuSign.Model.FoldersResponse.t()} | {:error, Req.Response.t()}
```

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'`   ```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](/docs/esign-rest-api/esign101/concepts/envelopes/search/) - [Sharing templates](/docs/esign-rest-api/esign101/concepts/templates/sharing/) 

### Parameters

- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `opts` (keyword): Optional parameters
  - `:count` (String.t): The maximum number of results to return.
  - `:include` (String.t): 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_items` (String.t): Indicates whether folder items are included in the response. If this parameter is omitted, the default is false.
  - `:start_position` (String.t): The zero-based index of the result from which to start returning results.  The default value is `0`. 
  - `:sub_folder_depth` (String.t): 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. 
  - `:template` (String.t): This parameter is deprecated as of version 2.1. Use `include` instead.
  - `:user_filter` (String.t): 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. 

### Returns

- `{:ok, DocuSign.Model.FoldersResponse.t}` on success
- `{:error, Req.Response.t}` on failure

# `folders_put_folder_by_id`

```elixir
@spec folders_put_folder_by_id(
  DocuSign.Connection.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, DocuSign.Model.FoldersResponse.t()} | {:error, Req.Response.t()}
```

Moves a set of envelopes from their current folder to another folder.
Moves a set of envelopes from their current folder to another folder.  The `folderId` path parameter is the destination folder. The request body has an array of envelope IDs and the ID of the source folder.  <ds-inlinemessage kind="warning"  markdown="1"> Do not use the <code>folders</code> property in the request body.  </ds-inlinemessage>  If `folderId` is the special value **`recyclebin`** the envelopes are moved to the Deleted folder. Moving an in-process envelope (envelope status of `sent` or `delivered`) to the **`recyclebin`** voids the envelope.   ### Related topics  - [Searching for envelopes](/docs/esign-rest-api/esign101/concepts/envelopes/search/) - [Sharing templates](/docs/esign-rest-api/esign101/concepts/templates/sharing/) 

### Parameters

- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `folder_id` (String.t): The ID of the folder.
- `opts` (keyword): Optional parameters
  - `:body` (FoldersRequest): 

### Returns

- `{:ok, DocuSign.Model.FoldersResponse.t}` on success
- `{:error, Req.Response.t}` on failure

# `search_folders_get_search_folder_contents`

```elixir
@spec search_folders_get_search_folder_contents(
  DocuSign.Connection.t(),
  String.t(),
  String.t(),
  keyword()
) :: {:ok, DocuSign.Model.FolderItemResponse.t()} | {:error, Req.Response.t()}
```

Deprecated. Use Envelopes: listStatusChanges.
<ds-inlinemessage kind="warning"  markdown="1"> <strong>This method is deprecated in API v2.1</strong>  Use  [Envelopes: listStatusChanges](/docs/esign-rest-api/reference/envelopes/envelopes/liststatuschanges/) instead. </ds-inlinemessage>   Retrieves a list of items that match the criteria specified in the query.  If the user ID of the user making the call is the same as the user ID for any returned recipient, then the `userId` property is added to the returned information for those recipients.

### Parameters

- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `search_folder_id` (String.t): Specifies the envelope group that is searched by the request. These are logical groupings, not actual folder names. Valid values are: drafts, awaiting_my_signature, completed, out_for_signature.
- `opts` (keyword): Optional parameters
  - `:all` (String.t): Specifies that all envelopes that match the criteria are returned.
  - `:count` (String.t): The maximum number of results to return.  Use `start_position` to specify the number of results to skip.  Valid values: `1` to `100` 
  - `:from_date` (String.t): Specifies the start of the date range to return. If no value is provided, the default search is the previous 30 days.
  - `:include_recipients` (String.t): When **true,** the recipient information is returned in the response.
  - `:order` (String.t): Specifies the order in which the list is returned. Valid values are: `asc` for ascending order, and `desc` for descending order.
  - `:order_by` (String.t): Specifies the property used to sort the list. Valid values are: `action_required`, `created`, `completed`, `sent`, `signer_list`, `status`, or `subject`.
  - `:start_position` (String.t): The zero-based index of the result from which to start returning results.  Use with `count` to limit the number of results.  The default value is `0`. 
  - `:to_date` (String.t): Specifies the end of the date range to return.

### Returns

- `{:ok, DocuSign.Model.FolderItemResponse.t}` on success
- `{:error, Req.Response.t}` on failure

---

*Consult [api-reference.md](api-reference.md) for complete listing*
