> ## Documentation Index
> Fetch the complete documentation index at: https://tapace.lk/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a template

> Renames a template or changes its design.

A new `definition` creates a new revision. Passes you issue afterwards use it. Existing passes keep the revision they were issued with until you [deploy the template](https://tapace.lk/docs/api-reference/deployments/create.md).

Turning a wallet off in `issuePlatforms` stops new passes using it as soon as you save, in both test and live, with no new revision and no deployment. Passes already on that wallet keep their updates, notifications and voids, so its design stays required until no active pass uses it.

**id** `string` *required*

The template ID.

**Idempotency-Key** `string` *required*

A unique value for this request.

**expectedRevision** `integer` *required*

The template's current `revision`. If someone changed the template since you read it, the update is rejected instead of overwriting their work.

**name** `string`

A new name, from 1 to 100 characters.

**definition** `object`

A complete new design. It replaces the current one. TapAce sets `definition.platforms` itself and ignores any value you send, so use `issuePlatforms` to choose wallets.

**issuePlatforms** `object`

Which wallets new passes can use. Send both values. Both can be `false`, which stops the template issuing new passes while existing ones keep working. Turning on a wallet the current revision doesn't require creates a new revision, and is rejected if that wallet's design is incomplete.

**properties**

**apple** `boolean` *required*

Offer Apple Wallet on new passes.

**google** `boolean` *required*

Offer Google Wallet on new passes.

### Response

Returns the updated [template](https://tapace.lk/docs/api-reference/templates/get.md).

### Errors

| Status | When |
| - | - |
| `400` | The definition is invalid, or a wallet that is offered or used by an active pass is missing its required design. Each problem is listed in `error.issues`. |
| `404` | The template doesn't exist. |
| `409` | `expectedRevision` isn't the current revision, or the template is archived. |

```bash cURL theme={null}
curl -X PATCH https://api.tapace.lk/v1/templates/tmpl_Q4vN8xT2mLr7KpZs3Wd1 \
  -H "Authorization: Bearer $TAPACE_API_KEY" \
  -H "Idempotency-Key: 2f8c4a1e-6b3d-4e9a-8c7f-1a5d9e3b2c60" \
  -H "Content-Type: application/json" \
  -d '{ "expectedRevision": 3, "name": "Gold membership 2027" }'
```

```json 200 theme={null}
{
  "object": "template",
  "id": "tmpl_Q4vN8xT2mLr7KpZs3Wd1",
  "type": "generic",
  "name": "Gold membership 2027",
  "revision": 3,
  "archived": false,
  "requiredFields": ["memberName"],
  "requiredActions": [],
  "issuePlatforms": { "apple": true, "google": true },
  "createdAt": "2026-10-01T09:00:00.000Z",
  "updatedAt": "2026-10-13T09:30:00.000Z"
}
```

```json 409 theme={null}
{
  "error": {
    "type": "conflict_error",
    "message": "Template was modified since you loaded it."
  },
  "requestId": "req_8f3a2c1d9e7b6a54"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.