***

title: add_directory
slug: /reference/python/agents/web-service/add-directory
description: Mount a new directory at a URL route.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

Mount a new directory at a URL route. A leading `/` is added automatically
if missing. Raises `ValueError` if the directory does not exist or the path
is not a directory.

If the FastAPI app is already running, the new directory is mounted immediately.

## **Parameters**

<ParamField path="route" type="str" required={true} toc={true}>
  URL path to mount at (e.g., `"/docs"`). A leading `/` is added automatically
  if missing.
</ParamField>

<ParamField path="directory" type="str" required={true} toc={true}>
  Local directory path to serve.
</ParamField>

## **Returns**

`None`

## **Example**

```python {4-5}
from signalwire import WebService

web = WebService(port=8002)
web.add_directory("/audio", "./audio_files")
web.add_directory("/images", "./public/images")
web.start()
```