---
title: "Create a snippet"
method: PUT
path: "/snippets"
---

# Create a snippet

`PUT /snippets`

## Request

- Base URL: `https://api.streak.com/api/v1`
- URL: `https://api.streak.com/api/v1/snippets`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/streakyc/apis/streak-v1-url-encoded/docs/snippets/put.ts> (a function with typed inputs; its response is checked against the schema)

This call lets you create a [snippet](reference#snippets).

## Request body `application/x-www-form-urlencoded`

- object
  - `snippetName` string, required: Name of the snippet
  - `subject` string: The snippet's subject line
  - `snippetText` string: The snippet's text/body
  - `snippetKeyShortcut` string: A shortcut that activates the snippet
  - `pipelineKey` string: (optional) The pipeline that the snippet will be shared in.

## Response `200`

200

- object
  - `userKey` string
  - `creationDate` integer
  - `pipelineKey` string
  - `partOfPipeline` boolean
  - `snippetText` string
  - `snippetName` string
  - `snippetKeyShortcut` string
  - `snippetType` string
  - `key` string
  - `lastSavedTimestamp` integer

## Other responses

- `400`: 400

## Changes

- **2026-11-03** `467f4c2b40e3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/streakyc/apis/streak-v1-url-encoded/changes/snippets/put.md)

---

[API](https://skmtc.dev/streakyc/apis/streak-v1-url-encoded.md) - [All operations](https://skmtc.dev/streakyc/apis/streak-v1-url-encoded/llms.txt) - [OpenAPI document](https://skmtc.dev/streakyc/apis/streak-v1-url-encoded/revisions/467f4c2b40e3?raw)
