# POST /files/:id/make-public

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

Move an image or secure file from private storage to the public CDN. For image files (type=image, is_private=true): the file is moved from private R2 to the public bucket and is_private is set to false -- the original private copy is removed. For secure files (type=secure): the file is copied from Supabase private storage to the public CDN and public_url is set -- the original private copy is retained. Returns the public URL of the published file. Use POST /files/:id/publish for documents (type=document).

## Parameters

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

## Response example

```json
{
  "data": {
    "id": "file-uuid",
    "type": "image",
    "public_url": "https://cdn.trustpager.com/client-website-content/company-id/filename.jpg",
    "is_private": false
  }
}
```

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