Skip to main content
POST
/
snippets
Create snippet
curl --request POST \
  --url https://productlane.com/api/v2/snippets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "html": "<string>",
  "folder_id": "<string>"
}
'
{
  "id": "<string>",
  "title": "<string>",
  "html": "<string>",
  "folder_id": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
title
string
required
Required string length: 1 - 255
html
string
required
Minimum string length: 1
folder_id
string | null

Snippet folder id, or null for uncategorized. Fetch folders via GET /snippets/folders.

Response

Successful response

id
string
required
title
string
required
html
string
required
folder_id
string | null
required
created_at
string
required
updated_at
string
required