# Merge the newest version of a template into the site

`POST /hosting/sites/{id}/templates/{tid}/upgrade/apply` · Rivier · hosting

Merge the newest version of a template into the site: unedited blocks change, edited ones stay, new pages arrive; each changed page is one patch. A person only.

- Scope: hosting:write
- Graphql: Mutation.hostingTemplateUpgradeApply
- Sdk: hosting.template.upgradeApply
- Cli: hosting template upgrade apply

## Parameters

- `id` (path, required), string
- `tid` (path, required), string

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/hosting/sites/{id}/templates/{tid}/upgrade/apply' \
  -H 'Authorization: Bearer $KEY'
```
