Get started

Quickstart: send your first SMS by API

This guide takes you from no account to a delivered message and a signed delivery event. It needs a terminal and five minutes.

1. Create an account and top up

Open Get API key. Your browser makes an account key that starts with acct_; copy it or save it as a file, then confirm. That key is your login to the console. Add funds on the Billing page: the hosted checkout opens in the console, and the balance shows at the top of every console page.

2. Create an API key

On the API keys page, name a key (for example production or staging) and create it. The key starts with bsa_live_ and is shown once: copy it into your secret store or an environment variable.

export BULKSMSAPI_KEY="bsa_live_..."

3. Send a message

Send a text to your own phone. Numbers are written in international format with the plus sign.

curl https://bulksmsapi.cc/v1/messages \
  -H "Authorization: Bearer $BULKSMSAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+14155550123",
    "text": "Your Northwind code is 482913. It expires in 10 minutes.",
    "reference": "login-7781"
  }'

The answer is 202 Accepted with a message id, the price and the status queued. Within seconds the status moves to sent and then delivered.

4. Read the status

curl https://bulksmsapi.cc/v1/messages/msg_8F3K2Q9TZ1MX \
  -H "Authorization: Bearer $BULKSMSAPI_KEY"

5. Send a batch

A batch sends one text to up to 10,000 numbers. Duplicates and numbers that cannot be read are listed in set_aside and not charged.

curl https://bulksmsapi.cc/v1/batches \
  -H "Authorization: Bearer $BULKSMSAPI_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: spring-sale-0412" \
  -d '{
    "name": "Spring sale",
    "text": "Spring sale at Northwind: 20% off until Sunday. Opt out: northwind.example/sms",
    "to": [
      "+14155550123",
      "+447400123456",
      "+4915123456789"
    ]
  }'

6. Receive delivery events

On the Webhooks page, add an HTTPS endpoint. Each delivered or failed message calls it with a signed JSON event; check the signature with the code on the Webhooks page and answer with any 2xx status.

Next: read Batches for personal text per number and scheduling, and Errors for every error code and what it means for your balance.

Quickstart: send your first SMS by API | BulkSMSAPI Docs