Request DTOs
All request DTOs used for API input validation.
CreateDocumentRequest
Used when creating a new document.
{
"title": "Document Title",
"workspaceId": "UUID (required)",
"parentId": "UUID (optional)",
"content": [],
"icon": "📄",
"coverImageUrl": "https://..."
}
| Field | Type | Required | Validation |
|---|---|---|---|
title | String | No | Max 500 characters |
workspaceId | UUID | Yes | Not null |
parentId | UUID | No | - |
content | Object | No | BlockNote JSON format |
icon | String | No | Max 50 characters |
coverImageUrl | String | No | - |
UpdateDocumentRequest
Used when updating an existing document.
{
"title": "Updated Title",
"content": [],
"icon": "📝",
"coverImageUrl": "https://...",
"isArchived": false
}
| Field | Type | Required | Validation |
|---|---|---|---|
title | String | No | Max 500 characters |
content | Object | No | BlockNote JSON format |
icon | String | No | Max 50 characters |
coverImageUrl | String | No | - |
isArchived | Boolean | No | - |
MoveDocumentRequest
Used when moving a document to a new parent.
{
"parentId": "UUID or null"
}
| Field | Type | Required | Description |
|---|---|---|---|
parentId | UUID | No | New parent ID. null = move to root |
CreateWorkspaceRequest
{
"name": "Workspace Name",
"description": "Description",
"icon": "🚀",
"color": "#FF5733"
}
| Field | Type | Required | Validation |
|---|---|---|---|
name | String | Yes | Not blank, max 255 characters |
description | String | No | Max 1000 characters |
icon | String | No | Max 50 characters |
color | String | No | Max 20 characters |
UpdateWorkspaceRequest
{
"name": "Updated Name",
"description": "Updated description",
"icon": "📋",
"color": "#28A745",
"isArchived": false
}
| Field | Type | Required | Validation |
|---|---|---|---|
name | String | No | Max 255 characters |
description | String | No | Max 1000 characters |
icon | String | No | Max 50 characters |
color | String | No | Max 20 characters |
isArchived | Boolean | No | - |
InviteMemberRequest
{
"role": "EDITOR",
"message": "Welcome to our team!"
}
| Field | Type | Required | Validation |
|---|---|---|---|
email | String | Yes | Valid email, max 255 characters |
role | WorkspaceRole | Yes | Not null |
message | String | No | Max 500 characters |
UpdateMemberRoleRequest
{
"role": "ADMIN"
}
| Field | Type | Required | Validation |
|---|---|---|---|
role | WorkspaceRole | Yes | Not null |
TransferOwnershipRequest
{
"newOwnerId": "UUID"
}
| Field | Type | Required | Validation |
|---|---|---|---|
newOwnerId | UUID | Yes | Not null |
CreateCommentThreadRequest
{
"anchor": {
"blockId": "block-123",
"startOffset": 10,
"endOffset": 25,
"selectedText": "highlighted text"
},
"comment": {
"content": "This needs revision"
}
}
| Field | Type | Required | Validation |
|---|---|---|---|
anchor | Map<String, Object> | Yes | Not null |
comment | CommentContent | Yes | Not null, valid |
comment.content | String | Yes | Not blank |
CreateCommentRequest
{
"content": "I agree with this"
}
| Field | Type | Required | Validation |
|---|---|---|---|
content | String | Yes | Not blank |
UpdateCommentRequest
{
"content": "Updated comment"
}
| Field | Type | Required | Validation |
|---|---|---|---|
content | String | Yes | Not blank |
UpdateUserPreferenceRequest
{
"lastDocumentId": "UUID",
"lastWorkspaceId": "UUID",
"theme": "dark",
"sidebarCollapsed": true,
"locale": "en",
"notificationsEnabled": true
}
| Field | Type | Required | Validation |
|---|---|---|---|
lastDocumentId | UUID | No | - |
lastWorkspaceId | UUID | No | - |
theme | String | No | Must be light, dark, or system |
sidebarCollapsed | Boolean | No | - |
locale | String | No | Max 10 characters |
notificationsEnabled | Boolean | No | - |