I followed the documentation at https://addons-server.readthedocs.io/en/latest/topics/api/signing.html#upload-version and tried to post an update to my extension via curl:
curl "https://addons.mozilla.org/api/v5/addons/2913c416-cda7-4b3d-aef0-f71995b8a05f/versions/0.1.2/" -g -XPUT --form "upload=@obj/PinyinWeb.xpi" -H "Authorization: JWT $Auth"
and I get
{"error":"Duplicate add-on ID found."}
Searching the Web for this message brings up discussions where developers accidentally tried to create a new extension instead of update an existing one, but I was unable to find anything about this happening from the API (it was always to do with the Web front-end).
Is the documentation correct? Have I misunderstood it? What exactly do I need to change so that my curl command uploads a new version of an existing add-on? Thanks.