Fix curl command output

There were still some optionals that needed to be unwrapped, and quotes need to be escaped when posting JSON content.