---
title: "Update a BlockTemplate."
method: PUT
path: "/client/blockTemplates/{blockTemplateId}"
tags: ["Development API - Block Templates"]
---

# Update a BlockTemplate.

`PUT /client/blockTemplates/{blockTemplateId}`

## Request

- Base URL: `https://api.tapcart.com`
- URL: `https://api.tapcart.com/client/blockTemplates/{blockTemplateId}`
- Auth: HTTP bearer

Updates an existing block template if `forceUpdate` is true. Requires write auth.

## Path parameters

- `blockTemplateId` string, required

## Request body

- object
  - `owner` object
    - `type` string: Owner type (e.g. 'app').
    - `id` string: Owner ID (required if owner type is 'app').
  - `label` string: The label of the BlockTemplate.
  - `code` string: The encoded source code for the BlockTemplate.
  - `transpiledCode` string: The encoded transpiled code for the BlockTemplate.
  - `manifestOptionsList` object[]: List of manifest options.
  - `forceUpdate` boolean: If true, forces an update on an existing BlockTemplate.
  - `updateDescription` string: Description for the update.
  - `tags` string[]: Tags associated with the BlockTemplate.
  - `status` string: Status of the BlockTemplate.
  - `versionIndex` number: The index of the version to set (only used if force updating).

## Response `200`

BlockTemplate successfully created or updated.

## Other responses

- `400`: Bad request, including invalid `versionIndex` or missing required fields.
- `401`: Unauthorized access.
- `404`: BlockTemplate not found when force updating.
- `500`: Internal server error.

---

[API](https://skmtc.dev/tapcart/apis/tapcart-tapcart-app-pages-api.md) - [All operations](https://skmtc.dev/tapcart/apis/tapcart-tapcart-app-pages-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tapcart/apis/tapcart-tapcart-app-pages-api/revisions/4b5a76199cc4?raw)
