The 405 is expected: the REST Data API endpoint for markups is read-only today, so GET works but there is no PUT/POST to write them back. Writing has to go through the classic Vault Web Service SDK (Autodesk.Connectivity.WebServices), not the REST Data API.
Markus is right that markups live as entity attributes (EntAttr) under the namespace "Autodesk.FileMarkup.V1", and the entity is the File iteration, not the master. That last part is what trips most people up: you query and write against the specific File version Id, using the File entity class.
The shape I use for reading/writing EntAttr through PropertyService:
var propSvc = mgr.PropertyService; // mgr = authenticated WebServiceManager
long[] entIds = new[] { fileIteration.Id }; // the FILE ITERATION id, NOT the master id
string[] namespaces = new[] { "Autodesk.FileMarkup.V1" };
EntAttrArray[] read = propSvc.GetEntityAttributes("FILE", entIds, namespaces); // READ; each EntAttr has .Name, .NS, .Val where .Val is your markup JSON
EntAttr attr = new EntAttr { NS = "Autodesk.FileMarkup.V1", Name = "the same Name Vault Desktop uses", Val = markupJsonString };
propSvc.UpdateEntityAttributes("FILE", entIds, new[] { attr }); // WRITE (create / update)
Two gotchas that cost me time on a project doing exactly this:
1. It has to be the file iteration Id. Pass the master Id and the write lands nowhere the desktop client will read.
2. The Name and JSON schema are undocumented and can change between releases. Read an existing markup made in Vault Desktop first, then mirror its exact Name and structure before writing your own. Do not invent the Name.
If GetEntityAttributes comes back empty for a file you know has markups, check you are hitting the iteration (not the "latest" shortcut) and that the class id string matches.
Jose Luis Baquero Rivera
Mechanical Engineer
Open to projects, feel free to contact me
josebaqueror.com
https://www.linkedin.com/in/joseluisbaquerorivera/