# POST /agents/:id/update-flow

**Resource:** [Agents](./agents.md)  
**Scopes:** `voice-agents:write`  
**Write operation:** yes

Save a conversation flow draft to Retell (voice only). Requires the full ConversationFlow object in the "flow" field. Does not go live until /publish is called.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `id` | path | uuid | yes | Voice agent ID |
| `flow` | body | object | yes | Full ConversationFlow object |

## Request example

```bash
{"flow": {"global_prompt": "...", "nodes": [...], "tools": [...]}}
```

## Response example

```json
{"success": true, "message": "Conversation flow draft saved to Retell", "version": 11}
```

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