> ## 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.

# Deploy a template

> Moves the passes already issued from a template onto its latest design.

[Updating a template](https://tapace.lk/docs/api-reference/templates/update.md) with a new `definition` only changes passes you issue afterwards. A deployment moves the active passes already issued from it, in your API key's environment, onto its latest revision and pushes the new design to every wallet that has them.

It takes one call. TapAce first works out which passes change, with `status: "preparing"`, then starts the deployment on its own. Follow it with [Get a deployment](https://tapace.lk/docs/api-reference/deployments/get.md) until `status` is `completed` or `completed_with_errors`. If it can't be prepared or started, for example because the template changed again or another deployment of it is still running, `status` becomes `failed` and `error` says why.

Calling this again while a deployment is still being prepared returns the same deployment, using the options from the latest call.

**id** `string` *required*

The template ID.

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

A unique value, such as a UUID, so a retry never starts a second deployment.

**notificationMode** `string` (default: silent)

`silent` updates the passes quietly. `notify` also alerts holders: on Apple Wallet, passes whose field values change announce those changes, and the rest show `appleText` in their **Message for you** field. On Google Wallet, passes get `googleTitle` and `googleBody` as a message. A wallet's text is only used when the template's [`issuePlatforms`](https://tapace.lk/docs/api-reference/templates/get) offers it or an active pass in your API key's environment uses it. A deployment that changes barcodes can only be `silent`.

**appleText** `string`

With `notify`, the Apple Wallet message, up to 120 characters. Defaults to "Your pass has been updated with new details."

**googleTitle** `string`

With `notify`, the Google Wallet message title, up to 60 characters. Defaults to "Pass updated".

**googleBody** `string`

With `notify`, the Google Wallet message body, up to 500 characters. Defaults to "Your pass has been updated with new details."

### Response

Returns the [deployment](https://tapace.lk/docs/api-reference/deployments/get.md) with status `201`. Its `status` is usually `preparing`, or `pending` when it could start straight away.

### Errors

| Status | When |
| - | - |
| `400` | The template is archived, or a text is too long. |
| `404` | The template doesn't exist. |
| `409` | Another deployment of this template is being prepared at the same moment. Retry the request. |

```bash cURL theme={null}
curl https://api.tapace.lk/v1/templates/tmpl_Q4vN8xT2mLr7KpZs3Wd1/deployments \
  -H "Authorization: Bearer $TAPACE_API_KEY" \
  -H "Idempotency-Key: 8f2c6a1e-4b9d-4e3a-b7c5-1d8e3f6a9b20" \
  -H "Content-Type: application/json" \
  -d '{
    "notificationMode": "notify",
    "appleText": "Your card has a fresh new look."
  }'
```

```json 201 theme={null}
{
  "object": "deployment",
  "id": "depl_Hc7Ln2Xq9Vt4Rk8Pz3Wd",
  "templateId": "tmpl_Q4vN8xT2mLr7KpZs3Wd1",
  "environment": "test",
  "targetRevision": 4,
  "status": "preparing",
  "notificationMode": "silent",
  "totals": { "total": 0, "processed": 0, "migrated": 0, "skipped": 0, "failed": 0 },
  "delivery": {
    "pending": 0,
    "failed": 0,
    "apple": { "delivered": 0, "devices": 0, "notInstalled": 0, "failed": 0 },
    "google": { "updated": 0, "notSaved": 0, "failed": 0 },
    "message": null
  },
  "plannedBackfills": 0,
  "plannedOmits": 0,
  "plannedRemovals": 0,
  "plannedIncompatibleBarcodes": 0,
  "error": null,
  "actorUserId": "cmgx4k2p90001ab12cd34ef56",
  "createdAt": "2026-10-18T10:00:00.000Z",
  "startedAt": null,
  "finishedAt": null
}
```


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