---
title: "Create a new snippet"
method: POST
path: "/snippets"
tags: ["Snippets"]
---

# Create a new snippet

`POST /snippets`

Creates a new snippet for the authenticated user.

## 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 `201`

Snippet created successfully.

## Other responses

- `400` — Name and content are required.
- `500` — Failed to create 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)
