# cURL command generator.

- Canonical URL: https://www.broadnet.me/tools/curl-generator
- Language: en
- Last updated: 2026-10-21
- Publisher: BroadNet (https://www.broadnet.me)
- Markdown version of the page above, generated from the rendered page.

Free developer tool · runs in your browser

Assemble a ready-to-run cURL command for any HTTP API request. Pick a method, URL, headers, a JSON body and a Bearer token, then copy the result. Nothing you type leaves your browser.

Presets

Headers

Generated command

```
curl -X POST 'https://api.broadnet.me/sms/sendSms' \
  -H "Authorization: Bearer $BROADNET_TOKEN" \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  --data '{
  "senderId": "BroadNet",
  "destinationNumber": "447700900123",
  "message": "Your verification code is 482913",
  "messageType": "TEXT"
}'
```

Arguments are single-quoted and safely escaped for bash and zsh. Treat any command containing a real token as a secret.

The short answer

## How do I build a cURL request with auth and a JSON body?

Set the method with -X, pass the URL, add each header with -H, put the token in an Authorization: Bearer header, and send the payload with --data alongside a Content-Type: application/json header. This generator does all of that and escapes the quoting for you.

Anatomy of the command

- -X POST · · · the HTTP method
- 'https://…' · · · the request URL
- -H 'Authorization: Bearer TOKEN' · · · auth
- -H 'Content-Type: application/json' · · · body type
- --data '{ … }' · · · the JSON payload

### Sending a message with the API

The messaging preset builds a POST /sms/sendSms request with a Bearer token and a JSON body carrying senderId, destinationNumber, message and messageType. See the [send-a-message API reference](https://www.broadnet.me/developers/api).

## Frequently asked questions

**How do I add a Bearer token to a cURL request?**

Send an Authorization header with the value 'Bearer' followed by a space and your token: -H 'Authorization: Bearer YOUR_TOKEN'. This generator adds that header automatically when you enter a token, so you can copy a complete authenticated request.

**How do I send a JSON body with cURL?**

Use --data with the JSON payload and set a Content-Type: application/json header so the server parses it correctly. The generator adds the Content-Type header for you whenever a body is present on a POST, PUT or PATCH request.

**What does the -X flag do in cURL?**

-X (or --request) sets the HTTP method — GET, POST, PUT, PATCH or DELETE. cURL defaults to GET, or to POST when a body is supplied, so an explicit -X makes the intended method unambiguous in the copied command.

**Is my token or payload sent anywhere by this tool?**

No. The command is assembled entirely in your browser with JavaScript. Nothing you type — URL, headers, body or token — is transmitted to BroadNet or any server. Still, treat any command containing a real token as a secret and avoid pasting it into shared logs.

**How do I run the generated command?**

Copy the command and paste it into a terminal on macOS, Linux or Windows with cURL installed. The command uses single-quoted arguments and line continuations, which work in bash and zsh; on Windows, run it in WSL, Git Bash or adapt the quoting for PowerShell.

[Developer hub Quickstart, TypeScript SDK, references and tools.](https://www.broadnet.me/developers) [SMS API REST + SMPP 3.4, Bearer-token auth, delivery webhooks.](https://www.broadnet.me/products/sms-api) [OTP One-time passcodes over SMS and voice.](https://www.broadnet.me/products/otp) [All tools Every free BroadNet developer utility.](https://www.broadnet.me/tools)

## Ready to make your first API call?

BroadNet ships a Bearer-token REST API, direct SMPP 3.4 binds, delivery webhooks and an official TypeScript SDK. Grab a token and send your first message.

[Developer hub](https://www.broadnet.me/developers) [Contact sales](https://www.broadnet.me/contact)
