# POST /gifts

**Resource:** [GIFTS](./gifts.md)  
**MCP tool:** `create_gift`  
**Scopes:** `gifts:write`  
**Write operation:** yes

Create a gift as a draft. Then add its questions (add_gift_question or generate_gift_questions from its brief), say what it makes (makes), set your PDF design (get_gift_starter_design, set_gift_pdf_design), try it (preview_gift), set it live with update_gift, and put it on a Lead Magnet's Made for you block (gift_id).

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `name` | body | string | yes | What the gift is called, e.g. "Your free 30-day growth plan". |
| `status` | body | string | no | draft, live (Lead Magnets and campaigns can give it) or archived. |
| `brief` | body | string | no | What the gift is for, in your words (up to 2000 characters); the AI writes its questions from it. |
| `makes` | body | object | no | What the gift makes, fields merge per maker: {pdf: {enabled, plan_brief (what the AI writes for them, up to 2000 characters; empty = no written plan, just your design and pages)}, image: {enabled, kind website_design (their own website design picture) \| brief (a picture made for them from brief and what we know) \| badge (a shareable badge with their score), brief}, video: {enabled, brief (what the short personal video is about)}, audit: {enabled} (their website and Google check: site basics, Google Maps listing and reviews, Google rank, whether ChatGPT names them, scored out of 100), website: {enabled} (their website rebuilt in one of our designs: a live preview link and its picture), script: {enabled} (the gift's own Custom Script, see generate_gift_script)}. Everything uses their answers, their quiz score, what Cold Leads knew and what research found. |
| `research` | body | object | no | What to look up about their business first, with internet lookups (each fact keeps its source, nothing invented): {checks: [competitors, online_presence, industry_ai, prices, why_now], extra_brief (anything else to look up), max_lookups 1 to 20 (default 6)}. competitors: Their 3 nearest competitors (Google Maps ratings, reviews and what they offer). online_presence: How they show up online (website, Google listing, reviews, whether ChatGPT recommends them). industry_ai: What their trade is doing with AI (real examples from businesses like theirs). prices: Prices near them (what nearby competitors charge, where it is public). why_now: Why now (recent news for their trade or area: rules, grants, projects). Each lookup is priced inside the gift's one price. |
| `deliver_on_page` | body | boolean | no | Show it on their Lead Magnet page (Download on their page). Default true. |
| `email_when_ready` | body | boolean | no | Email it to them when it is made (the PDF attached). A cold campaign lead gets it by email only after answering on their page. Default true. |
| `remake_on_change` | body | boolean | no | Make it again when they change their answers (or retake the quiz on the same page). Default true. |
| `calculations` | body | object | no | The gift's calculated results: figures worked out instantly from their answers, with no AI, no credits and no waiting (stamp duty, a repayment, an LVR). Replaces the whole definition, so send everything; send {} to remove it. Shape: { tables: { <name>: { kind: "brackets", rows: [{ from, to (null on the last row), base, rate }] } or { kind: "lookup", rows: [{ key, value }] } }, outputs: [{ key, label, formula, format: plain \| money \| percent }] }. A formula reads questions by their key (get_gift lists them) and other results by their key, like price - deposit. It can use + - * / ^ and brackets, comparisons (= != < <= > >=), and, or, not, if(condition, a, b), min, max, round(x, decimal places), floor, ceil, abs, has(several-answers question, "option"), brackets(table, amount) for tiered amounts such as stamp duty (base + rate x (amount - from) for the row the amount falls in; rate is a decimal, 0.0175 means 1.75 percent; each row starts at 0 or where the one before ends; the last row's to is null) and lookup(table, key, value if missing) for a value per key such as per state; a lookup value can name a brackets table, so brackets(lookup(duty_by_state, state), price) picks the table for their state. A choice question compares as text (state = "NSW"), a Yes/No choice is true or false, a Number question is a number (a percent question holds 6 for 6 percent, so write rate / 100). Division by zero, a question left blank or a state with no row shows "Not available". Up to 50 results, 30 tables, 200 rows a table, 2000 characters a formula. Try them with calculate_gift (nothing is saved). |
| `calculator_id` | body | string | no | Use a calculator from the library (list_calculators) for the calculated results, instead of writing calculations here. Its live version is used, and every publish updates this one too. null stops using it (the results stay as they are, now this one's own). |
| `calculator_map` | body | object | no | Where each of the calculator's inputs comes from, by input key: { "<input key>": { "question": "<question key>" } } to read one of the questions, or { "<input key>": { "value": <a set value> } }. An input with the same key as a question reads it without being listed; an input with a starting value uses it when not listed. |
| `calculator_show` | body | array | no | Which of the calculator's results the reader sees, by key. The others are not shown, and an open website calculator never sends them to the visitor's browser unless a shown result is worked out from them. null or left out shows them all. |
| `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/gifts"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"name":"...","status":"...","brief":"..."}'
```

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