# POST /lead-magnets/:lead_magnet_id/gift-script/approve-code

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

Approve the gift script's current code so it makes real gifts (publishes it as part of approving). Admin only. Until approved, readers of a custom_script gift see nothing made for them and cold campaigns using this lead magnet cannot start.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `lead_magnet_id` | path | string | yes | The lead magnet whose Made for you gift the script makes. |
| `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/lead-magnets/:lead_magnet_id/gift-script/approve-code"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"require_approval":"..."}'
```

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