API: Updating tags

When I create a note using the API (POST to /notes/) and supply one or more tag names, the note is created, the tags are created, and the tags are linked to the notes.

When I update a note using the API (PUT to /notes/:id) and supply one or more tag names, the note’s property tags is updated to the new contents, but no tags are created and linked. In other words, the note property tag no longer corresponds to the actual tags.

Is this a bug?

Setting tags I think is only supported when POSTing, because that’s what was needed for the clipper. PUT probably ignores this property.

However, you might be able to do what you want using the /tags endpoint: https://joplin.cozic.net/api/#tags

Okay, so updating tags is not possible via update note. Understandable.

It seems that the note’s tag property reflects the initial tags used when the note was created, and does not reflect the actual tags.
Does it make sense? Otherwise it may be better to drop this property altogether.

It should show the actual tags normally, do you have an example where it doesn’t?

The attached script should reproduce it.

issue reproducing script

I should have mentioned that the tags property is also not supported in GET calls. I guess this property shouldn’t have been documented since it’s mostly just to support the web clipper.

In fact I’ve just removed it from the doc. For anything with tags, it’s better to use the /tags end point as it’s more flexible and better maps to the data model, and if something cannot be done we can fix it there.

I agree removing the tags as a property is the best solution.

I do hope that specifying initial tags in a create note action will keep working.


Yes that will most likely always be there.