# POST /voice-agent-templates/:slug/create-agent

**Resource:** [VOICE_AGENT_TEMPLATES](./voice-agent-templates.md)  
**MCP tool:** `create_voice_agent_from_template`  
**Scopes:** `voice-agents:write`  
**Write operation:** yes

Create a working voice agent in this workspace from a template: the script, voice, safety role and tools are set up from the answers, and the agent is published. It answers no phone number and calls nobody until you connect a number or an automation calls it. Answer the template's questions (get_voice_agent_template); blanks take their defaults, and optional parts like booking or transfers are left out when their answer is blank. Returns the new agent, any warnings, and next steps.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `slug` | path | string | yes | Template slug, e.g. "appointment-setter". |
| `agent_name` | body | string | no | Optional name for the new agent. Defaults to "<business name> <template name>". |
| `answers` | body | object | no | Question key to answer, e.g. { "what_you_do": "We install solar panels across Perth.", "booking_calendar": "<event type id>", "caller_id": "<phone number id>" }. |
| `require_approval` | body | boolean | no | Optional. Set true to route this write into the approval queue for human review instead of executing it immediately (returns 202 + an approval_id). Works even when your key/token has permission to execute directly. |

## Request example

```bash
curl -X POST   "https://api.trustpager.com/functions/v1/api/v1/voice-agent-templates/:slug/create-agent"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"agent_name":"...","answers":"...","require_approval":"..."}'
```

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