Ah, interesting. I am no expert in that part, but I would guess that the api lets you do the category change but then you are responsible in your code for then doing the resorting. Perhaps someone who knows the api can chime in here.
Courses and course formats
How to move thousands of courses to another category?
This discussion has been locked so you can no longer reply to it.