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

# Create a snippet

`POST /v2/snippets`

## Request

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

Creates a personal snippet, or shares it with the specified pipeline.

## Request body

- SnippetCreateBody: A personal snippet, or a snippet shared with a pipeline.
  - `snippetName` string, required: Snippet name; must be nonblank and at most 499 characters.
  - `snippetText` string, nullable: Email body, in the format selected by snippetType.
  - `snippetType` 'HTML' | 'TEXT', nullable: Format of the email body; omitted or null uses HTML.
  - `subject` string, nullable: Optional email subject.
  - `snippetKeyShortcut` string, nullable: Optional insertion shortcut.
  - `pipelineKey` string, nullable: Pipeline to share the snippet with; omit to create a personal snippet.

## 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/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)
