Skip to main content

Project Item API

The Project Item API allows you to create, read, update, and delete items within a project. Items are visual elements placed on a project map such as labels, shapes, images, documents, and more.

Base URL

All endpoints use the following base path:

/api/v2/projects/{projectId}/item

Authentication

All requests require a valid API token. You can generate an API token at https://account.deon.cloud/account/api-tokens. Include it as a Bearer token in the Authorization header:

Authorization: Bearer <your-api-token>

Finding Your IDs

Project ID and Item ID

The easiest way to find your projectId and itemId is directly in the DEON Desktop App. Click on any item on the canvas to select it — a context menu appears. Open the ... menu (more options) in that context menu. From there, select any GET action (e.g. GET Text) to copy the full API URL for reading a property, or select PATCH to copy the URL for updating the item. Both URLs contain the projectId and itemId:

https://api.deon.cloud/api/v2/projects/{projectId}/item/{itemId}/text
https://api.deon.cloud/api/v2/projects/{projectId}/item/{itemType}/{itemId}
Context menu with GET and PATCH options

Project Coordinates

To get an arbitrary coordinate on the canvas, right-click anywhere on the canvas to open the Quick Menu and click Copy project-coordinate. The coordinate is copied to your clipboard as JSON:

{"x": 17003.816, "y": -1282.033}
Copy project-coordinate button in the Quick Menu

Common Endpoints

MethodPathDescription
POST/{parent}/{itemType}Create a new item
POST/{parent}/{itemType}/fileCreate a new item with a file upload
GET/{itemId}Get an item by ID
GET/{itemId}/{property}Get a specific property value from an item
PATCH/{itemType}/{itemId}Update an existing item
DELETE/{itemId}Delete an item

Path Parameters

ParameterTypeDescription
projectIdstring (GUID)The ID of the project.
parentstringThe parent container for the item. Accepted values: inbox, panel, or a custom parent item ID.
itemTypestringThe type of item. See Item Types below.
itemIdstring (GUID)The ID of the item.

Item Types

The following item types are supported:

Item TypeDescription
labelText label with customizable font, color, and alignment.
sticky-noteA preset label styled as a sticky note.
shapeGeometric shape with fill and stroke options.
connectorLine connector between items or points with customizable style and decorators.
webEmbedded web page via URL.
imageRaster image (JPEG, PNG, GIF, WebP). Requires file upload.
documentDocument file (PDF, Word, PowerPoint, etc.). Requires file upload.
svgVector image (SVG). Requires file upload.

Common Properties (Base)

All item types share the following base properties:

PropertyTypeRequiredDefaultDescription
positionobjectNo{ x: 0, y: 0 }Position on the map. Object with x and y number fields.
sizeobjectVariesVariesSize of the item. Object with width and height number fields. Minimum value: 5 per dimension.
scalenumberNo1Scale factor. Must be greater than 0.
anglenumberNo0Rotation angle in degrees. Must be between 0 and 360.

Response Format

All create, update, and delete operations return an ItemResponseDto:

{
"itemId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Get Individual Property

You can retrieve a specific property value from an item without fetching the entire item DTO. This is useful when you only need to check or display a single property value.

GET /api/v2/projects/{projectId}/item/{itemId}/{property}

Parameters

ParameterTypeDescription
projectIdstring (GUID)The ID of the project.
itemIdstring (GUID)The ID of the item.
propertystringThe name of the property to retrieve (case-insensitive).

Property Names

Property names are case-insensitive and can be specified in any casing (e.g., text, Text, or TEXT all work). Common properties available for all items include:

  • position - Returns an object with x and y fields
  • size - Returns an object with width and height fields
  • scale - Returns a number
  • angle - Returns a number

Each item type also exposes its specific properties. For example:

  • Label: text, fontSize, fontFamily, textColor, backgroundColor, horizontalTextAlignment, verticalTextAlignment
  • Shape: shapeType, fillColor, strokeColor, strokeWidth
  • Connector: type, strokeColor, strokeThickness, cornerPoints, radius, startPoint, endPoint
  • Image: fileName, mimeType, fileSize

Refer to each item type's documentation for the complete list of available properties.

Examples

Get a label's text:

curl -X GET "https://api.deon.cloud/api/v2/projects/{projectId}/item/{itemId}/text" \
-H "Authorization: Bearer <token>" \
-H "Accept: application/json"

Response:

"Hello World"

Get an item's angle:

curl -X GET "https://api.deon.cloud/api/v2/projects/{projectId}/item/{itemId}/angle" \
-H "Authorization: Bearer <token>" \
-H "Accept: application/json"

Response:

45

Get an item's size (complex object):

curl -X GET "https://api.deon.cloud/api/v2/projects/{projectId}/item/{itemId}/size" \
-H "Authorization: Bearer <token>" \
-H "Accept: application/json"

Response:

{
"width": 300,
"height": 150
}

JavaScript example:

// Get a specific property value
const response = await fetch(
`https://api.deon.cloud/api/v2/projects/${projectId}/item/${itemId}/text`,
{
method: "GET",
headers: {
Authorization: `Bearer ${token}`,
Accept: "application/json",
},
}
);

const textValue = await response.json();
console.log(textValue); // "Hello World"

Error Responses

HTTP StatusDescription
400Property name is invalid or not available for this item type.
404Project or item not found.
403User does not have access to the project.

JSON Response Casing

By default, JSON responses use PascalCase property names (matching the server-side DTO definitions). You can override the casing of JSON property names by appending the jsonCasing query parameter to any request that returns JSON.

GET /api/v2/projects/{projectId}/item/{itemId}?jsonCasing=camel

Supported Values

ValueExample OutputDescription
default"ItemId"PascalCase — original DTO property names (server default).
camel"itemId"camelCase
pascal"ItemId"PascalCase (same as default)
snake"item_id"snake_case
kebab"item-id"kebab-case

The parameter is case-insensitive, so jsonCasing=Camel, jsonCasing=CAMEL, and jsonCasing=camel are all equivalent.

note

This only affects JSON responses (Accept: application/json). Other response formats such as MessagePack are not affected by this parameter.

Example

Request:

GET /api/v2/projects/abcd1234-.../item/efgh5678-...?jsonCasing=snake HTTP/1.1 Accept: application/json Authorization: Bearer <your-api-token>

Response:

{
"item_id": "efgh5678-...",
"position": { "x": 100, "y": 200 },
"size": { "width": 300, "height": 150 },
"scale": 1,
"angle": 0
}

Error Handling

HTTP StatusReasonDescription
400Malformed RequestValidation failed or invalid item type.
404Entity Not FoundProject or item not found.
403ForbiddenUser does not have access to the project.