# POST /portals/templates/:template_id/instantiate

**Resource:** [Portals](./portals.md)  
**MCP tool:** `instantiate_portal_template`  
**Scopes:** `portals:write`  
**Write operation:** yes

Create a NEW portal from a template, anchored to an opportunity. Copies the template design and sets config.anchor to the opportunity; optionally seeds members. Returns the new portal. Share records into it afterwards with share_to_portal.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `template_id` | path | string | yes |  |
| `opportunity_id` | body | string | yes | The CRM opportunity to anchor the new portal to (required). |
| `name` | body | string | no | Portal name. Defaults to the template name. |
| `members` | body | array | no | Optional members to seed: [{ email, user_id?, status? }]. |
| `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/portals/templates/:template_id/instantiate"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"opportunity_id":"...","name":"...","members":"..."}'
```

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