I found a solution. It looks like there might be a bug in CreateURL.
I had to manually insert the module id into the createUrl function in the post controller. However, it is suppose to do this automatically.
“Since version 1.0.3, if the controller belongs to a module, the module ID will be prefixed to the route. (If you do not want the module ID prefix, the route should start with a slash ‘/’.)”