# Folders and filing rules

Organize envelopes and templates in folders, and use filing rules to move envelopes into folders automatically as their status changes.

## Folders

Envelopes and templates have separate sets of folders. Folders are available on every plan.

### Create a folder

1. Go to **Envelopes** or **Templates**.
2. Click **New folder** in the row of folders above the list.
3. Enter a **Folder name** and click **Create**.

To make a subfolder, open a folder first, then click **New folder**. Folders can be nested as deep as you need.

### Move envelopes and templates

- To move one item, open its **⋯** menu and choose **Move to folder**.
- To move several envelopes, select them and click **Move** in the bar that appears.
- To move several templates, select them and click **Move to folder**.

Pick a folder, or **Home (No Folder)** to take items out of folders.

On a template's page, you can also choose **Move to folder** from the **⋯** menu.

### Edit, move or delete a folder

Open the menu on a folder to:

- **Edit** its name. For envelope folders, you can also turn on **Use for visitor check-in** here. See [Kiosk mode](/docs/kiosk-mode#check-in-lookup).
- **Move** it inside another folder.
- **Delete** it. Type the confirmation text shown to confirm.

Deleting a folder doesn't delete what's in it. Its envelopes or templates, and any subfolders, move up to the folder it was in.

## Filing rules

A filing rule moves an envelope into a folder each time it reaches a status. For example, a rule can file completed contracts into **Signed** and voided ones into **Voided**.

> [!NOTE]
> Filing rules are available on Starter, Pro and Platform.

A rule maps each status to an envelope folder:

| Status | When it applies |
| --- | --- |
| **Sent** | The envelope is sent for signing |
| **Completed** | Everyone has finished |
| **Voided** | The sender voids the envelope |
| **Declined** | A recipient declines |
| **Expired** | The envelope expires before it's finished |

Statuses set to **Don't file** leave the envelope where it is.

### Create a filing rule

1. In the sidebar, click **Filing rules**.
2. Click **New filing rule**.
3. Enter a **Name**, such as "Signed contracts".
4. Under **Destination folders**, pick a folder for each status you want to file.
5. Click **Save**.

To create a folder without leaving the dialog, choose **Add folder…** in any status list. You can name it and pick a parent folder, and it's selected for that status.

Use the pencil and trash icons on the **Filing rules** page to edit or delete a rule.

### Set a default rule

Click the star next to a rule to make it the default. New envelopes and templates start with the default rule selected. Click the star again to clear it, so new envelopes start with **Manual** (no automatic filing).

A workspace has at most one default rule.

### Choose a rule for an envelope or template

- **Templates:** pick a **Filing rule** when you upload the template, or change it in the template's **Details** panel. Envelopes created from the template use the template's rule.
- **Envelopes:** change the **Filing rule** in the envelope's **Details** panel at any time. Choose **Manual (no auto-filing)** to turn filing off for that envelope.

### Manual moves

If you move an envelope into a folder yourself, automatic filing stops for that envelope, so a later status change won't move it again. Other envelopes on the same rule aren't affected.

To turn automatic filing back on, choose a filing rule for the envelope again in its **Details** panel.

### Deleted folders

If you delete a folder that a rule files into, that status changes to **Don't file**. The rest of the rule stays the same.

## From the API

Folders and filing rules are also available in the [API](/docs/api) and the [MCP server](/docs/mcp). Folder IDs start with `fdr_` and filing rule IDs with `frl_`.

| Endpoint | Does |
| --- | --- |
| `GET /folders` | Lists folders. Filter with `filter[type]` (`envelope` or `template`) or `filter[parent]`. |
| `POST /folders` | Creates a folder: `name`, `type`, and an optional `parent`. |
| `PATCH /folders/{folder}` | Renames a folder, or moves it with `parent` (`null` for the top level). |
| `DELETE /folders/{folder}` | Deletes a folder. Its contents move up, as in the app. |
| `GET /filing_rules` | Lists filing rules. |
| `POST /filing_rules` | Creates a rule: `name`, `targets` and `is_default`. |
| `PATCH /filing_rules/{filingRule}` | Changes only what you send. `targets` replaces every destination. |
| `DELETE /filing_rules/{filingRule}` | Deletes a rule. |
| `POST /envelopes/{envelope}/move` | Moves an envelope to `folder`, or out of its folder with `null`. |
| `POST /templates/{template}/move` | Moves a template to `folder`, or out of its folder with `null`. |
| `POST /envelopes/{envelope}/filing_rule` | Assigns a rule with `filing_rule`, or clears it with `null`. The rule files the envelope again even after a manual move. |
| `POST /templates/{template}/filing_rule` | Assigns a rule to a template, or clears it with `null`. |

Each target is a status and an envelope folder:

```json
{
  "name": "Signed contracts",
  "targets": [
    { "status": "completed", "folder": "fdr_01J…" },
    { "status": "voided", "folder": "fdr_01K…" }
  ]
}
```

Envelopes and templates show their `folder`, and `POST /envelopes` and `POST /templates/{template}/envelopes` accept one. Moving an envelope through the API stops automatic filing for it, the same as a manual move in the app.

Reading needs the `folders:read` ability and changing folders or rules needs `folders:write`. Moving an envelope needs `envelopes:write`, and moving a template needs `templates:write`. Folders and filing rules are shared by test and live mode, so changing them needs a live key (`403 live_key_required`). The filing rule endpoints need a plan with filing rules (`403 permission_denied`).
