# PATCH /domains/:hostname

**Resource:** [DOMAINS](./domains.md)  
**MCP tool:** `set_domain_uses`  
**Scopes:** `domains:write`  
**Write operation:** yes

Switch only the shortlinks use on or off for a hostname. Website and email uses are read-only here. Change them in Growth > Websites and Settings > Email.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `hostname` | path | string | yes | The hostname. Scheme, path, case and a trailing dot are cleaned. Example: "go.example.com.au". |
| `uses` | body | object | yes | Only shortlinks can be switched here. Website and email uses stay in Growth > Websites and Settings > Email. Example: {"shortlinks":true}. |
| `uses.shortlinks` | body | boolean | no | true connects shortlinks and returns the DNS records; false switches links off and starts removal after 30 days. Example: true. |
| `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/domains/:hostname"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"uses":"...","uses.shortlinks":"...","require_approval":"..."}'
```

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