# PATCH /websites/:website_id/github

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

Workspace admins (and the agency): switch auto-publish for a GitHub-connected website. On: every preview that builds goes live straight away. Off: previews wait for publish_website_preview.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `website_id` | path | string | yes | UUID of the website. Get ids from list_websites. |
| `auto_publish` | body | boolean | yes | true: every preview that builds goes live straight away. false: previews wait for publish_website_preview. |
| `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 PATCH   "https://api.trustpager.com/functions/v1/api/v1/websites/:website_id/github"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"auto_publish":"...","require_approval":"..."}'
```

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