Currently, the POST /api/goals/:id endpoint is handling multiple pieces of functionality, due to the need to support creating new categories on the fly from the goal editor. Instead of taking in category ids as a part of the body (as would normally be expected), the category names are accepted, and if there is no corresponding category with the name for the game, one is created as part of the same database action. While efficient, this create clunky code and a harder to use API. Instead, when a new category is created on the fly within the goal editor, the control should automatically send a request to the server to create the category, and then the API should only accept category ids (ignoring or sending a 400 on invalid ones). We could potentially batch these requests until the changes to the goal are saved (so that they can be dropped later if needed), but that can be a separate enhancement if it's really needed at all.