# POST /ai/needs-analysis

**Resource:** [AI](./ai.md)  
**Scopes:** `ai:use`  
**Write operation:** yes

Run AI needs analysis on a deal -- extracts client requirements and recommendations from all linked transcripts and activities. Provide deal_id; the system fetches all related data automatically.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `deal_id` | body | uuid | yes | Deal ID. The system fetches all related transcripts, contacts, and activities. |
| `master_prompt` | body | string | no | Optional custom instructions to guide the analysis focus |

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