# PATCH /lead-magnets/:lead_magnet_id

**Resource:** [LEAD_MAGNETS](./lead-magnets.md)  
**MCP tool:** `update_lead_magnet`  
**Scopes:** `lead_magnets:write`  
**Write operation:** yes

Update a lead magnet. Pass only what changes. config.hero and config.theme merge field by field; config.blocks replaces the whole list, so send every block in page order (keep the id of each existing block). Example: {"config": {"theme": {"heading_font": "cormorant", "background": "#f3efe8"}, "blocks": [{"id": "files1", "type": "files", "heading": "Your guide", "files": [{"file_id": "...", "label": "The guide"}]}, {"type": "faq", "heading": "FAQ", "items": [{"q": "...", "a": "..."}]}]}}. Changes show straight away to everyone who opens their link. status live hands it out from the linked form and automations; archived turns off every link.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `lead_magnet_id` | path | string | yes |  |
| `name` | body | string | no | What the lead magnet is called, e.g. "2027 Love & Timing Calendar". Shown in the email and on the page. |
| `description` | body | string | no | Internal note about this lead magnet. |
| `status` | body | string | no | draft (default) while building, live to hand it out from forms and automations, archived to stop it and turn off every link. |
| `form_template_id` | body | string | no | A public form: everyone who completes it gets this lead magnet emailed. null to unlink. |
| `email_subject` | body | string | no | Subject of the delivery email. Default "Here is your {{lead_magnet.name}}". Tokens: {{contact.first_name}}, {{contact.full_name}}, {{lead_magnet.name}}, {{company.name}}. |
| `email_intro_html` | body | string | no | Opening of the delivery email (HTML). The private link button and the PIN (when on) are added for you. Same tokens as the subject. |
| `pin_required` | body | boolean | no | Link security. false (default): the link alone opens the page. true: the email also carries a PIN and the page asks for it once per browser. |
| `pin_unlock_minutes` | body | number | no | With pin_required: how long a right PIN keeps that browser unlocked, in minutes. One of 10, 30 (default), 60, 120, 480, 1440, or 0 for until the link expires. |
| `page_url` | body | string | no | Optional. The address of the page for this lead magnet on your own website, e.g. https://www.example.com/your-guide. Emailed links then open that page with ?lm=<token> added. The page needs the install code from get_lead_magnet_install. null (default) uses the hosted page. |
| `access_days` | body | number | no | Days each link stays open after it is sent. null (default) means it never expires. |
| `portal_template_id` | body | string | no | Open a client portal (off by default, null). A portal template (list_portal_templates): everyone who gets this lead magnet gets their OWN client portal made from it, on their own opportunity (their newest open one, or a new one if they have none), with them as the member tied to their contact. The login is emailed through the workspace's own invite email and shown on their private page ("Your portal is ready"). Made in the background within about a minute. Their Gifts and Lead Magnets come from the template (set_portal_template_content). Never for cold campaign leads. null turns it off for new people; portals already made stay. |
| `portal_pipeline_id` | body | string | no | With portal_template_id: the workflow (pipeline) a NEW opportunity is placed in when the person has none. Send with portal_stage_id. null = the workspace's default workflow and its first stage. |
| `portal_stage_id` | body | string | no | With portal_pipeline_id: the stage of that workflow a new opportunity starts in. null with portal_pipeline_id null = the first stage of the default workflow. |
| `config` | body | object | no | The page: {hero, blocks, theme}. hero (fields merge): {headline, highlight (a short phrase shown AFTER the headline in a lighter tone; it is not matched inside the headline, so do not repeat headline words; null or "" clears it), welcome (PLAIN TEXT, not HTML: tags would show as typed; a blank line starts a new paragraph and single line breaks are kept; null or "" clears it), image_url (https photo behind the headline or null), align left\|center, size large\|small}. blocks (send the FULL list in page order; it replaces the old one; keep the id of a block to keep it, leave id out for a new one): each {type, show_if?, ...fields}: text {html}, image {url, alt, caption, size full\|contained, link_url}, image_text {url, alt, html, image_side left\|right}, files {heading, files:[{file_id, label}]}, video {heading, src}, slides {heading, src}, booking {heading, text, event_type_id (a booking type open for public booking; null = the first one)}, offer {heading, text, code, button_label, button_url, ends_at}, faq {heading, items:[{q, a}]}, button {label, url, style solid\|outline, align left\|center}, quote {text, author, role}, spacer {size s\|m\|l}, choice (Pick one: picture cards, one can be picked) {heading, text, source custom\|website_designs (every ready website design, the best fits for the reader's business first, with pictures and live previews), options:[{label, description, image_url, id?}] (custom only), picked_heading and picked_text (shown once something is picked; {{pick.label}} is the pick's name), show_first (options shown before "See all", 0 = all), save_to_field}, checklist (Tick all that apply) {heading, text, source custom\|website_tools\|trustpager_goals\|trustpager_week\|trustpager_features (the three TrustPager sign-up questions: what they want to achieve, what eats up their week, what they want help with; the features block starts ticked from their goals and week answers until they tick it, and all three carry into TrustPager sign-up through a trustpager_signup Next step), options (custom only), save_to_field}. save_to_field (both answer blocks): the key of a Text or Paragraph opportunity custom field to also write the answer into, in words ("Get paid faster, Automate my everyday tasks"), on the reader's newest opportunity, rewritten every time they change it; "" = off, continue (Next step) {heading, text, destination trustpager_signup\|url, signup_label, login_label (trustpager_signup: create a TrustPager account or log in, the picked website design and ticked website tools carried into the app), button_label, url (url: the answers are added as lm_<block id>=<option id>)}, made_for_you (a free gift made for each reader's own business; at most one per page) {heading, text (may use {{reader.business_name}}), gift_id (one of your Gifts, list_gifts: it holds the gift's own questions, what it makes and its price), use_quiz_score (true: the gift waits for the page's quiz block and uses their score), button_label (the link under a website design or a script's link), maker ai_plan\|website_mockup\|custom_script and brief (up to 1000 characters): the settings from before Gifts, only read for a block without gift_id}; try it with preview_lead_magnet_gift, quiz (one of your Quizzes on the page; at most one per page) {heading, text, quiz_id (list_quizzes), show_score (show their score and result when they finish, default true), email_score (email it to them too, default false)}. A reader's picks and ticks are saved on their pass (list_lead_magnet_access shows answers); a pick and a Next step press add a note to the contact's timeline and fire the lead_magnet_answered automation trigger. A link with ?pick=<option id> opens the page with that option picked, or adds it to a Tick all that apply block's ticks (an email's {{lead_magnet.choices}} and {{lead_magnet.options:<block id or source>}} cards do this; a tick from an email also adds the timeline note and fires lead_magnet_answered). show_if {field: "contact.<field>" or "answer.<form field id or Pick one block id>", equals} shows a block only to matching readers; show_if {field: "gift.status", equals: "ready"} shows it only once the page's Made for you gift is made (an offer or booking that follows the gift: hidden while the gift is being made, shown on the page the moment it is ready). theme (fields merge): {heading_font, body_font (see page_guide.fonts), background, text, main, accent (#rrggbb; main/accent null = workspace colours), background_image (https or null), corners sharp\|soft\|round, surface cards\|flat, width narrow\|wide, show_logo}. Text and html may use {{contact.first_name}}. get_lead_magnet returns page_guide with every block type and font. |
| `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 PATCH   "https://api.trustpager.com/functions/v1/api/v1/lead-magnets/:lead_magnet_id"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"name":"...","description":"...","status":"..."}'
```

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