# POST /gifts/:gift_id/questions/generate

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

Write the gift's questions with AI from a brief (defaults to the gift's own brief), and add them. Costs 16 credits a go, refunded when nothing usable comes back. replace=true swaps out the current questions.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `gift_id` | path | string | yes | The gift (list_gifts). |
| `brief` | body | string | no | What the questions should find out, in your words. Defaults to the quiz or gift's own brief and name. |
| `count` | body | number | no | How many questions to write, 1 to 20 (default 8). |
| `replace` | body | boolean | no | true: remove the current questions first. Default false: add to them. |
| `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/questions/generate"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"brief":"...","count":"...","replace":"..."}'
```

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