Snippets

Update a snippet

Changed on

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.

post/v2/snippets/{snippetKey}

Request

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

Path parameters

snippetKeystring required

Request body

snippetNamestring nullable

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

snippetTextstring nullable

New email body; an empty string clears the body.

subjectstring nullable

New email subject; an empty string clears the subject.

snippetKeyShortcutstring nullable

New insertion shortcut; an empty string removes the shortcut.

pipelineKeystring nullable

Destination pipeline. Sharing a personal snippet also requires partOfPipeline to be true.

partOfPipelineboolean nullable

False makes a shared snippet personal and requires pipelineKey to be omitted or null. True requires pipelineKey.

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