---
title: "Create a folder policy for a connection"
method: POST
path: "/connections/{connection_id}/folder-policies"
tags: ["Folder Policies"]
---

# Create a folder policy for a connection

`POST /connections/{connection_id}/folder-policies`

Create or update a folder policy for a specific connection.

## Path parameters

- `connection_id` string, uuid, required

## Request body

- CreateFolderPolicyRequest
  - `provider_folder_id` string, required — Folder ID from the source provider
  - `folder_name` string, nullable — Display name of the folder
  - `folder_path` string, nullable — Display path of the folder
  - `parent_folder_id` string, nullable — Parent folder's provider ID for inheritance resolution
  - `sync_mode` 'sync' | 'skip' | 'manual', required

## Response `200`

Successful Response

- FolderPolicyResponse
  - `id` string, uuid, required — Unique policy ID
  - `provider_folder_id` string, required — Folder ID from the source provider
  - `folder_name` string, nullable — Display name of the folder
  - `folder_path` string, nullable — Display path of the folder
  - `parent_folder_id` string, nullable — Parent folder's provider ID
  - `sync_mode` 'sync' | 'skip' | 'manual', required
  - `connection_id` string, uuid, nullable — Connection ID (null for integration defaults)

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/hyperspell/apis/hyperspell-api.md) · [All operations](https://skmtc.net/hyperspell/apis/hyperspell-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hyperspell/hyperspell-api/revisions/5721acd588e6/schema)
