# POST /gifts/:gift_id/script/approve-code

**Resource:** [GIFTS](./gifts.md)  
**MCP tool:** `approve_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, people see nothing made by the script, and cold campaigns giving this gift cannot start.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `gift_id` | path | string | yes | The gift whose script makes it (list_gifts). |
| `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/:gift_id/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`