Snippets

Create a snippet

Changed on

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

post/v2/snippets

Request

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

Request body

snippetNamestring required

Snippet name; must be nonblank and at most 499 characters.

snippetTextstring nullable

Email body, in the format selected by snippetType.

snippetType'HTML' | 'TEXT' nullable

Format of the email body; omitted or null uses HTML.

subjectstring nullable

Optional email subject.

snippetKeyShortcutstring nullable

Optional insertion shortcut.

pipelineKeystring nullable

Pipeline to share the snippet with; omit to create a personal snippet.

Response

OK

keystring required

Key of the snippet.

snippetNamestring nullable

Name of the snippet.

snippetTextstring nullable

Email body, interpreted according to snippetType.

snippetType'HTML' | 'TEXT' required
subjectstring nullable

Optional email subject.

snippetKeyShortcutstring nullable

Shortcut typed to insert the snippet.

userKeystring nullable

User who owns the snippet; updates set this to the editor.

pipelineKeystring nullable

Pipeline the snippet is shared with; omitted for personal snippets.

partOfPipelineboolean nullable

Whether the snippet is shared with a pipeline.

creationDateinteger nullable

When the snippet was created, in epoch milliseconds.

lastSavedTimestampinteger required

When the snippet was last saved, in epoch milliseconds; zero for older records without a timestamp.

Example response

{
  "creationDate": 1646870400000,
  "lastSavedTimestamp": 1646870400000
}

Changes