# PUT /websites/:website_id/document

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

Choose the document a website emails when a visitor asks for it (kind send, the Documents by email tool) or sends them to sign (kind sign, the E-signing tool); switch_off true turns it off. Sites made from a TrustPager design already have the request form; other sites send a website enquiry with intent document or agreement (get_website_tool documents or docusign has the code). Runs as a Website Tools automation in this workspace, so it needs no approved action. Returns the chosen document; get_website_tool shows it too.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `website_id` | path | string | yes | UUID of the website. Get ids from list_websites. |
| `kind` | body | string | yes | send: the website emails this document to whoever asks (the Documents by email tool). sign: the website sends it to sign (the E-signing tool). |
| `template_id` | body | string | no | The document template to use, from list_document_templates. |
| `switch_off` | body | boolean | no | true stops the website sending this kind of document (the automation is kept, so steps the owner added are not lost). Send this or template_id. |
| `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 PUT   "https://api.trustpager.com/functions/v1/api/v1/websites/:website_id/document"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"kind":"...","template_id":"...","switch_off":"..."}'
```

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