Snippets

Create a snippet

Create a new snippet. If a snippet with that name already exists, we'll return a 422 error. If the value contains Liquid, we validate it.

post/v1/snippets

Request body

namestring required

The name of the snippet, must be unique. Trimmed of leading and trailing whitespace before storage.

valuestring required

The contents of the snippet (plain text or Liquid). Trimmed of leading and trailing whitespace before storage. Max length is environment-specific (default 16000).

Example request

{
  "name": "address",
  "value": "<strong>My Company</strong></br>1234 Fake St<br/>Fake,NY<br/>10111"
}

Response

Returns the created snippet.

Example response

{
  "snippet": {
    "name": "address",
    "value": "<strong>My Company</strong></br>1234 Fake St<br/>Fake,NY<br/>10111",
    "updated_at": 1582500000
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.