Skip to main content
POST
用一次提交写完一张卡

路径参数

noteid
string
必填

卡片的 noteid。取自卡片命令响应的 noteid、POST /notes/batch-get 响应里 items[].noteid,或 GET /ui-state 的 state.focusnoteid。

请求体

application/json

一次提交里对同一张卡做的多步写入。MarginNote 先按顺序模拟整批操作,任何一步不通过,整串都不 写入;写入之后重新读取核对,不一致就把改动过的卡整体恢复。一批最多 32 步,撤销栈上 只占一步。

ops
object[]
必填

按顺序执行的步骤。deleteComment 必须排在 removeHashtags 之前,否则返回 422 INVALID_ORDER。

Maximum array length: 32
confirm
boolean
必填

必填。由 MarginNote 自动补上,页面不传也生效。

syncReview
boolean

写完之后按摘录时的自动入组规则把该卡补进复习卡组,与本次写入同一步撤销。

响应

提交响应。可能还有未列出的字段。

noteid
string
comments
object[]
applied
integer

实际执行的步数。

hashtags
string[]
title
string

写入之后的卡片标题。

persisted
boolean
addonValues
object
bridgeApiVersion
string
review
object

⚠️带 syncReview 时返回的入组结果。