# POST /files/:id/make-private

**Resource:** [Files](./files.md)  
**Scopes:** `files:write`  
**Write operation:** yes

Move an image or secure file from the public CDN back to private storage. For image files (type=image, is_private=false): the file is moved from the public bucket to private R2 and is_private is set to true -- the public URL is no longer accessible. For secure files (type=secure): the public CDN copy is deleted and public_url is cleared -- the original private copy is retained. Use POST /files/:id/unpublish for documents (type=document).

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `id` | path | uuid | yes | File UUID (company_files row with is_private=false, or company_secure_files row with a public_url) |

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`