# Move Template to Folder

> Move a studio template into a folder, or out of its current folder

- **URL**: https://orshot.com/docs/api-reference/template-folder-assign

---

## Overview

Assign a studio template to a folder, or pass `null` to move it out of its current folder back to "All templates".```markdown tab="Endpoint"
https://api.orshot.com/v1/studio/templates/:templateId/folder
```## Path Parameters

| Parameter    | Type    | Required | Description                          |
| ------------ | ------- | -------- | ------------------------------------ |
| `templateId` | Integer | Yes      | The unique ID of the studio template |

## Request Body

| Parameter   | Type            | Required | Description                                                       |
| ----------- | --------------- | -------- | ----------------------------------------------------------------- |
| `folder_id` | Integer or null | Yes      | Target folder ID, or `null` to remove the template from its folder |

## Request```js
await fetch("https://api.orshot.com/v1/studio/templates/123/folder", {
  method: "PATCH",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <ORSHOT_API_KEY>",
  },
  body: JSON.stringify({
    folder_id: 11, // or null to move it out
  }),
});
```</Tab>```json
{
  "success": true,
  "template_id": 123,
  "folder_id": 11
}
```</Tab>
</Tabs>

## Error Responses

### Folder Not in Your Workspace (400)```json
{
  "error": "Folder not found in this workspace"
}
```### Missing folder_id (400)```json
{
  "error": "folder_id is required (use null to remove from its folder)"
}
```### Template Not Found (404)```json
{
  "error": "Studio template with ID '123' not found in your workspace"
}
```## Notes

- Folder moves are organization only. They never trigger the `template.update` embed webhook.
- To move several templates, call this endpoint once per template.

## Rate Limits

- 30 requests per minute per API key