# SMSBlast Developers

Canonical page: https://smsblast.io/developers

SMSBlast (https://smsblast.io) offers a self-serve REST API to send SMS and MMS, test your key, and opt contacts out, plus listening webhooks and native plugins for WordPress and Podio. Full request and response schemas: https://smsblast.io/openapi.json (OpenAPI 3.1).

## Ways to integrate

- REST API: send SMS and MMS, test your key, and opt contacts out over HTTPS with your organization API key.
- Webhooks: push events into your CRM, Zapier, n8n, Make, or any HTTPS endpoint you control.
- WordPress plugin: native integration for WordPress sites.
- Podio plugin: native integration for Podio workspaces.

## Self-serve API access

Create a free account at https://app.smsblast.io/signup, then get or rotate your API key in the app under Settings → Integrations (APIs). No contracts and no monthly fees for messaging. Keep the key secret: anyone with it can send messages billed to your account; rotating it immediately invalidates the old one.

## Authentication

Base URL: https://app.smsblast.io. Every request is authenticated with your organization API key in the Authorization header; requests without it get HTTP 401.

Headers:

- `Authorization: Bearer YOUR_API_KEY`
- `Content-Type: application/json` (POST requests)

## Send an SMS: POST /api/v2/sms/send

Send a text (or an MMS with an image) from a verified number you own to one recipient or up to 100 at once. Recipients who have opted out are skipped automatically.

Request body:

- `to`: phone number (string) or array of phone numbers (max 100), E.164 format.
- `from`: required. Your verified phone number to send from (E.164 format, e.g. +18005551234).
- `message`: SMS message content (string). Supports {{firstName}} and other placeholders, filled in per recipient from their contact.
- `name`: (optional) contact name. Only applied when sending to a single recipient; sets and overwrites that contact's first and last name.
- `mediaUrl`: (optional) public https image URL to send as an MMS, attached to every recipient and billed at the MMS rate. Carriers accept jpg, png, gif, or webp up to 5MB.

Personalize with placeholders: add {{firstName}}, {{lastName}}, {{email}}, {{address}}, {{city}}, {{state}}, or {{zip}} to your message and each recipient gets their own version, filled from their contact record. Your own custom fields work too, for example {{acreage}}. Empty fields render blank. This works the same way as campaigns and quick blast.

Opt-out text is added automatically: for compliance, every message sent through the API automatically includes "Reply STOP to unsubscribe" (it is skipped only when your text already has opt-out wording or is a one-time passcode). If you have a special use case where this should not be added, such as in-app notifications or transactional alerts, open a support ticket describing your use case and our team can review it for your account.

cURL:

```bash
curl -X POST https://app.smsblast.io/api/v2/sms/send -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"to":"+15551234567","from":"+18005551234","message":"Hello from SMSBlast API!","name":"Jane Doe"}'
```

Node.js:

```js
const axios = require('axios');

axios.post('https://app.smsblast.io/api/v2/sms/send', {
  to: '+15551234567',
  from: '+18005551234',
  message: 'Hello from SMSBlast API!',
  name: 'Jane Doe'
}, {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
})
.then(response => console.log(response.data))
.catch(error => console.error(error));
```

PHP:

```php
<?php
$apiKey = 'YOUR_API_KEY';
$url = 'https://app.smsblast.io/api/v2/sms/send';

$data = [
    'to' => '+15551234567',
    'from' => '+18005551234',
    'message' => 'Hello from SMSBlast API!',
    'name' => 'Jane Doe'
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer ' . $apiKey,
    'Content-Type: application/json'
]);

$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

$result = json_decode($response, true);
print_r($result);
```

Response:

```json
{
  "success": true,
  "sent": 1,
  "failed": 0,
  "totalCost": "0.0150",
  "results": [
    {
      "to": "+15551234567",
      "status": "sent",
      "messageSid": "SM...",
      "segments": 1,
      "cost": 0.015
    }
  ]
}
```

`errors` is included only when some recipients could not be sent (for example opted out), each with a `to` and an `error` reason.

Error responses: `401` missing or invalid API key; `400` missing "from" field, phone number not found or not verified, or invalid request body; `402` insufficient balance.

## Opt out a contact: POST /api/v2/contacts/opt-out

Stop a contact from receiving further messages. Matched by phone number within your account. Idempotent.

Request body:

- `number`: required. The contact's phone number (E.164, e.g. +15551234567).

cURL:

```bash
curl -X POST https://app.smsblast.io/api/v2/contacts/opt-out -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"number":"+15551234567"}'
```

Node.js:

```js
const axios = require('axios');

axios.post('https://app.smsblast.io/api/v2/contacts/opt-out', {
  number: '+15551234567'
}, {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
})
.then(response => console.log(response.data))
.catch(error => console.error(error));
```

PHP:

```php
<?php
$apiKey = 'YOUR_API_KEY';
$ch = curl_init('https://app.smsblast.io/api/v2/contacts/opt-out');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['number' => '+15551234567']));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer ' . $apiKey,
    'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));
```

Response:

```json
{
  "success": true,
  "optedOut": 1,
  "alreadyOptedOut": false,
  "number": "+15551234567"
}
```

Returns 404 if no contact matches the number. `alreadyOptedOut` is true when the contact was already opted out.

## Account: GET /api/v2/me

Returns your account info, handy for confirming an API key works and checking your balance and sender number. No cost.

cURL:

```bash
curl https://app.smsblast.io/api/v2/me -H "Authorization: Bearer YOUR_API_KEY"
```

Node.js:

```js
const axios = require('axios');

axios.get('https://app.smsblast.io/api/v2/me', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
})
.then(response => console.log(response.data))
.catch(error => console.error(error));
```

PHP:

```php
<?php
$apiKey = 'YOUR_API_KEY';
$ch = curl_init('https://app.smsblast.io/api/v2/me');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $apiKey]);
$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));
```

Response:

```json
{
  "id": "org_uuid",
  "name": "Acme Inc",
  "balance": 42.50,
  "sender_number": "+18885551234",
  "sender_status": "verified"
}
```

## Listening webhooks

Listening webhooks are URLs SMSBlast calls when something happens on your account. Use them to push events into your CRM, Zapier, n8n, Make, or any HTTPS endpoint you control. Configure them under Settings → Integrations (APIs) → Webhooks.

Inbound message webhook: fires when a contact texts one of your numbers. Opt-out keywords (STOP, UNSUBSCRIBE) are skipped. SMSBlast POSTs this payload to your URL; contact fields are null when not on file, and `customFields` is `{}` when you have none.

```json
{
  "from": "+15551234567",
  "to": "+18005551234",
  "message": "Hi, can you tell me more?",
  "contact": {
    "firstName": "Jane",
    "lastName": "Doe",
    "phone": "+15551234567",
    "email": "jane@example.com",
    "address": "123 Main St",
    "city": "Austin",
    "state": "TX",
    "zip": "78701",
    "customFields": { "interestedIn": "kitchen remodel" }
  }
}
```

## Errors

Errors return a non-2xx status with a JSON body: an `error` string that says what went wrong and, when useful, a `details` string that says how to fix it.

```json
{ "error": "Missing API key", "details": "Provide \"Authorization: Bearer YOUR_API_KEY\" header." }
```

| Status | Meaning |
| --- | --- |
| 400 | Bad request: missing or invalid from, sender not verified or reply-only, invalid body or mediaUrl, or more than 100 recipients. |
| 401 | Missing or invalid API key. |
| 402 | Insufficient balance for the send. |
| 404 | No contact matches the number (opt-out). |
| 429 | Rate limited. Slow down and retry. |
| 500 | Server error. |

## Machine-readable resources

- OpenAPI 3.1 specification (including the inbound webhook): https://smsblast.io/openapi.json
- AI-readable site summary (llms.txt): https://smsblast.io/llms.txt
- Sitemap: https://smsblast.io/sitemap.xml
- Markdown mirrors: https://smsblast.io/index.md, https://smsblast.io/pricing.md, https://smsblast.io/faq.md, https://smsblast.io/features.md, https://smsblast.io/developers.md, https://smsblast.io/about.md
- Content negotiation: request /, /pricing, /faq, /features, /developers, or /about with `Accept: text/markdown` to receive the markdown mirror directly (responses carry `Vary: Accept`). A client that accepts neither `text/html` nor `text/markdown` gets HTTP 406 with a JSON body.
- Errors on smsblast.io: unknown paths return a real HTTP 404. Under /api/ and /docs/ on this site, send `Accept: application/json` or `Accept: text/markdown` to get a structured 404 body with links to this page and the OpenAPI spec.

## Compliance for integrations

SMSBlast is a sending platform only. Anything you send through the API must go to contacts who gave proper consent, and your outreach must comply with all applicable laws, including TCPA, CAN-SPAM, and A2P 10DLC requirements. Guides: https://smsblast.io/resources

## Related pages

- Developers (HTML): https://smsblast.io/developers
- Pricing (pay as you go rates): https://smsblast.io/pricing (markdown mirror: https://smsblast.io/pricing.md)
- Features: https://smsblast.io/features (markdown mirror: https://smsblast.io/features.md)
- FAQ: https://smsblast.io/faq (markdown mirror: https://smsblast.io/faq.md)
- Sign up: https://app.smsblast.io/signup
