Create a snippet
POST
/v1/snippets
const url = 'https://beta-api.plune.ai/v1/snippets';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"title":"Refund — checklist","text":"## Steps\n* Open the order and choose “Refund”.\n* Enter the amount and confirm.\n\n## Expected result\nThe refund is listed with the entered amount.","template":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://beta-api.plune.ai/v1/snippets \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "title": "Refund — checklist", "text": "## Steps\n* Open the order and choose “Refund”.\n* Enter the amount and confirm.\n\n## Expected result\nThe refund is listed with the entered amount.", "template": true }'A titled piece of Markdown. The title is unique within the project (409 otherwise); the text is up to 16 384 bytes. template marks it as a starting point for a new case.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
title
required
string
text
required
string
template
boolean
Example
{ "title": "Refund — checklist", "text": "## Steps\n* Open the order and choose “Refund”.\n* Enter the amount and confirm.\n\n## Expected result\nThe refund is listed with the entered amount.", "template": true}Responses
Section titled “ Responses ”Created
Media type application/json
object
id
required
string format: uuid
projectId
required
string
title
required
Unique within the project — the name in the «Insert snippet» menu.
string
text
required
Markdown, up to 16 384 bytes. Inserted into a case as a copy: editing the snippet later changes no case.
string
template
required
Listed under «Start from» on a new case when true.
boolean
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{ "id": "6f1c2b3a-0000-4000-8000-0000000000f2", "projectId": "u-shop::default", "title": "Refund — checklist", "text": "## Steps\n* Open the order and choose “Refund”.\n* Enter the amount and confirm.\n\n## Expected result\nThe refund is listed with the entered amount.", "template": true, "createdAt": "2026-09-16T09:12:04.151Z", "updatedAt": "2026-09-16T09:12:04.151Z"}Invalid body
Media type application/json
object
error
required
string
Example generated
{ "error": "example"}No / invalid token or session
A snippet of that title exists
Media type application/json
object
error
required
string
Example
{ "error": "a snippet titled 'Refund — checklist' already exists"}Rate-limited: either the per-route throttle or a tenant quota. Retry-After carries the seconds until the window rolls over.
Media type application/json
object
error
required
string
Example generated
{ "error": "example"}Headers
Section titled “Headers ” Retry-After
integer
Seconds until the window rolls over