You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 4, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+117-1Lines changed: 117 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3058,7 +3058,7 @@ corresponding to when the API was available for use.
3058
3058
3059
3059
#### `updateNoteFields`
3060
3060
3061
-
* Modify the fields of an exist note. You can also include audio, video, or picture files which will be added to the note with an
3061
+
* Modify the fields of an existing note. You can also include audio, video, or picture files which will be added to the note with an
3062
3062
optional `audio`, `video`, or `picture` property. Please see the documentation for `addNote` for an explanation of objects in the `audio`, `video`, or `picture` array.
3063
3063
3064
3064
> **Warning**:
@@ -3105,6 +3105,122 @@ corresponding to when the API was available for use.
3105
3105
```
3106
3106
</details>
3107
3107
3108
+
#### `updateNote`
3109
+
3110
+
* Modify the fields and/or tags of an existing note.
3111
+
In other words, combines `updateNoteFields` and `updateNoteTags`.
3112
+
Please see their documentation for an explanation of all properties.
3113
+
3114
+
Either `fields` or `tags` property can be omitted without affecting the other.
3115
+
Thus valid requests to `updateNoteFields` also work with `updateNote`.
3116
+
The note must have the `fields` property in order to update the optional audio, video, or picture objects.
3117
+
3118
+
If neither `fields` nor `tags` are provided, the method will fail.
3119
+
Fields are updated first and are not rolled back if updating tags fails.
3120
+
Tags are not updated if updating fields fails.
3121
+
3122
+
> **Warning**
3123
+
> You must not be viewing the note that you are updating on your Anki browser, otherwise
3124
+
> the fields will not update. See [this issue](https://github.com/FooSoft/anki-connect/issues/82)
3125
+
> for further details.
3126
+
3127
+
<details>
3128
+
<summary><i>Sample request:</i></summary>
3129
+
3130
+
```json
3131
+
{
3132
+
"action": "updateNote",
3133
+
"version": 6,
3134
+
"params": {
3135
+
"note": {
3136
+
"id": 1514547547030,
3137
+
"fields": {
3138
+
"Front": "new front content",
3139
+
"Back": "new back content"
3140
+
},
3141
+
"tags": ["new", "tags"]
3142
+
}
3143
+
}
3144
+
}
3145
+
```
3146
+
3147
+
</details>
3148
+
3149
+
<details>
3150
+
<summary><i>Sample result:</i></summary>
3151
+
3152
+
```json
3153
+
{
3154
+
"result": null,
3155
+
"error": null
3156
+
}
3157
+
```
3158
+
3159
+
</details>
3160
+
3161
+
#### `updateNoteTags`
3162
+
3163
+
* Set a note's tags by note ID. Old tags will be removed.
0 commit comments