# DELETE /opportunities/:id/files/:fileId

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

Remove a file attachment from an opportunity. Detaches the link only -- the file itself is not deleted (use DELETE /files/:id to fully delete the file). Legacy alias: DELETE /deals/:id/files/:fileId. Matching MCP tool: remove_opportunity_file.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `id` | path | uuid | yes | Opportunity ID |
| `fileId` | path | uuid | yes | File ID to detach |

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