# POST /agency/onboarding-links

**Resource:** [Agency](./agency.md)  
**MCP tool:** `create_agency_onboarding_link`  
**Scopes:** `agency:write`  
**Write operation:** yes

Make the free trial invite for one opportunity in your CRM: a clean way into their free trial, with nothing to pay. people picks who is invited (everyone on the opportunity with an email can be); each gets their own link, and all of them join ONE new workspace: the first to sign up creates it, everyone after joins it, and the owner gets Admin whenever they join. Their workspace is prepared before anyone signs up: we read the opportunity's calls, notes and needs analysis and look the business up online (website, Google listing, ABN), so the owner lands in a workspace that is already set up (logo, colours, details, hours, products with prices, what the assistant knows, the starting setup). Check and correct what was found with get_agency_onboarding_invite and update_agency_onboarding_setup before sending. Their workspace joins your agency, tied to the opportunity's Company; pricing comes later, in your proposal. template_company_id picks the starting setup. Only the newest invite for an opportunity works. Returns the owner's link at the top level, invite_id, and people (each person's link). Email everyone with send_agency_onboarding_invite.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `deal_id` | body | string | yes | The opportunity in your agency's CRM the customer is signing up for |
| `people` | body | array | no | Who gets invited, matching "Who gets invited" on the opportunity's TrustPager Workspace card: people on the opportunity with an email (preview_agency_onboarding_link lists them as people). Each gets their own link and email, and everyone joins ONE new workspace. One person is the owner (owner: true; default the opportunity's main contact): they get Admin access and own the workspace. role is everyone else's access: client_admin (Admin), client_editor (Editor) or client_viewer (Viewer), default client_admin. Leave out to invite the opportunity's main contact alone (then name, email and phone below apply). |
| `name` | body | string | no | The customer's name (default: the opportunity's contact) |
| `email` | body | string | no | The customer's email (default: the contact's, else the Company's) |
| `phone` | body | string | no | The customer's phone (default: the contact's, else the Company's) |
| `business_name` | body | string | no | Their business name (default: the opportunity's Company) |
| `template_company_id` | body | string | no | The template their new workspace starts from, from preview_agency_onboarding_link's templates (yours first, then FinalPiece's). It is preselected when they sign up and they can change it. Leave out to suggest one by their business type |
| `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/agency/onboarding-links"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"deal_id":"..."}'
```

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