Skip to main content

Sticky Note

A sticky note is a pre-styled label with fixed default sizing, centered text, and a colored background. It shares the same properties as a Label but uses different defaults.

Item type: sticky-note

Properties

PropertyTypeRequiredUpdatableDefaultDescription
positionobjectNoYes{ x: 0, y: 0 }Position with x and y fields.
sizeobjectNoYes{ width: 212, height: 106 }Size with width and height fields. Min 5 per dimension.
scalenumberNoYes1Scale factor. Must be > 0.
anglenumberNoYes0Rotation angle (0360).
textstringYesYesThe note text content. Can be plain text or valid HTML.
fontSizenumberNoYes15Font size in points. Must be ≥ 1.
fontFamilystringNoYesTheme defaultFont family name.
textColorstringNoYes"#000000"Text color as a CSS color string.
backgroundColorstringNoYesTheme accent (90% opacity)Background color as a CSS color string.
isAutoSizeWidthbooleanNoYesfalseAuto-size is disabled by default for sticky notes.
isAutoSizeHeightbooleanNoYesfalseAuto-size is disabled by default for sticky notes.
horizontalTextAlignmentstringNoYes"Center"Horizontal text alignment: "Left", "Center", "Right".
verticalTextAlignmentstringNoYes"Center"Vertical text alignment: "Top", "Center", "Bottom".
info

Sticky notes differ from labels primarily in their default values. Auto-sizing is disabled, text is centered, the background uses the theme accent color, and the default size is 212×106.

Create

Creates a new sticky note item in the project.

POST /api/v2/projects/{projectId}/item/{parent}/sticky-note

curl

curl -X POST "https://api.deon.cloud/api/v2/projects/{projectId}/item/inbox/sticky-note" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"text": "Remember to review",
"position": { "x": 300, "y": 150 },
"size": { "width": 212, "height": 106 },
"backgroundColor": "#FFF176"
}'

JavaScript

const response = await fetch(
`https://api.deon.cloud/api/v2/projects/${projectId}/item/inbox/sticky-note`,
{
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
text: "Remember to review",
position: { x: 300, y: 150 },
size: { width: 212, height: 106 },
backgroundColor: "#FFF176",
}),
}
);

const data = await response.json();
console.log(data.itemId);

Response

{
"itemId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
}

Update

Updates an existing sticky note. Only include the properties you want to change.

PATCH /api/v2/projects/{projectId}/item/sticky-note/{itemId}

curl

curl -X PATCH "https://api.deon.cloud/api/v2/projects/{projectId}/item/sticky-note/{itemId}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"text": "Updated note content",
"backgroundColor": "#FFCC80"
}'

JavaScript

const response = await fetch(
`https://api.deon.cloud/api/v2/projects/${projectId}/item/sticky-note/${itemId}`,
{
method: "PATCH",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
text: "Updated note content",
backgroundColor: "#FFCC80",
}),
}
);

const data = await response.json();
console.log(data.itemId);

Response

{
"itemId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
}