Skip to main content
Every example on this site has a cURL (Windows) tab. Use that one on Windows — the Mac/Linux tab will not run, and the way it fails is confusing enough to cost you an afternoon.
PowerShell’s curl is not cURL. It is a built-in alias for Invoke-WebRequest, a completely different command that happens to share the name. Pasting a cURL command into PowerShell does not make a bad request — it makes an error message about parameters, before anything reaches the network.

The two things that break

In a Mac or Linux shell, a trailing \ means “this command continues on the next line”. Windows Command Prompt has no such thing, so it reads each line as a separate command — and all but the first are nonsense.That is why the Windows examples are one long line. It looks worse; it works.
Mac and Linux shells treat '...' as “one piece of text, leave it alone”. Windows does not treat the single quote as a quoting character at all, so the JSON body arrives torn into fragments.On Windows the body has to be wrapped in double quotes, with every double quote inside it escaped as \".

Use Command Prompt

Press Start, type cmd, and open Command Prompt. Paste the cURL (Windows) example there, as one line.
cURL (Windows)
cURL has shipped with Windows since Windows 10 version 1803, so there is nothing to install. Check with curl --version — if it prints a version number you are ready.

If you would rather stay in PowerShell

Use PowerShell’s own command instead of fighting it. Invoke-RestMethod builds the JSON for you, so there is no quoting to get wrong:
PowerShell
The backtick ` at the end of each line is PowerShell’s line continuation — its equivalent of the \ you see in the Mac examples.
Calling curl.exe explicitly does not fix it. It is a reasonable thing to try — curl.exe really is cURL — but Windows PowerShell rewrites the argument before the program sees it, and the JSON body arrives truncated. The request goes out and comes back as a 400, which reads like your data was wrong when it was the shell. Command Prompt or Invoke-RestMethod; not curl.exe in PowerShell.

What each one looks like when it goes wrong

Putting it in a .bat file

If you save a command into a .bat file rather than typing it, one more rule applies: a percent sign in your message text has to be doubled. 50% off becomes 50%% off. At the Command Prompt itself you can type it once.
None of this applies once you are calling the API from code. The Node.js and Python examples are identical on every operating system — it is only the shell that differs. If you are building an integration rather than testing one, go straight to those.