cURL command errors in Windows Terminal

If you're getting syntax errors when using cURL with Windows Terminal, ensure that you have escaped your code.

For example:

curl -X POST --data {"api_key": "79bba494ae076c9d51029fc819dc0a10","data": {"item": [{ "text": "Visitors","value": 4223},{"text": "ABC","value": 238}]}} -H "Content-Type: application/json"

Becomes:

curl -X POST --data {\"api_key\": \"79bba494ae076c9d51029fc819dc0a10\",\"data\": {\"item\": [{ \"text\": \"Visitors\",\"value\": 4223},{\"text\": \"ABC\",\"value\": 238}]}} -H "Content-Type: application/json"
Was this article helpful?

Awesome! 👍 Thanks so much for your feedback!

Sorry about that! Start a conversation now.

We're ready to help, 24 hours a day, 5 days a week

Get support
  • Fernanda Customer Success Avatar

    Megan

    USA
  • Hariharan Customer Success Avatar

    Hariharan

    India
  • Fernanda Customer Success Avatar

    Yasmin

    Spain
  • Luis Customer Success Avatar

    Luis

    UK
  • Richard Customer Success Avatar

    Richard

    UK
  • Fernanda Customer Success Avatar

    Fernanda

    Brazil
  • Heather Customer Success Avatar

    Heather

    USA