Skip to main content

Response DTOs

All response DTOs returned by the API.


ApiResponse<T>

All API responses are wrapped in a standard envelope:

// Success
{
"success": true,
"data": { ... },
"message": "Optional message"
}

// Error
{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"details": { ... }
}
}
FieldTypeDescription
successbooleanWhether the request succeeded
dataTResponse payload (null on error)
messageStringOptional success message
errorErrorDetailsError information (null on success)

DocumentResponse

Full document with all metadata.

FieldTypeDescription
idUUIDDocument ID
titleStringDocument title
contentStringBlockNote JSON content
excerptStringAuto-generated excerpt
parentIdUUIDParent document ID (null = root)
workspaceIdUUIDWorkspace ID
ownerIdUUIDOwner user ID
iconStringDocument icon/emoji
coverImageUrlStringCover image URL
isTemplateBooleanTemplate flag
isArchivedBooleanArchived flag
wordCountIntegerWord count
hasChildrenBooleanHas child documents
childCountIntegerNumber of children
openCommentCountLongNumber of open comment threads
createdByUUIDCreator user ID
lastEditedByUUIDLast editor user ID
createdByUserUserInfoResponseCreator info
lastEditedByUserUserInfoResponseLast editor info
isPublishedBooleanPublished status
createdAtInstantCreation timestamp
updatedAtInstantLast update timestamp

DocumentListResponse

Lightweight document for list views.

FieldTypeDescription
idUUIDDocument ID
titleStringTitle
parentIdUUIDParent ID
workspaceIdUUIDWorkspace ID
iconStringIcon
hasChildrenBooleanHas children
childCountIntegerChild count
updatedAtInstantLast updated

DocumentTreeResponse

Document node with nested children for tree rendering.

FieldTypeDescription
idUUIDDocument ID
titleStringTitle
parentIdUUIDParent ID
workspaceIdUUIDWorkspace ID
iconStringIcon
updatedAtInstantLast updated
childrenList<DocumentTreeResponse>Nested children

DocumentBreadcrumb

Ancestor item for breadcrumb navigation.

FieldTypeDescription
idUUIDDocument ID
titleStringTitle

SearchResultResponse

Search result with highlighted snippet.

FieldTypeDescription
idUUIDDocument ID
titleStringTitle
iconStringIcon
parentIdUUIDParent ID
snippetStringHighlighted text snippet
matchFieldStringField that matched (title/content)

WorkspaceResponse

FieldTypeDescription
idUUIDWorkspace ID
nameStringName
descriptionStringDescription
iconStringIcon
colorStringTheme color
ownerIdUUIDOwner ID
isDefaultBooleanDefault workspace flag
isArchivedBooleanArchived flag
documentCountLongNumber of documents
createdAtInstantCreated timestamp
updatedAtInstantUpdated timestamp

UserResponse

FieldTypeDescription
idUUIDUser ID
emailStringEmail
nameStringDisplay name
avatarUrlStringAvatar URL
statusStringAccount status
lastLoginAtInstantLast login
createdAtInstantCreated timestamp
preferenceUserPreferenceResponsePreferences (nested)

UserPreferenceResponse

FieldTypeDescription
lastDocumentIdUUIDLast viewed document
lastWorkspaceIdUUIDLast viewed workspace
themeStringlight / dark / system
sidebarCollapsedBooleanSidebar state
localeStringLanguage locale
notificationsEnabledBooleanNotifications enabled

UserInfoResponse

Lightweight user info (used in nested responses).

FieldTypeDescription
idUUIDUser ID
nameStringDisplay name
avatarUrlStringAvatar URL

WorkspaceMemberResponse

FieldTypeDescription
idUUIDMember record ID
userIdUUIDUser ID
userNameStringUser name
userEmailStringUser email
userAvatarStringUser avatar
roleWorkspaceRoleMember role
statusMemberStatusMember status
invitedByUserSummaryInviter info
invitedAtInstantInvitation time
acceptedAtInstantAcceptance time
createdAtInstantCreated time

MemberSearchResponse

FieldTypeDescription
userIdUUIDUser ID
nameStringName
emailStringEmail
avatarStringAvatar URL
roleWorkspaceRoleRole

CommentThreadResponse

FieldTypeDescription
idUUIDThread ID
documentIdUUIDDocument ID
workspaceIdUUIDWorkspace ID
anchorObjectPosition anchor (blockId, offsets)
statusStringopen / resolved
resolvedAtInstantResolution time
resolvedByUUIDResolver user ID
commentsList<CommentResponse>Comments in thread
createdAtInstantCreated time
updatedAtInstantUpdated time

CommentResponse

FieldTypeDescription
idUUIDComment ID
threadIdUUIDThread ID
userIdUUIDAuthor user ID
userNameStringAuthor name
userAvatarStringAuthor avatar
contentStringComment text
isEditedBooleanWas edited
createdAtInstantCreated time
updatedAtInstantUpdated time

NotificationResponse

FieldTypeDescription
idUUIDNotification ID
typeNotificationTypeType
statusNotificationStatusStatus
titleStringTitle
messageStringMessage
actionablebooleanRequires user action
actorActorInfoActor details
workspaceWorkspaceInfoWorkspace details
documentDocumentInfoDocument details
referencesReferenceIdsRelated entity IDs
metadataObjectAdditional data
createdAtInstantCreated time
readAtInstantRead time
expiresAtInstantExpiration time

AttachmentResponse

FieldTypeDescription
idUUIDAttachment ID
documentIdUUIDDocument ID
fileNameStringOriginal file name
fileSizeLongFile size in bytes
mimeTypeStringMIME type
urlStringAccess URL
widthIntegerImage width (if applicable)
heightIntegerImage height (if applicable)
createdAtInstantUpload time

WorkspaceInvitationResponse

FieldTypeDescription
idUUIDInvitation ID
emailStringInvitee email
roleWorkspaceRoleAssigned role
statusInvitationStatusStatus
messageStringCustom message
tokenStringAcceptance token
invitedByUserSummaryInviter info
invitedAtInstantInvitation time
expiresAtInstantExpiration time
workspaceWorkspaceSummaryWorkspace info

InvitationResultResponse

Returned after creating/resending an invitation.

FieldTypeDescription
invitationIdUUIDInvitation ID
emailStringInvitee email
roleWorkspaceRoleAssigned role
expiresAtInstantExpiration time
inviteLinkStringAcceptance URL

TransferOwnershipResponse

FieldTypeDescription
workspaceIdUUIDWorkspace ID
previousOwnerIdUUIDPrevious owner
newOwnerIdUUIDNew owner
transferredAtInstantTransfer time

PublicDocumentResponse

Public-facing document (excludes sensitive fields).

FieldTypeDescription
idUUIDDocument ID
titleStringTitle
contentStringBlockNote content
iconStringIcon
coverImageUrlStringCover image
parentIdUUIDParent ID
hasChildrenBooleanHas children
childCountIntegerChild count
wordCountIntegerWord count
updatedAtInstantLast updated

PublicDocumentListResponse

FieldTypeDescription
idUUIDDocument ID
titleStringTitle
iconStringIcon
parentIdUUIDParent ID
hasChildrenBooleanHas children
childCountIntegerChild count

DocumentPermissionResponse

Internal API response for permission checks.

FieldTypeDescription
canEditbooleanHas edit permission
roleStringUser's workspace role
workspaceIdUUIDWorkspace ID