# POST /websites/:website_id/calculators

**Resource:** [Websites](./websites.md)  
**MCP tool:** `set_website_calculator`  
**Scopes:** `websites:write`  
**Write operation:** yes

Put a gift (a calculator) or a scorecard quiz on a website, or change the Lead Magnet its "Email me my full report" step goes through (send it again with the same resource_id). The gift or quiz must be live for visitors to use it; only what is listed here is served on that website. A gift that only calculates, and any scorecard quiz, runs open: visitors see their figures or score on the page with nothing saved and no credits used. A gift that makes anything never runs open: it needs a Lead Magnet that gives it, and visitors give their name and email first (their private link is emailed). Returns the calculator with its embed_code: paste it where it should appear (with the site code on the page, only its <div> line is needed).

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `website_id` | path | string | yes | UUID of the website. Get ids from list_websites. |
| `kind` | body | string | yes | gift (a calculator or any gift) or quiz (a scorecard). |
| `resource_id` | body | string | yes | The gift (list_gifts) or the scorecard quiz (list_quizzes). |
| `lead_magnet_id` | body | string | no | The Lead Magnet whose private link is emailed when a visitor asks for their full report: it must give this gift (a Made for you block) or this quiz (a Quiz block), be live, and have no PIN. Required for a gift that makes anything (PDF, plan, research, picture, video, script): such a gift never runs open, so visitors reach it by email first. Left out, the one live Lead Magnet that gives it is used when there is exactly one. Send null to take the email step off a gift that only calculates. |
| `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/websites/:website_id/calculators"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"kind":"...","resource_id":"...","lead_magnet_id":"..."}'
```

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