---
title: "Confirm a site's template upgrade"
method: POST
path: "/sites/{id}/template/confirm"
tags: ["Sites"]
---

# Confirm a site's template upgrade

`POST /sites/{id}/template/confirm`

## Request

- Base URL: `https://api.crevio.co/v1`
- URL: `https://api.crevio.co/v1/sites/{id}/template/confirm`
- Auth: API key in header `Authorization`

Records that a site now runs the current template. Call it as the last step of an upgrade, after the port is pushed to main and, for a site that is live, deployed to production: it is refused with `upgrade_not_live` while production runs different code from main. Does not deploy or change any code.

## Path parameters

- `id` string, required

## Headers

- `Idempotency-Key` string

## Response `200`

The site's template status after the upgrade

- object
  - `object` 'site_template', required
  - `generation` string, nullable, required: The framework generation the site runs (`vinext`, `tanstack-start`); null for a site created before generations were recorded.
  - `template_commit` string, nullable, required: The template commit the site was forked from or last upgraded to; null when it cannot be told.
  - `latest_generation` string, required: The generation new sites are forked from.
  - `latest_commit` string, nullable, required: The template commit new sites are forked from.
  - `archive_url` string, nullable, required: A tarball of `latest_commit`, fetchable with curl.
  - `upgrade_available` boolean, required: The site is on an older generation or template commit, or its commit cannot be told.

## Other responses

- `401`: Authentication required
- `404`: Resource not found
- `422`: Validation error
- `429`: Rate limit exceeded — 600 requests per minute per owner on the free tier: every API key and OAuth token one person holds on an account shares one budget, and the account's team keys share another. Retry after the number of seconds in `Retry-After`.

## Changes

- **2026-11-15** `56c22ab9b282`: 4 warning
  - added the new `idempotency_error` enum value to the `error/type` response property for the response status `401`
  - added the new `idempotency_error` enum value to the `error/type` response property for the response status `404`
  - added the new `idempotency_error` enum value to the `error/type` response property for the response status `422`
  - added the new `idempotency_error` enum value to the `error/type` response property for the response status `429`
- **2026-10-23** `bf736a72ee9c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/crevio/apis/crevio-api-v1/changes/sites/:id/template/confirm/post.md)

---

[API](https://skmtc.dev/crevio/apis/crevio-api-v1.md) - [All operations](https://skmtc.dev/crevio/apis/crevio-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/crevio/apis/crevio-api-v1/revisions/ccbd8fcbd6d7?raw)
