---
title: "Update a folder"
method: PATCH
path: "/v1/sites/{site_id}/folders/{folder_id}"
tags: ["Folders"]
---

# Update a folder

`PATCH /v1/sites/{site_id}/folders/{folder_id}`

## Request

- Base URL: `https://api.getsitecontrol.com`
- URL: `https://api.getsitecontrol.com/v1/sites/{site_id}/folders/{folder_id}`
- Auth: HTTP bearer

Renames the folder and returns it; the id and the items in it stay. 0 renames
General. Names need not be unique.

## Path parameters

- `site_id` integer, required
- `folder_id` integer, required: Folder id from `list_folders` with the same `type`; 0 is General

## Query parameters

- `type` 'widget' | 'segment' | 'broadcast' | 'automation', required: The items a folder holds. widget: widgets. segment: contact segments. broadcast: e-mail broadcasts. automation: automations.

## Request body

- FolderPatch
  - `name` string, required: Surrounding spaces are trimmed; names need not be unique

## Response `200`

Successful Response

- Folder
  - `id` integer, required: 0 is General, where items outside any folder are
  - `name` string, required

## Other responses

- `400`: Unsupported GSC-Version
- `401`: Missing or invalid API key or access token
- `403`: Access denied
- `404`: `folder_not_found`: no folder of this `type` on the site has this id
- `409`: Conflict
- `413`: Request body too large
- `422`: Validation failed
- `429`: Rate limited
- `503`: Temporarily unavailable; retry later

---

[API](https://skmtc.dev/getsitecontrol/apis/getsitecontrol-public-api.md) - [All operations](https://skmtc.dev/getsitecontrol/apis/getsitecontrol-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getsitecontrol/apis/getsitecontrol-public-api/revisions/084fcad80e75?raw)
