Your curl command had extra double quotes. Please try:
curl
curl -H 'Content-Type: application/json' -X POST -d '{"categories": { "name" :1, "url_name" : "example" }}' http://localhost:4200/add
Your curl request is not formatted correctly. Try:
curl \ -H 'Content-Type: application/json' \ -X POST \ -d '{"categories": { "name" :1, "url_name": "example" }}' \ http://localhost:4200/add