# POST /portals/templates/:template_id/instantiate-for-contact

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

Create a NEW portal from a template anchored to a CONTACT (a referrer) — the partner-portal path. Pins referral.referrerContactId (commission dashboard scopes to them) and optionally documents_opportunity_id (the referrer's own opportunity that supplies the templateContent signing/document/file candidates + per-instance signing variables). The template's templateContent proliferates into the instance automatically. Use this instead of instantiate_portal_template for partner portals.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `template_id` | path | string | yes |  |
| `contact_id` | body | string | yes | The referrer contact to anchor the partner portal to (required). |
| `documents_opportunity_id` | body | string | no | Optional: the referrer's own opportunity that scopes signing/document/file template content + fills per-instance signing variables. |
| `name` | body | string | no | Portal name. Defaults to the template name. |
| `invite_contact` | body | boolean | no | Invite the contact as a portal member (branded email). Default true. |
| `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-for-contact"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"contact_id":"...","documents_opportunity_id":"...","name":"..."}'
```

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