> ## Documentation Index
> Fetch the complete documentation index at: https://infisical.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a folder

> Create a folder in an environment with the Python SDK.

`client.folders.create_folder()` creates a [folder](https://infisical.com/docs/documentation/platform/folder.md) in an environment of a project.

## Parameters

**name** `str` *required*

The name of the new folder.

**project\_id** `str` *required*

The ID of the project.

**environment\_slug** `str` *required*

The slug of the environment, such as `dev`.

**path** `str` (default: /)

The path of the folder to create the new folder in.

**description** `str`

A description of the folder.

## Returns

**folder** `CreateFolderResponseItem`

The new folder, with its `id`, `name`, `description`, and `path`.

```python Basic theme={"dark"}
folder = client.folders.create_folder(
    name="backend",
    project_id="<project-id>",
    environment_slug="dev",
)
```

```python With a description theme={"dark"}
folder = client.folders.create_folder(
    name="backend",
    project_id="<project-id>",
    environment_slug="dev",
    path="/",
    description="Secrets for the backend service",
)
```

```json Response theme={"dark"}
{
  "id": "3a1f6c2e-9b4d-4e7a-8c5f-2d1e0b9a8c7f",
  "name": "backend",
  "description": "Secrets for the backend service",
  "path": "/backend",
  "envId": "c4e2a1b9-7d3f-4a6e-9b8c-5f0e1d2c3b4a",
  "parentId": "8b7a6c5d-4e3f-4a2b-9c1d-0e9f8a7b6c5d",
  "version": 1,
  "createdAt": "2026-12-02T10:30:18.402Z",
  "updatedAt": "2026-12-02T10:30:18.402Z"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.