# POST /agents

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

Create an agent. Include "type": "voice" or "type": "text" in the request body. For voice: agent_name is required. For text: name is required.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `type` | body | string | yes | Agent type: "voice" or "text" |
| `agent_name` | body | string | no | Agent name (required for voice agents) |
| `name` | body | string | no | Agent name (required for text agents) |
| `language` | body | string | no | Language code (voice only) |
| `voice_id` | body | string | no | Voice ID (voice only) |

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