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

# Rename Folder

> Rename a folder

> [!NOTE]
>
> **Smart Delivery v2 (Deliverability Test) API**: the deliverability (inbox placement) test that sends your campaign email to seed inboxes and reports where it landed. Contact [support@smartlead.ai](mailto:support@smartlead.ai) for access.

## Path Parameters

**id** `number` *required*

Folder ID

## Query Parameters

**api\_key** `string` *required*

Your SmartLead API key

## Body Parameters

**name** `string` *required*

New folder name, 1 to 100 characters

```bash cURL theme={null}
curl -X PATCH "https://sl-sd-api.smartlead.ai/api/v1/smart-delivery/folders/3f2b8c1e-5d4a-4e7b-9a60-1c2d3e4f5a6b?api_key=YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Q4 outbound"}'
```

```python Python theme={null}
import requests

API_KEY = "YOUR_API_KEY"

response = requests.patch(
    "https://sl-sd-api.smartlead.ai/api/v1/smart-delivery/folders/3f2b8c1e-5d4a-4e7b-9a60-1c2d3e4f5a6b",
    params={"api_key": API_KEY}, json={"name": "Q4 outbound"}
)
print(response.status_code)
print(response.json())
```

```javascript JavaScript theme={null}
const API_KEY = 'YOUR_API_KEY';

const response = await fetch(
  `https://sl-sd-api.smartlead.ai/api/v1/smart-delivery/folders/3f2b8c1e-5d4a-4e7b-9a60-1c2d3e4f5a6b?api_key=${API_KEY}`,
  {
    method: 'PATCH',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({"name": "Q4 outbound"})
  }
);
console.log(await response.json());
```

## Response Fields

**id** `number`

Folder ID

**name** `string`

Folder name

**createdAt** `string`

Creation time (ISO 8601)

## Response Codes

**200** `Success`

Success

**404** `Error`

Folder not found (`FOLDER_NOT_FOUND`)

**409** `Error`

A folder with this name already exists (`FOLDER_EXISTS`)

**401** `Unauthorized`

Missing, invalid or expired API key (`UNAUTHORIZED`)

**403** `Forbidden`

Client (agency) API keys are not allowed (`CLIENT_NOT_ALLOWED`), or your plan does not include API access (`API_ACCESS_RESTRICTED`)

**429** `Too Many Requests`

Too many requests for this API key. Wait the number of seconds in the `Retry-After` header (`RATE_LIMITED`)

```json 200 - Success theme={null}
{ "id": 12, "name": "Q4 outbound", "createdAt": "2026-11-17T08:30:00.000Z" }
```

```json Error - Unauthorized theme={null}
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid API Key"
  }
}
```

## Related Endpoints

* [List Folders](https://api.smartlead.ai/api-reference/smart-delivery-v2/list-folders.md)


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