# VOICE_AGENT_TEMPLATES

voice-agent-templates endpoints.

**Base URL:** `https://api.trustpager.com/functions/v1/api/v1`

## Endpoints

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

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.

**Scopes:** `voice-agents:write` — [full detail](./voice-agent-templates/post-voice-agent-templates-slug-create-agent.md)

### GET /voice-agent-templates/:slug

Get one voice agent template by slug (e.g. "appointment-setter"), with its setup questions: key, label, type (text, long_text, event_type = a booking calendar id from list_scheduled_event_types, phone_number = a phone number id from list_phone_numbers, transfer_number = a phone number to put callers through to, email), whether it is required, and any default.

**Scopes:** `voice-agents:read` — [full detail](./voice-agent-templates/get-voice-agent-templates-slug.md)

### GET /voice-agent-templates

List the ready-made voice agent templates any workspace can create an agent from (Appointment Setter, Receptionist and more). Each has a category (sales, service, reputation, feedback), a direction (inbound answers calls, outbound makes them), plain-English "includes", and the setup questions create_voice_agent_from_template needs answered.

**Scopes:** `voice-agents:read` — [full detail](./voice-agent-templates/get-voice-agent-templates.md)
