---
title: "Update Template"
method: PATCH
path: "/worker-templates/{template_id}"
tags: ["worker-templates"]
---

# Update Template

`PATCH /worker-templates/{template_id}`

## Path parameters

- `template_id` string, required

## Request body

- UpdateWorkerTemplateRequest — Partial patch. Only the fields passed are written. Editing a template changes what **future** workers are seeded with. Workers already deployed from it keep the config they were created with — the template is copied at origination, never re-read. ``custom_instruction`` carries all three intents: omitted leaves it alone, a string overwrites it, and an empty string clears it. Attachments are changed by naming them: ``add_trigger_rule_ids`` points more rules at this template, ``remove_trigger_rule_ids`` clears the pointer on rules that have it. Rules you don't name are untouched, so a field-only patch can never disturb them and a caller never has to send the current set back to preserve it.
  - `name` string, nullable — Omit (null) to leave unchanged.
  - `mode` 'incident' | 'alerts' — The kind of channel the agent lives in — its standing mission. Drives the swappable mode block in the system prompt (and, later, the toolset). ``incident`` and ``alerts`` have mode blocks today; ``escalation`` and others land as localized drop-ins (their standing block + tooling) when that work begins.
  - `custom_instruction` string, nullable — Omit (null) to leave unchanged, pass a string to overwrite, or pass an empty string to clear it.
  - `add_trigger_rule_ids` string[] — Live rules to point at this template. Valid on its own.
  - `remove_trigger_rule_ids` string[] — Rules to stop pointing at this template. Valid on its own.

## Response `200`

Successful Response

- WorkerTemplateResponse
  - `id` string, required
  - `organization_id` string, required
  - `name` string, required
  - `mode` 'incident' | 'alerts', required — The kind of channel the agent lives in — its standing mission. Drives the swappable mode block in the system prompt (and, later, the toolset). ``incident`` and ``alerts`` have mode blocks today; ``escalation`` and others land as localized drop-ins (their standing block + tooling) when that work begins.
  - `custom_instruction` string, nullable, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/traversal/apis/fastapi.md) · [All operations](https://skmtc.net/traversal/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/traversal/fastapi/revisions/2134ebffd1ef/schema)
