---
title: "Update a snippet"
method: PUT
path: "/snippets/{id}"
tags: ["Snippets"]
---

# Update a snippet

`PUT /snippets/{id}`

Updates a specific snippet by its ID.

## Path parameters

- `id` integer, required

## Request body

- object
  - `name` string
  - `content` string
  - `description` string
  - `folder` string
  - `order` integer
  - `isNote` boolean — When true, the snippet is a note (copy/paste only, not directly executable on a host).

## Response `200`

The updated snippet.

## Other responses

- `400` — Invalid request.
- `404` — Snippet not found.
- `500` — Failed to update snippet.

---

[API](https://skmtc.dev/termix/apis/termix-api.md) · [All operations](https://skmtc.dev/termix/apis/termix-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/termix/termix-api/revisions/f4ef343eff1b/schema)
