# POST /agency/websites/:website_id/publish

**Resource:** [Agency](./agency.md)  
**MCP tool:** `publish_agency_website`  
**Scopes:** `agency:write`  
**Write operation:** yes

Agency owners and systems architects only: publish a website preview so it becomes the live site, replacing what is live now. With no sync_id the latest ready preview goes live; name an earlier published sync id to roll back to it. A key with the agency:write-approval scope sends the publish for a person to approve first.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `website_id` | path | string | yes | websites[].website_id from list_agency_websites |
| `sync_id` | body | string | no | A sync id from list_agency_websites; omit to publish the latest ready preview; an earlier published sync rolls back to it. |
| `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/agency/websites/:website_id/publish"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"sync_id":"...","require_approval":"..."}'
```

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