---
title: "Update a snippet"
method: POST
path: "/v2/snippets/{snippetKey}"
tags: ["Snippets"]
---

# Update a snippet

`POST /v2/snippets/{snippetKey}`

## Request

- Base URL: `https://api.streak.com/api`
- URL: `https://api.streak.com/api/v2/snippets/{snippetKey}`
- Auth: HTTP bearer

Updates the supplied fields, leaving omitted or null fields unchanged. The body format stays unchanged. Changing sharing can change the snippet key; use the key in the response.

## Path parameters

- `snippetKey` string, required

## Request body

- SnippetUpdateBody: Changes to a snippet. Omitted or null fields keep their current values.
  - `snippetName` string, nullable: New name; must be nonblank and at most 499 characters.
  - `snippetText` string, nullable: New email body; an empty string clears the body.
  - `subject` string, nullable: New email subject; an empty string clears the subject.
  - `snippetKeyShortcut` string, nullable: New insertion shortcut; an empty string removes the shortcut.
  - `pipelineKey` string, nullable: Destination pipeline. Sharing a personal snippet also requires partOfPipeline to be true.
  - `partOfPipeline` boolean, nullable: False makes a shared snippet personal and requires pipelineKey to be omitted or null. True requires pipelineKey.

## Response `200`

OK

- Snippet: A reusable email template, personal or shared with a pipeline.
  - `key` string, required: Key of the snippet.
  - `snippetName` string, nullable: Name of the snippet.
  - `snippetText` string, nullable: Email body, interpreted according to snippetType.
  - `snippetType` 'HTML' | 'TEXT', required
  - `subject` string, nullable: Optional email subject.
  - `snippetKeyShortcut` string, nullable: Shortcut typed to insert the snippet.
  - `userKey` string, nullable: User who owns the snippet; updates set this to the editor.
  - `pipelineKey` string, nullable: Pipeline the snippet is shared with; omitted for personal snippets.
  - `partOfPipeline` boolean, nullable: Whether the snippet is shared with a pipeline.
  - `creationDate` integer, nullable: When the snippet was created, in epoch milliseconds.
  - `lastSavedTimestamp` integer, required: When the snippet was last saved, in epoch milliseconds; zero for older records without a timestamp.

## Changes

- **2026-10-24** `0029d62629f5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/streakyc/apis/streak/changes/v2/snippets/:snippetKey/post.md)

---

[API](https://skmtc.dev/streakyc/apis/streak.md) - [All operations](https://skmtc.dev/streakyc/apis/streak/llms.txt) - [OpenAPI document](https://skmtc.dev/streakyc/apis/streak/revisions/3648671fd1cf?raw)
