New: every plan now includes free incoming texts and rollover credits. See pricing →
Search Help Center Documentation

API reference

Campaigns

One message to many people. Write a draft, check who it reaches and what it costs (estimate), send yourself a test, then send it now or schedule it. Only subscribed people in the audience get it, each once, personalised with their name.

Credits for the whole campaign are taken when you send it. Texts go out in each recipient's sending hours (8am to 9pm in their time zone). A scheduled campaign, or one still going out, can be stopped, and the credits for texts not yet sent come back. A draft can also be made recurring: it is then sent again on a schedule (every day, week or month).

List campaigns

GET/v1/campaigns

Your 200 most recent campaigns (by when they were sent, or created for drafts), with headline results.

Request

curl https://app.smsblast.net/v1/campaigns \
  -H "Authorization: Bearer $SMSBLAST_API_KEY"
const res = await fetch('https://app.smsblast.net/v1/campaigns', {
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
  },
});
console.log(res.status, await res.json());
import os

import requests

res = requests.get(
    "https://app.smsblast.net/v1/campaigns",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response · 200
{
  "campaigns": [
    {
      "id": "c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64",
      "account_id": "5d0c6a2e-8f43-4b8a-9c1d-2e7f4a6b3c10",
      "name": "Holiday stollen",
      "body": "Hi {first_name|there}! Our holiday stollen is back this weekend: 15% off with code STOLLEN. Reply STOP to opt out.",
      "media_urls": [],
      "from_number_id": "b7e2f1a4-3c5d-4e6f-8a9b-0c1d2e3f4a5b",
      "status": "sent",
      "audience": {
        "lists": [
          "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
        ],
        "segments": [
          "4f2a8c6e-1d3b-4f5a-9e7c-8b0d2f4a6c53"
        ]
      },
      "recipients": 1284,
      "credits": 1290,
      "created_at": "2026-11-18T22:05:31.640Z",
      "started_at": "2026-11-21T17:00:00.000Z",
      "finished_at": "2026-11-21T17:09:47.512Z",
      "scheduled_at": "2026-11-21T17:00:00.000Z",
      "track_links": true,
      "recurrence": null,
      "next_run_at": null,
      "parent_id": null,
      "last_error": null,
      "delivered": 1251,
      "failed": 9,
      "unsubs": 7,
      "clicked": 183,
      "audience_label": "1 list, 1 segment"
    }
  ]
}

Needs an API key: Authorization: Bearer sb_... Authentication

Query parameters#

statusstring

Only campaigns with this status. Other values are ignored.

One of "draft", "recurring", "sending", "sent".

searchstring

Only campaigns whose name contains this text (ignoring case).

Responses#

200

Campaigns.

application/json

campaignsarray of objectsrequired

Most recent first.

Fields of each item
idstringuuidrequired

The campaign id.

account_idstringuuidrequired

Your account id.

namestringrequired

Name, for you only (people do not see it).

bodystringrequired

The message as written, with any personalisation tags ({first_name}, {last_name}, {first_name|there}).

media_urlsarray of stringsurirequired

https addresses of pictures sent with the text. With a picture, every text is an MMS costing 3 credits.

from_number_idstringuuidnullablerequired

The sending number the campaign goes out from. Empty for a draft written before the account had a number; the first approved number is used when it is sent.

statusstringrequired

draft can be edited, deleted, sent or made recurring. recurring is a template sent again and again on a schedule (see recurrence); it can be edited and deleted but is never sent itself. sending means it was sent or scheduled and its texts are queued. sent means every text has gone out or ended. canceled means it was stopped with POST /v1/campaigns/{id}/cancel.

One of "draft", "recurring", "sending", "sent", "canceled".

audienceobjectrequired

Who a campaign (or a workflow enrollment) goes to: everyone subscribed, or the people on any of the lists or in any of the segments (a person in several is texted once). Only subscribed contacts are ever texted, and numbers blocked on SMSBlast are left out. Stored as {"all": true} or as {"lists": [...], "segments": [...]}.

Child fields
allboolean

Everyone subscribed. This is what you get when no lists or segments are given.

Always true.

listsarray of stringsuuid

List ids.

segmentsarray of stringsuuid

Segment ids.

recipientsintegerrequired

How many people it was sent to. 0 for a draft.

creditsintegerrequired

Credits taken when it was sent, before any refunds. 0 for a draft.

created_atstringdate-timerequired

When the draft was created.

started_atstringdate-timenullablerequired

When sending started, or the time it is scheduled for.

finished_atstringdate-timenullablerequired

When the last text went out or ended.

scheduled_atstringdate-timenullablerequired

The time it was scheduled for, when it was scheduled with sendAt.

track_linksbooleanrequired

Whether links in the body are swapped for a short tracking link per person (such as https://app.smsblast.net/s/Ab3dEf9), so clicks can be counted.

recurrenceobjectnullablerequired

The schedule of a recurring campaign. Empty for other campaigns.

Child fields
freqstringrequired

How often.

One of "daily", "weekly", "monthly".

intervalinteger

Every 1 to 12 days, weeks or months. Default 1.

Limits: 1 to 12.

timestringrequired

Local time in your account's time zone, HH:MM, between 08:00 and 20:59 (when texts may be sent).

Pattern "^([01]\\d|2[0-3]):[0-5]\\d$".

weekdaysarray of integers

Weekly only: the days of the week, 0 = Sunday to 6 = Saturday. At least one.

monthdayinteger

Monthly only: the day of the month, 1 to 28 (so it exists in every month).

Limits: 1 to 28.

startDatestringdate

The first day it may go out, YYYY-MM-DD in your account's time zone; weeks and months are counted from it. Default today.

endDatestringdatenullable

The last day it may go out, YYYY-MM-DD. Empty for no end.

next_run_atstringdate-timenullablerequired

When a recurring campaign goes out next.

parent_idstringuuidnullablerequired

For a campaign sent by a recurring campaign: the recurring campaign (template) it was copied from.

last_errorstringnullablerequired

For a recurring campaign: why its last occurrence could not go out (for example not enough credits). Empty when it went out.

deliveredintegerrequired

Texts confirmed delivered.

failedintegerrequired

Texts that failed.

unsubsintegerrequired

People who opted out within 3 days of getting it.

clickedintegerrequired

People who clicked at least one tracked link in it.

audience_labelstringrequired

The audience in words: "All subscribers", a list or segment name, or "2 lists, 1 segment".

Response headers
X-Request-Idstring Guide

The id of this request (req_...), on every answer. Quote it when you contact support.

X-RateLimit-Limitinteger Guide

Requests allowed per minute with this API key.

X-RateLimit-Remaininginteger Guide

Requests left in the current minute.

X-RateLimit-Resetinteger Guide

When the current minute ends and the count starts again, in Unix seconds.

401

No API key, or one that is not valid or has been revoked (unauthorized).

429

Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.

Every error has the same body: {"error": {"code", "message", "details", "requestId"}}. See Errors.

Create a campaign draft

POST/v1/campaigns

Saves a campaign as a draft: the message, who it goes to and the number it goes from. Nothing is sent until you call POST /v1/campaigns/{id}/send. A draft can be written before your number is approved.

Personalise the message with {first_name}, {last_name}, or {first_name|there} (a fallback for contacts with no name). Say how to opt out ("Reply STOP to opt out"); the preview in the answer warns when it is missing. The audience is everyone subscribed unless you give lists or segments.

Request

curl -X POST https://app.smsblast.net/v1/campaigns \
  -H "Authorization: Bearer $SMSBLAST_API_KEY" \
  -H "Idempotency-Key: $(openssl rand -hex 16)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Holiday stollen",
    "body": "Hi {first_name|there}! Our holiday stollen is back this weekend: 15% off with code STOLLEN. Reply STOP to opt out.",
    "audience": {
      "lists": [
        "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
      ],
      "segments": [
        "4f2a8c6e-1d3b-4f5a-9e7c-8b0d2f4a6c53"
      ]
    },
    "trackLinks": true
  }'
const res = await fetch('https://app.smsblast.net/v1/campaigns', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
    'Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'Holiday stollen',
    body: 'Hi {first_name|there}! Our holiday stollen is back this weekend: 15% off with code STOLLEN. Reply STOP to opt out.',
    audience: {
      lists: ['e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30'],
      segments: ['4f2a8c6e-1d3b-4f5a-9e7c-8b0d2f4a6c53'],
    },
    trackLinks: true,
  }),
});
console.log(res.status, await res.json());
import os
import uuid

import requests

res = requests.post(
    "https://app.smsblast.net/v1/campaigns",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "name": "Holiday stollen",
        "body": "Hi {first_name|there}! Our holiday stollen is back this weekend: 15% off with code STOLLEN. Reply STOP to opt out.",
        "audience": {
            "lists": ["e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"],
            "segments": ["4f2a8c6e-1d3b-4f5a-9e7c-8b0d2f4a6c53"],
        },
        "trackLinks": True,
    },
)
print(res.status_code, res.json())
Response · 201
{
  "campaign": {
    "id": "c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64",
    "account_id": "5d0c6a2e-8f43-4b8a-9c1d-2e7f4a6b3c10",
    "name": "Holiday stollen",
    "body": "Hi {first_name|there}! Our holiday stollen is back this weekend: 15% off with code STOLLEN. Reply STOP to opt out.",
    "media_urls": [],
    "from_number_id": "b7e2f1a4-3c5d-4e6f-8a9b-0c1d2e3f4a5b",
    "status": "draft",
    "audience": {
      "lists": [
        "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
      ],
      "segments": [
        "4f2a8c6e-1d3b-4f5a-9e7c-8b0d2f4a6c53"
      ]
    },
    "recipients": 0,
    "credits": 0,
    "created_at": "2026-11-18T22:05:31.640Z",
    "started_at": null,
    "finished_at": null,
    "scheduled_at": null,
    "track_links": true,
    "recurrence": null,
    "next_run_at": null,
    "parent_id": null,
    "last_error": null
  },
  "preview": {
    "encoding": "GSM-7",
    "characters": 114,
    "segments": 1,
    "creditsPerMessage": 1,
    "nonGsm": [],
    "warnings": [
      "Names vary in length, so some recipients may use one more credit than shown."
    ]
  }
}

Needs an API key: Authorization: Bearer sb_... Authentication

Headers#

Idempotency-Keystring Guide

Any unique string up to 200 characters (a UUID works well). If a POST times out or you are not sure it went through, send it again with the same key and the same body: you get the first answer back (with Idempotent-Replayed: true) instead of the work being done twice. Keys are kept for 24 hours per account.

Limits: up to 200 characters.

Example "2b5c4f8e-order-1042".

Request body#

application/json · required

namestring

Name, for you only, up to 120 characters. Default "Untitled campaign".

bodystringrequired

The message, up to 1,600 characters. Personalise it with {first_name}, {last_name}, or a fallback such as {first_name|there} for contacts with no name on file. Marketing texts should say how to opt out ("Reply STOP to opt out").

Limits: up to 1600 characters.

mediaUrlsarray of stringsuri

https addresses of pictures. Any picture makes every text an MMS costing 3 credits.

fromNumberIdstringuuid

The sending number to use. Leave it out for your first approved number.

audienceobject

Who a campaign (or a workflow enrollment) goes to: everyone subscribed, or the people on any of the lists or in any of the segments (a person in several is texted once). Only subscribed contacts are ever texted, and numbers blocked on SMSBlast are left out. Stored as {"all": true} or as {"lists": [...], "segments": [...]}.

Child fields
allboolean

Everyone subscribed. This is what you get when no lists or segments are given.

Always true.

listsarray of stringsuuid

List ids.

segmentsarray of stringsuuid

Segment ids.

trackLinksboolean

Default true: links in the body become a short tracking link per person, so clicks are counted. Send false to keep links exactly as written.

Example request body
Request body
{
  "name": "Holiday stollen",
  "body": "Hi {first_name|there}! Our holiday stollen is back this weekend: 15% off with code STOLLEN. Reply STOP to opt out.",
  "audience": {
    "lists": [
      "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
    ],
    "segments": [
      "4f2a8c6e-1d3b-4f5a-9e7c-8b0d2f4a6c53"
    ]
  },
  "trackLinks": true
}

Responses#

201

The draft and a preview of its message.

application/json

campaignobjectrequired

A campaign: one message sent to an audience. Field names are snake_case.

Child fields
idstringuuidrequired

The campaign id.

account_idstringuuidrequired

Your account id.

namestringrequired

Name, for you only (people do not see it).

bodystringrequired

The message as written, with any personalisation tags ({first_name}, {last_name}, {first_name|there}).

media_urlsarray of stringsurirequired

https addresses of pictures sent with the text. With a picture, every text is an MMS costing 3 credits.

from_number_idstringuuidnullablerequired

The sending number the campaign goes out from. Empty for a draft written before the account had a number; the first approved number is used when it is sent.

statusstringrequired

draft can be edited, deleted, sent or made recurring. recurring is a template sent again and again on a schedule (see recurrence); it can be edited and deleted but is never sent itself. sending means it was sent or scheduled and its texts are queued. sent means every text has gone out or ended. canceled means it was stopped with POST /v1/campaigns/{id}/cancel.

One of "draft", "recurring", "sending", "sent", "canceled".

audienceobjectrequired

Who a campaign (or a workflow enrollment) goes to: everyone subscribed, or the people on any of the lists or in any of the segments (a person in several is texted once). Only subscribed contacts are ever texted, and numbers blocked on SMSBlast are left out. Stored as {"all": true} or as {"lists": [...], "segments": [...]}.

Child fields
allboolean

Everyone subscribed. This is what you get when no lists or segments are given.

Always true.

listsarray of stringsuuid

List ids.

segmentsarray of stringsuuid

Segment ids.

recipientsintegerrequired

How many people it was sent to. 0 for a draft.

creditsintegerrequired

Credits taken when it was sent, before any refunds. 0 for a draft.

created_atstringdate-timerequired

When the draft was created.

started_atstringdate-timenullablerequired

When sending started, or the time it is scheduled for.

finished_atstringdate-timenullablerequired

When the last text went out or ended.

scheduled_atstringdate-timenullablerequired

The time it was scheduled for, when it was scheduled with sendAt.

track_linksbooleanrequired

Whether links in the body are swapped for a short tracking link per person (such as https://app.smsblast.net/s/Ab3dEf9), so clicks can be counted.

recurrenceobjectnullablerequired

The schedule of a recurring campaign. Empty for other campaigns.

Child fields
freqstringrequired

How often.

One of "daily", "weekly", "monthly".

intervalinteger

Every 1 to 12 days, weeks or months. Default 1.

Limits: 1 to 12.

timestringrequired

Local time in your account's time zone, HH:MM, between 08:00 and 20:59 (when texts may be sent).

Pattern "^([01]\\d|2[0-3]):[0-5]\\d$".

weekdaysarray of integers

Weekly only: the days of the week, 0 = Sunday to 6 = Saturday. At least one.

monthdayinteger

Monthly only: the day of the month, 1 to 28 (so it exists in every month).

Limits: 1 to 28.

startDatestringdate

The first day it may go out, YYYY-MM-DD in your account's time zone; weeks and months are counted from it. Default today.

endDatestringdatenullable

The last day it may go out, YYYY-MM-DD. Empty for no end.

next_run_atstringdate-timenullablerequired

When a recurring campaign goes out next.

parent_idstringuuidnullablerequired

For a campaign sent by a recurring campaign: the recurring campaign (template) it was copied from.

last_errorstringnullablerequired

For a recurring campaign: why its last occurrence could not go out (for example not enough credits). Empty when it went out.

previewobjectrequired

How a message body will be sent and what it costs.

Child fields
encodingstringrequired

GSM-7: plain text, 160 characters in one SMS segment, 153 per segment once split. UCS-2: the text has a character outside GSM-7 (an emoji, curly quotes, many accents), so 70 characters per segment, 67 once split.

One of "GSM-7", "UCS-2".

charactersintegerrequired

Characters in the body as written.

segmentsintegerrequired

SMS segments, counted with personalisation tags filled in with their fallbacks (or left empty).

creditsPerMessageintegerrequired

Credits one recipient costs: the segments (at least 1), or 3 with a picture.

nonGsmarray of stringsrequired

The characters that forced UCS-2, each once.

warningsarray of stringsrequired

Things worth fixing before sending: no opt-out wording ("Reply STOP to opt out"), characters that shorten each segment, and personalisation that can change the length.

Response headers
X-Request-Idstring Guide

The id of this request (req_...), on every answer. Quote it when you contact support.

X-RateLimit-Limitinteger Guide

Requests allowed per minute with this API key.

X-RateLimit-Remaininginteger Guide

Requests left in the current minute.

X-RateLimit-Resetinteger Guide

When the current minute ends and the count starts again, in Unix seconds.

Idempotent-Replayedstring Guide

true when this is the stored answer to an earlier request with the same Idempotency-Key, not a new one.

One of "true".

400

The request was refused because something in it is not valid. error.code is one of:

  • empty_body: body is missing or empty.
  • body_too_long: body is longer than 1,600 characters.
  • invalid_media: A mediaUrls entry is not an https address.
  • invalid_json: The body is not a JSON object.
  • invalid_idempotency_key: The Idempotency-Key header is longer than 200 characters.
401

No API key, or one that is not valid or has been revoked (unauthorized).

404

Something the request names does not exist in your account. error.code is one of:

  • not_found: A list or segment in audience does not exist.
  • no_sending_number: The number in fromNumberId does not exist.
409

The request clashes with the current state of things. error.code is one of:

  • idempotency_in_progress: A request with the same Idempotency-Key is still running. Try again in a moment.
422

This Idempotency-Key was already used for a different request (another path or body) in the last 24 hours (idempotency_key_reused). Use a new key for each new request.

429

Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.

Every error has the same body: {"error": {"code", "message", "details", "requestId"}}. See Errors.

Estimate a campaign

POST/v1/campaigns/estimate

Counts who a campaign would reach (subscribed people in the audience) and what it would cost, with each person's personalisation filled in, plus your balance. Nothing is saved or sent.

Request

curl -X POST https://app.smsblast.net/v1/campaigns/estimate \
  -H "Authorization: Bearer $SMSBLAST_API_KEY" \
  -H "Idempotency-Key: $(openssl rand -hex 16)" \
  -H "Content-Type: application/json" \
  -d '{
    "audience": {
      "lists": [
        "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
      ],
      "segments": [
        "4f2a8c6e-1d3b-4f5a-9e7c-8b0d2f4a6c53"
      ]
    },
    "body": "Hi {first_name|there}! Our holiday stollen is back this weekend: 15% off with code STOLLEN. Reply STOP to opt out."
  }'
const res = await fetch('https://app.smsblast.net/v1/campaigns/estimate', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
    'Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    audience: {
      lists: ['e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30'],
      segments: ['4f2a8c6e-1d3b-4f5a-9e7c-8b0d2f4a6c53'],
    },
    body: 'Hi {first_name|there}! Our holiday stollen is back this weekend: 15% off with code STOLLEN. Reply STOP to opt out.',
  }),
});
console.log(res.status, await res.json());
import os
import uuid

import requests

res = requests.post(
    "https://app.smsblast.net/v1/campaigns/estimate",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "audience": {
            "lists": ["e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"],
            "segments": ["4f2a8c6e-1d3b-4f5a-9e7c-8b0d2f4a6c53"],
        },
        "body": "Hi {first_name|there}! Our holiday stollen is back this weekend: 15% off with code STOLLEN. Reply STOP to opt out.",
    },
)
print(res.status_code, res.json())
Response · 200
{
  "recipients": 1284,
  "credits": 1290,
  "balance": 4210,
  "preview": {
    "encoding": "GSM-7",
    "characters": 114,
    "segments": 1,
    "creditsPerMessage": 1,
    "nonGsm": [],
    "warnings": [
      "Names vary in length, so some recipients may use one more credit than shown."
    ]
  }
}

Needs an API key: Authorization: Bearer sb_... Authentication

Headers#

Idempotency-Keystring Guide

Any unique string up to 200 characters (a UUID works well). If a POST times out or you are not sure it went through, send it again with the same key and the same body: you get the first answer back (with Idempotent-Replayed: true) instead of the work being done twice. Keys are kept for 24 hours per account.

Limits: up to 200 characters.

Example "2b5c4f8e-order-1042".

Request body#

application/json · required

audienceobject

Who a campaign (or a workflow enrollment) goes to: everyone subscribed, or the people on any of the lists or in any of the segments (a person in several is texted once). Only subscribed contacts are ever texted, and numbers blocked on SMSBlast are left out. Stored as {"all": true} or as {"lists": [...], "segments": [...]}.

Child fields
allboolean

Everyone subscribed. This is what you get when no lists or segments are given.

Always true.

listsarray of stringsuuid

List ids.

segmentsarray of stringsuuid

Segment ids.

bodystring

The message, with any personalisation tags. Without one, each recipient is counted as 1 credit.

mediaUrlsarray of strings

Any non-empty list prices it as a picture message (3 credits each).

Example request body
Request body
{
  "audience": {
    "lists": [
      "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
    ],
    "segments": [
      "4f2a8c6e-1d3b-4f5a-9e7c-8b0d2f4a6c53"
    ]
  },
  "body": "Hi {first_name|there}! Our holiday stollen is back this weekend: 15% off with code STOLLEN. Reply STOP to opt out."
}

Responses#

200

The estimate.

application/json

recipientsintegerrequired

Subscribed people in the audience now (numbers blocked on SMSBlast are left out).

creditsintegerrequired

Credits it would cost, with each person's personalisation filled in.

balanceintegerrequired

Your credit balance now.

previewobjectrequired

How a message body will be sent and what it costs.

Child fields
encodingstringrequired

GSM-7: plain text, 160 characters in one SMS segment, 153 per segment once split. UCS-2: the text has a character outside GSM-7 (an emoji, curly quotes, many accents), so 70 characters per segment, 67 once split.

One of "GSM-7", "UCS-2".

charactersintegerrequired

Characters in the body as written.

segmentsintegerrequired

SMS segments, counted with personalisation tags filled in with their fallbacks (or left empty).

creditsPerMessageintegerrequired

Credits one recipient costs: the segments (at least 1), or 3 with a picture.

nonGsmarray of stringsrequired

The characters that forced UCS-2, each once.

warningsarray of stringsrequired

Things worth fixing before sending: no opt-out wording ("Reply STOP to opt out"), characters that shorten each segment, and personalisation that can change the length.

Response headers
X-Request-Idstring Guide

The id of this request (req_...), on every answer. Quote it when you contact support.

X-RateLimit-Limitinteger Guide

Requests allowed per minute with this API key.

X-RateLimit-Remaininginteger Guide

Requests left in the current minute.

X-RateLimit-Resetinteger Guide

When the current minute ends and the count starts again, in Unix seconds.

Idempotent-Replayedstring Guide

true when this is the stored answer to an earlier request with the same Idempotency-Key, not a new one.

One of "true".

400

The request was refused because something in it is not valid. error.code is one of:

  • invalid_json: The body is not a JSON object.
  • invalid_idempotency_key: The Idempotency-Key header is longer than 200 characters.
401

No API key, or one that is not valid or has been revoked (unauthorized).

404

Something the request names does not exist in your account. error.code is one of:

  • not_found: A list or segment in audience does not exist.
409

The request clashes with the current state of things. error.code is one of:

  • idempotency_in_progress: A request with the same Idempotency-Key is still running. Try again in a moment.
422

This Idempotency-Key was already used for a different request (another path or body) in the last 24 hours (idempotency_key_reused). Use a new key for each new request.

429

Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.

Every error has the same body: {"error": {"code", "message", "details", "requestId"}}. See Errors.

Send a test text

POST/v1/campaigns/test

Sends a message to one phone to see how it looks. The text starts with "[Test] " and personalisation is filled in with the name Sam Rivera. It costs credits like any text and goes out at once (no sending hours).

A test can only go to a teammate's own mobile number (saved in their profile in the dashboard) or to a subscribed contact: never to a stranger, and never to someone who opted out. Up to 20 tests per 24 hours per account. Sending needs an approved number and, after the free trial, a plan.

Request

curl -X POST https://app.smsblast.net/v1/campaigns/test \
  -H "Authorization: Bearer $SMSBLAST_API_KEY" \
  -H "Idempotency-Key: $(openssl rand -hex 16)" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+14155550101",
    "body": "Hi {first_name|there}! Our holiday stollen is back this weekend: 15% off with code STOLLEN. Reply STOP to opt out."
  }'
const res = await fetch('https://app.smsblast.net/v1/campaigns/test', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
    'Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    to: '+14155550101',
    body: 'Hi {first_name|there}! Our holiday stollen is back this weekend: 15% off with code STOLLEN. Reply STOP to opt out.',
  }),
});
console.log(res.status, await res.json());
import os
import uuid

import requests

res = requests.post(
    "https://app.smsblast.net/v1/campaigns/test",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "to": "+14155550101",
        "body": "Hi {first_name|there}! Our holiday stollen is back this weekend: 15% off with code STOLLEN. Reply STOP to opt out.",
    },
)
print(res.status_code, res.json())
Response · 201
{
  "messageId": "a4c6e8f0-2b4d-4f6a-8c0e-1d3f5a7c9e86",
  "credits": 1
}

Needs an API key: Authorization: Bearer sb_... Authentication

Headers#

Idempotency-Keystring Guide

Any unique string up to 200 characters (a UUID works well). If a POST times out or you are not sure it went through, send it again with the same key and the same body: you get the first answer back (with Idempotent-Replayed: true) instead of the work being done twice. Keys are kept for 24 hours per account.

Limits: up to 200 characters.

Example "2b5c4f8e-order-1042".

Request body#

application/json · required

tostringrequired

Where to send the test: a teammate's own mobile number (as saved in their dashboard profile) or a subscribed contact. A US or Canada mobile number in any common format (+14155550101, (415) 555-0101, 415-555-0101). Stored and returned in E.164 (+14155550101).

bodystringrequired

The message. Personalisation is filled in with the name Sam Rivera.

mediaUrlsarray of stringsuri

Up to 10 https addresses of pictures (makes it a 3-credit MMS).

Limits: up to 10 items.

Example request body
Request body
{
  "to": "+14155550101",
  "body": "Hi {first_name|there}! Our holiday stollen is back this weekend: 15% off with code STOLLEN. Reply STOP to opt out."
}

Responses#

201

The test text, queued.

application/json

messageIdstringuuidrequired

The test text. Look it up with GET /v1/messages/{id}.

creditsintegerrequired

Credits it cost.

Response headers
X-Request-Idstring Guide

The id of this request (req_...), on every answer. Quote it when you contact support.

X-RateLimit-Limitinteger Guide

Requests allowed per minute with this API key.

X-RateLimit-Remaininginteger Guide

Requests left in the current minute.

X-RateLimit-Resetinteger Guide

When the current minute ends and the count starts again, in Unix seconds.

Idempotent-Replayedstring Guide

true when this is the stored answer to an earlier request with the same Idempotency-Key, not a new one.

One of "true".

400

The request was refused because something in it is not valid. error.code is one of:

  • invalid_phone: to is not a valid US or Canada mobile number.
  • empty_body: body is missing or empty.
  • invalid_media: mediaUrls has more than 10 entries or one that is not an https address.
  • invalid_json: The body is not a JSON object.
  • invalid_idempotency_key: The Idempotency-Key header is longer than 200 characters.
401

No API key, or one that is not valid or has been revoked (unauthorized).

402

Sending is not possible right now. error.code is one of:

  • insufficient_credits: Your credit balance is too low for this. error.details has needed and available.
  • trial_ended: The 14-day free trial is over. Choose a plan on the Billing page of the dashboard to keep sending.
  • plan_required: Your paid plan has ended. Choose a plan on the Billing page of the dashboard to keep sending.
409

The request clashes with the current state of things. error.code is one of:

  • test_recipient: to is neither a teammate's own mobile number nor a subscribed contact.
  • unsubscribed: to belongs to a contact who opted out.
  • blocked: The number is blocked on SMSBlast (by SMSBlast staff, for every account) and cannot be texted.
  • no_active_number: You have no approved sending number yet.
  • idempotency_in_progress: A request with the same Idempotency-Key is still running. Try again in a moment.
422

This Idempotency-Key was already used for a different request (another path or body) in the last 24 hours (idempotency_key_reused). Use a new key for each new request.

429

Too many requests. error.code is one of:

  • rate_limited: More than your API key's requests per minute. Wait for Retry-After seconds.
  • test_limit: You have sent 20 tests in the last 24 hours.

Every error has the same body: {"error": {"code", "message", "details", "requestId"}}. See Errors.

Get a campaign report

GET/v1/campaigns/{id}

One campaign with its results: texts by status, credits refunded, opt-outs within 3 days and link clicks.

Request

curl https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64 \
  -H "Authorization: Bearer $SMSBLAST_API_KEY"
const res = await fetch('https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64', {
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
  },
});
console.log(res.status, await res.json());
import os

import requests

res = requests.get(
    "https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response · 200
{
  "campaign": {
    "id": "c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64",
    "account_id": "5d0c6a2e-8f43-4b8a-9c1d-2e7f4a6b3c10",
    "name": "Holiday stollen",
    "body": "Hi {first_name|there}! Our holiday stollen is back this weekend: 15% off with code STOLLEN. Reply STOP to opt out.",
    "media_urls": [],
    "from_number_id": "b7e2f1a4-3c5d-4e6f-8a9b-0c1d2e3f4a5b",
    "status": "sent",
    "audience": {
      "lists": [
        "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
      ],
      "segments": [
        "4f2a8c6e-1d3b-4f5a-9e7c-8b0d2f4a6c53"
      ]
    },
    "recipients": 1284,
    "credits": 1290,
    "created_at": "2026-11-18T22:05:31.640Z",
    "started_at": "2026-11-21T17:00:00.000Z",
    "finished_at": "2026-11-21T17:09:47.512Z",
    "scheduled_at": "2026-11-21T17:00:00.000Z",
    "track_links": true,
    "recurrence": null,
    "next_run_at": null,
    "parent_id": null,
    "last_error": null,
    "audience_label": "1 list, 1 segment"
  },
  "counts": {
    "queued": 0,
    "sending": 0,
    "sent": 21,
    "delivered": 1251,
    "failed": 9,
    "skipped": 3
  },
  "creditsRefunded": 6,
  "unsubs": 7,
  "clicks": {
    "clicks": 241,
    "people": 183,
    "links": 1,
    "byUrl": [
      {
        "url": "https://example.com/stollen",
        "clicks": 241,
        "people": 183
      }
    ]
  }
}

Needs an API key: Authorization: Bearer sb_... Authentication

Path parameters#

idstringuuidrequired

The campaign id.

Responses#

200

The campaign and how it went.

application/json

campaignobjectrequired
Child fields
idstringuuidrequired

The campaign id.

account_idstringuuidrequired

Your account id.

namestringrequired

Name, for you only (people do not see it).

bodystringrequired

The message as written, with any personalisation tags ({first_name}, {last_name}, {first_name|there}).

media_urlsarray of stringsurirequired

https addresses of pictures sent with the text. With a picture, every text is an MMS costing 3 credits.

from_number_idstringuuidnullablerequired

The sending number the campaign goes out from. Empty for a draft written before the account had a number; the first approved number is used when it is sent.

statusstringrequired

draft can be edited, deleted, sent or made recurring. recurring is a template sent again and again on a schedule (see recurrence); it can be edited and deleted but is never sent itself. sending means it was sent or scheduled and its texts are queued. sent means every text has gone out or ended. canceled means it was stopped with POST /v1/campaigns/{id}/cancel.

One of "draft", "recurring", "sending", "sent", "canceled".

audienceobjectrequired

Who a campaign (or a workflow enrollment) goes to: everyone subscribed, or the people on any of the lists or in any of the segments (a person in several is texted once). Only subscribed contacts are ever texted, and numbers blocked on SMSBlast are left out. Stored as {"all": true} or as {"lists": [...], "segments": [...]}.

Child fields
allboolean

Everyone subscribed. This is what you get when no lists or segments are given.

Always true.

listsarray of stringsuuid

List ids.

segmentsarray of stringsuuid

Segment ids.

recipientsintegerrequired

How many people it was sent to. 0 for a draft.

creditsintegerrequired

Credits taken when it was sent, before any refunds. 0 for a draft.

created_atstringdate-timerequired

When the draft was created.

started_atstringdate-timenullablerequired

When sending started, or the time it is scheduled for.

finished_atstringdate-timenullablerequired

When the last text went out or ended.

scheduled_atstringdate-timenullablerequired

The time it was scheduled for, when it was scheduled with sendAt.

track_linksbooleanrequired

Whether links in the body are swapped for a short tracking link per person (such as https://app.smsblast.net/s/Ab3dEf9), so clicks can be counted.

recurrenceobjectnullablerequired

The schedule of a recurring campaign. Empty for other campaigns.

Child fields
freqstringrequired

How often.

One of "daily", "weekly", "monthly".

intervalinteger

Every 1 to 12 days, weeks or months. Default 1.

Limits: 1 to 12.

timestringrequired

Local time in your account's time zone, HH:MM, between 08:00 and 20:59 (when texts may be sent).

Pattern "^([01]\\d|2[0-3]):[0-5]\\d$".

weekdaysarray of integers

Weekly only: the days of the week, 0 = Sunday to 6 = Saturday. At least one.

monthdayinteger

Monthly only: the day of the month, 1 to 28 (so it exists in every month).

Limits: 1 to 28.

startDatestringdate

The first day it may go out, YYYY-MM-DD in your account's time zone; weeks and months are counted from it. Default today.

endDatestringdatenullable

The last day it may go out, YYYY-MM-DD. Empty for no end.

next_run_atstringdate-timenullablerequired

When a recurring campaign goes out next.

parent_idstringuuidnullablerequired

For a campaign sent by a recurring campaign: the recurring campaign (template) it was copied from.

last_errorstringnullablerequired

For a recurring campaign: why its last occurrence could not go out (for example not enough credits). Empty when it went out.

audience_labelstringrequired

The audience in words: "All subscribers", a list or segment name, or "2 lists, 1 segment".

countsobjectrequired

Texts by their status now. Each text is in exactly one of these.

Child fields
queuedintegerrequired

Waiting to go out (scheduled, or holding for the recipient's sending hours).

sendingintegerrequired

Being handed to the carrier.

sentintegerrequired

Accepted by the carrier, no delivery report yet.

deliveredintegerrequired

Confirmed delivered.

failedintegerrequired

Failed.

skippedintegerrequired

Not sent because the person opted out first, or because the campaign was stopped.

creditsRefundedintegerrequired

Credits given back for texts that failed before reaching the carrier or were skipped.

unsubsintegerrequired

People who opted out within 3 days of getting it.

clicksobjectrequired

Link clicks. All zero when the campaign had no links or link tracking was off.

Child fields
clicksintegerrequired

Clicks on its tracked links, by people (link scanners and previews are not counted).

peopleintegerrequired

People who clicked at least once.

linksintegerrequired

Different links in the message.

byUrlarray of objectsrequired

Each link, most clicked first.

Fields of each item
urlstringrequired

The original link.

clicksintegerrequired

Clicks on it.

peopleintegerrequired

People who clicked it.

Response headers
X-Request-Idstring Guide

The id of this request (req_...), on every answer. Quote it when you contact support.

X-RateLimit-Limitinteger Guide

Requests allowed per minute with this API key.

X-RateLimit-Remaininginteger Guide

Requests left in the current minute.

X-RateLimit-Resetinteger Guide

When the current minute ends and the count starts again, in Unix seconds.

401

No API key, or one that is not valid or has been revoked (unauthorized).

404

Something the request names does not exist in your account. error.code is one of:

  • not_found: No campaign with that id in your account.
429

Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.

Every error has the same body: {"error": {"code", "message", "details", "requestId"}}. See Errors.

Update a campaign draft

PATCH/v1/campaigns/{id}

Changes a draft, or a recurring campaign (the change applies to its later dates). Only the fields you send change. Campaigns that were sent, scheduled or stopped cannot be changed.

Request

curl -X PATCH https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64 \
  -H "Authorization: Bearer $SMSBLAST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Holiday stollen (final)",
    "audience": {
      "lists": [
        "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
      ]
    }
  }'
const res = await fetch('https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64', {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'Holiday stollen (final)',
    audience: {
      lists: ['e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30'],
    },
  }),
});
console.log(res.status, await res.json());
import os

import requests

res = requests.patch(
    "https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
    },
    json={
        "name": "Holiday stollen (final)",
        "audience": {
            "lists": ["e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"],
        },
    },
)
print(res.status_code, res.json())
Response · 200
{
  "campaign": {
    "id": "c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64",
    "account_id": "5d0c6a2e-8f43-4b8a-9c1d-2e7f4a6b3c10",
    "name": "Holiday stollen (final)",
    "body": "Hi {first_name|there}! Our holiday stollen is back this weekend: 15% off with code STOLLEN. Reply STOP to opt out.",
    "media_urls": [],
    "from_number_id": "b7e2f1a4-3c5d-4e6f-8a9b-0c1d2e3f4a5b",
    "status": "draft",
    "audience": {
      "lists": [
        "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
      ],
      "segments": []
    },
    "recipients": 0,
    "credits": 0,
    "created_at": "2026-11-18T22:05:31.640Z",
    "started_at": null,
    "finished_at": null,
    "scheduled_at": null,
    "track_links": true,
    "recurrence": null,
    "next_run_at": null,
    "parent_id": null,
    "last_error": null
  },
  "preview": {
    "encoding": "GSM-7",
    "characters": 114,
    "segments": 1,
    "creditsPerMessage": 1,
    "nonGsm": [],
    "warnings": [
      "Names vary in length, so some recipients may use one more credit than shown."
    ]
  }
}

Needs an API key: Authorization: Bearer sb_... Authentication

Path parameters#

idstringuuidrequired

The campaign id.

Request body#

application/json · required

Only the fields you send change.

namestring

Name, for you only, up to 120 characters.

bodystring

The message, up to 1,600 characters, with any personalisation tags.

Limits: up to 1600 characters.

mediaUrlsarray of stringsuri

https addresses of pictures, replacing the current ones ([] for none).

fromNumberIdstringuuid

The sending number to use.

audienceobject

Who a campaign (or a workflow enrollment) goes to: everyone subscribed, or the people on any of the lists or in any of the segments (a person in several is texted once). Only subscribed contacts are ever texted, and numbers blocked on SMSBlast are left out. Stored as {"all": true} or as {"lists": [...], "segments": [...]}.

Child fields
allboolean

Everyone subscribed. This is what you get when no lists or segments are given.

Always true.

listsarray of stringsuuid

List ids.

segmentsarray of stringsuuid

Segment ids.

trackLinksboolean

Whether links become tracked short links.

Example request body
Request body
{
  "name": "Holiday stollen (final)",
  "audience": {
    "lists": [
      "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
    ]
  }
}

Responses#

200

The draft and a preview of its message.

application/json

campaignobjectrequired

A campaign: one message sent to an audience. Field names are snake_case.

Child fields
idstringuuidrequired

The campaign id.

account_idstringuuidrequired

Your account id.

namestringrequired

Name, for you only (people do not see it).

bodystringrequired

The message as written, with any personalisation tags ({first_name}, {last_name}, {first_name|there}).

media_urlsarray of stringsurirequired

https addresses of pictures sent with the text. With a picture, every text is an MMS costing 3 credits.

from_number_idstringuuidnullablerequired

The sending number the campaign goes out from. Empty for a draft written before the account had a number; the first approved number is used when it is sent.

statusstringrequired

draft can be edited, deleted, sent or made recurring. recurring is a template sent again and again on a schedule (see recurrence); it can be edited and deleted but is never sent itself. sending means it was sent or scheduled and its texts are queued. sent means every text has gone out or ended. canceled means it was stopped with POST /v1/campaigns/{id}/cancel.

One of "draft", "recurring", "sending", "sent", "canceled".

audienceobjectrequired

Who a campaign (or a workflow enrollment) goes to: everyone subscribed, or the people on any of the lists or in any of the segments (a person in several is texted once). Only subscribed contacts are ever texted, and numbers blocked on SMSBlast are left out. Stored as {"all": true} or as {"lists": [...], "segments": [...]}.

Child fields
allboolean

Everyone subscribed. This is what you get when no lists or segments are given.

Always true.

listsarray of stringsuuid

List ids.

segmentsarray of stringsuuid

Segment ids.

recipientsintegerrequired

How many people it was sent to. 0 for a draft.

creditsintegerrequired

Credits taken when it was sent, before any refunds. 0 for a draft.

created_atstringdate-timerequired

When the draft was created.

started_atstringdate-timenullablerequired

When sending started, or the time it is scheduled for.

finished_atstringdate-timenullablerequired

When the last text went out or ended.

scheduled_atstringdate-timenullablerequired

The time it was scheduled for, when it was scheduled with sendAt.

track_linksbooleanrequired

Whether links in the body are swapped for a short tracking link per person (such as https://app.smsblast.net/s/Ab3dEf9), so clicks can be counted.

recurrenceobjectnullablerequired

The schedule of a recurring campaign. Empty for other campaigns.

Child fields
freqstringrequired

How often.

One of "daily", "weekly", "monthly".

intervalinteger

Every 1 to 12 days, weeks or months. Default 1.

Limits: 1 to 12.

timestringrequired

Local time in your account's time zone, HH:MM, between 08:00 and 20:59 (when texts may be sent).

Pattern "^([01]\\d|2[0-3]):[0-5]\\d$".

weekdaysarray of integers

Weekly only: the days of the week, 0 = Sunday to 6 = Saturday. At least one.

monthdayinteger

Monthly only: the day of the month, 1 to 28 (so it exists in every month).

Limits: 1 to 28.

startDatestringdate

The first day it may go out, YYYY-MM-DD in your account's time zone; weeks and months are counted from it. Default today.

endDatestringdatenullable

The last day it may go out, YYYY-MM-DD. Empty for no end.

next_run_atstringdate-timenullablerequired

When a recurring campaign goes out next.

parent_idstringuuidnullablerequired

For a campaign sent by a recurring campaign: the recurring campaign (template) it was copied from.

last_errorstringnullablerequired

For a recurring campaign: why its last occurrence could not go out (for example not enough credits). Empty when it went out.

previewobjectrequired

How a message body will be sent and what it costs.

Child fields
encodingstringrequired

GSM-7: plain text, 160 characters in one SMS segment, 153 per segment once split. UCS-2: the text has a character outside GSM-7 (an emoji, curly quotes, many accents), so 70 characters per segment, 67 once split.

One of "GSM-7", "UCS-2".

charactersintegerrequired

Characters in the body as written.

segmentsintegerrequired

SMS segments, counted with personalisation tags filled in with their fallbacks (or left empty).

creditsPerMessageintegerrequired

Credits one recipient costs: the segments (at least 1), or 3 with a picture.

nonGsmarray of stringsrequired

The characters that forced UCS-2, each once.

warningsarray of stringsrequired

Things worth fixing before sending: no opt-out wording ("Reply STOP to opt out"), characters that shorten each segment, and personalisation that can change the length.

Response headers
X-Request-Idstring Guide

The id of this request (req_...), on every answer. Quote it when you contact support.

X-RateLimit-Limitinteger Guide

Requests allowed per minute with this API key.

X-RateLimit-Remaininginteger Guide

Requests left in the current minute.

X-RateLimit-Resetinteger Guide

When the current minute ends and the count starts again, in Unix seconds.

400

The request was refused because something in it is not valid. error.code is one of:

  • empty_body: body is empty.
  • body_too_long: body is longer than 1,600 characters.
  • invalid_media: A mediaUrls entry is not an https address.
  • invalid_json: The body is not a JSON object.
401

No API key, or one that is not valid or has been revoked (unauthorized).

404

Something the request names does not exist in your account. error.code is one of:

  • not_found: No campaign with that id, or a list or segment in audience does not exist.
  • no_sending_number: The number in fromNumberId does not exist.
409

The request clashes with the current state of things. error.code is one of:

  • not_a_draft: The campaign has already been sent, scheduled or stopped.
429

Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.

Every error has the same body: {"error": {"code", "message", "details", "requestId"}}. See Errors.

Delete a campaign draft

DELETE/v1/campaigns/{id}

Deletes a draft, or a recurring campaign (which ends its schedule; the campaigns it already sent are kept). Campaigns that were sent, scheduled or stopped cannot be deleted.

Request

curl -X DELETE https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64 \
  -H "Authorization: Bearer $SMSBLAST_API_KEY"
const res = await fetch('https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64', {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
  },
});
console.log(res.status, await res.json());
import os

import requests

res = requests.delete(
    "https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response · 200
{
  "ok": true
}

Needs an API key: Authorization: Bearer sb_... Authentication

Path parameters#

idstringuuidrequired

The campaign id.

Responses#

200

Deleted.

application/json

okbooleanrequired

Always true.

Response headers
X-Request-Idstring Guide

The id of this request (req_...), on every answer. Quote it when you contact support.

X-RateLimit-Limitinteger Guide

Requests allowed per minute with this API key.

X-RateLimit-Remaininginteger Guide

Requests left in the current minute.

X-RateLimit-Resetinteger Guide

When the current minute ends and the count starts again, in Unix seconds.

401

No API key, or one that is not valid or has been revoked (unauthorized).

404

Something the request names does not exist in your account. error.code is one of:

  • not_found: No campaign with that id in your account.
409

The request clashes with the current state of things. error.code is one of:

  • not_a_draft: The campaign is not a draft or recurring campaign.
429

Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.

Every error has the same body: {"error": {"code", "message", "details", "requestId"}}. See Errors.

Duplicate a campaign

POST/v1/campaigns/{id}/duplicate

Copies any campaign (sent or not) into a new draft named "<name> (copy)", with the same message, pictures, number, audience and link tracking.

Request

curl -X POST https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64/duplicate \
  -H "Authorization: Bearer $SMSBLAST_API_KEY" \
  -H "Idempotency-Key: $(openssl rand -hex 16)"
const res = await fetch('https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64/duplicate', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
    'Idempotency-Key': crypto.randomUUID(),
  },
});
console.log(res.status, await res.json());
import os
import uuid

import requests

res = requests.post(
    "https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64/duplicate",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
)
print(res.status_code, res.json())
Response · 201
{
  "campaign": {
    "id": "2e6a8c0d-4f1b-4d3e-9a5c-7b9d1f3a5c75",
    "account_id": "5d0c6a2e-8f43-4b8a-9c1d-2e7f4a6b3c10",
    "name": "Holiday stollen (copy)",
    "body": "Hi {first_name|there}! Our holiday stollen is back this weekend: 15% off with code STOLLEN. Reply STOP to opt out.",
    "media_urls": [],
    "from_number_id": "b7e2f1a4-3c5d-4e6f-8a9b-0c1d2e3f4a5b",
    "status": "draft",
    "audience": {
      "lists": [
        "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
      ],
      "segments": [
        "4f2a8c6e-1d3b-4f5a-9e7c-8b0d2f4a6c53"
      ]
    },
    "recipients": 0,
    "credits": 0,
    "created_at": "2026-11-22T19:40:00.512Z",
    "started_at": null,
    "finished_at": null,
    "scheduled_at": null,
    "track_links": true,
    "recurrence": null,
    "next_run_at": null,
    "parent_id": null,
    "last_error": null
  }
}

Needs an API key: Authorization: Bearer sb_... Authentication

Path parameters#

idstringuuidrequired

The campaign id.

Headers#

Idempotency-Keystring Guide

Any unique string up to 200 characters (a UUID works well). If a POST times out or you are not sure it went through, send it again with the same key and the same body: you get the first answer back (with Idempotent-Replayed: true) instead of the work being done twice. Keys are kept for 24 hours per account.

Limits: up to 200 characters.

Example "2b5c4f8e-order-1042".

Responses#

201

The new draft.

application/json

campaignobjectrequired

A campaign: one message sent to an audience. Field names are snake_case.

Child fields
idstringuuidrequired

The campaign id.

account_idstringuuidrequired

Your account id.

namestringrequired

Name, for you only (people do not see it).

bodystringrequired

The message as written, with any personalisation tags ({first_name}, {last_name}, {first_name|there}).

media_urlsarray of stringsurirequired

https addresses of pictures sent with the text. With a picture, every text is an MMS costing 3 credits.

from_number_idstringuuidnullablerequired

The sending number the campaign goes out from. Empty for a draft written before the account had a number; the first approved number is used when it is sent.

statusstringrequired

draft can be edited, deleted, sent or made recurring. recurring is a template sent again and again on a schedule (see recurrence); it can be edited and deleted but is never sent itself. sending means it was sent or scheduled and its texts are queued. sent means every text has gone out or ended. canceled means it was stopped with POST /v1/campaigns/{id}/cancel.

One of "draft", "recurring", "sending", "sent", "canceled".

audienceobjectrequired

Who a campaign (or a workflow enrollment) goes to: everyone subscribed, or the people on any of the lists or in any of the segments (a person in several is texted once). Only subscribed contacts are ever texted, and numbers blocked on SMSBlast are left out. Stored as {"all": true} or as {"lists": [...], "segments": [...]}.

Child fields
allboolean

Everyone subscribed. This is what you get when no lists or segments are given.

Always true.

listsarray of stringsuuid

List ids.

segmentsarray of stringsuuid

Segment ids.

recipientsintegerrequired

How many people it was sent to. 0 for a draft.

creditsintegerrequired

Credits taken when it was sent, before any refunds. 0 for a draft.

created_atstringdate-timerequired

When the draft was created.

started_atstringdate-timenullablerequired

When sending started, or the time it is scheduled for.

finished_atstringdate-timenullablerequired

When the last text went out or ended.

scheduled_atstringdate-timenullablerequired

The time it was scheduled for, when it was scheduled with sendAt.

track_linksbooleanrequired

Whether links in the body are swapped for a short tracking link per person (such as https://app.smsblast.net/s/Ab3dEf9), so clicks can be counted.

recurrenceobjectnullablerequired

The schedule of a recurring campaign. Empty for other campaigns.

Child fields
freqstringrequired

How often.

One of "daily", "weekly", "monthly".

intervalinteger

Every 1 to 12 days, weeks or months. Default 1.

Limits: 1 to 12.

timestringrequired

Local time in your account's time zone, HH:MM, between 08:00 and 20:59 (when texts may be sent).

Pattern "^([01]\\d|2[0-3]):[0-5]\\d$".

weekdaysarray of integers

Weekly only: the days of the week, 0 = Sunday to 6 = Saturday. At least one.

monthdayinteger

Monthly only: the day of the month, 1 to 28 (so it exists in every month).

Limits: 1 to 28.

startDatestringdate

The first day it may go out, YYYY-MM-DD in your account's time zone; weeks and months are counted from it. Default today.

endDatestringdatenullable

The last day it may go out, YYYY-MM-DD. Empty for no end.

next_run_atstringdate-timenullablerequired

When a recurring campaign goes out next.

parent_idstringuuidnullablerequired

For a campaign sent by a recurring campaign: the recurring campaign (template) it was copied from.

last_errorstringnullablerequired

For a recurring campaign: why its last occurrence could not go out (for example not enough credits). Empty when it went out.

Response headers
X-Request-Idstring Guide

The id of this request (req_...), on every answer. Quote it when you contact support.

X-RateLimit-Limitinteger Guide

Requests allowed per minute with this API key.

X-RateLimit-Remaininginteger Guide

Requests left in the current minute.

X-RateLimit-Resetinteger Guide

When the current minute ends and the count starts again, in Unix seconds.

Idempotent-Replayedstring Guide

true when this is the stored answer to an earlier request with the same Idempotency-Key, not a new one.

One of "true".

400

The request was refused because something in it is not valid. error.code is one of:

  • invalid_idempotency_key: The Idempotency-Key header is longer than 200 characters.
401

No API key, or one that is not valid or has been revoked (unauthorized).

404

Something the request names does not exist in your account. error.code is one of:

  • not_found: No campaign with that id in your account.
409

The request clashes with the current state of things. error.code is one of:

  • idempotency_in_progress: A request with the same Idempotency-Key is still running. Try again in a moment.
422

This Idempotency-Key was already used for a different request (another path or body) in the last 24 hours (idempotency_key_reused). Use a new key for each new request.

429

Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.

Every error has the same body: {"error": {"code", "message", "details", "requestId"}}. See Errors.

Stop a campaign

POST/v1/campaigns/{id}/cancel

Stops a campaign that is scheduled or still going out. Every text not yet handed to the carrier is cancelled (it becomes skipped, with the error "The campaign was stopped") and its credits are given back at once. Texts already on their way are not recalled.

The campaign becomes canceled. It cannot be sent again, but you can duplicate it. No campaign.sent webhook follows.

Request

curl -X POST https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64/cancel \
  -H "Authorization: Bearer $SMSBLAST_API_KEY" \
  -H "Idempotency-Key: $(openssl rand -hex 16)"
const res = await fetch('https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64/cancel', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
    'Idempotency-Key': crypto.randomUUID(),
  },
});
console.log(res.status, await res.json());
import os
import uuid

import requests

res = requests.post(
    "https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64/cancel",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
)
print(res.status_code, res.json())
Response · 200
{
  "campaign": {
    "id": "c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64",
    "account_id": "5d0c6a2e-8f43-4b8a-9c1d-2e7f4a6b3c10",
    "name": "Holiday stollen",
    "body": "Hi {first_name|there}! Our holiday stollen is back this weekend: 15% off with code STOLLEN. Reply STOP to opt out.",
    "media_urls": [],
    "from_number_id": "b7e2f1a4-3c5d-4e6f-8a9b-0c1d2e3f4a5b",
    "status": "canceled",
    "audience": {
      "lists": [
        "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
      ],
      "segments": [
        "4f2a8c6e-1d3b-4f5a-9e7c-8b0d2f4a6c53"
      ]
    },
    "recipients": 1284,
    "credits": 1290,
    "created_at": "2026-11-18T22:05:31.640Z",
    "started_at": "2026-11-21T17:00:00.000Z",
    "finished_at": "2026-11-21T09:12:40.118Z",
    "scheduled_at": "2026-11-21T17:00:00.000Z",
    "track_links": true,
    "recurrence": null,
    "next_run_at": null,
    "parent_id": null,
    "last_error": null
  },
  "canceled": 1284,
  "creditsReturned": 1290
}

Needs an API key: Authorization: Bearer sb_... Authentication

Path parameters#

idstringuuidrequired

The campaign id.

Headers#

Idempotency-Keystring Guide

Any unique string up to 200 characters (a UUID works well). If a POST times out or you are not sure it went through, send it again with the same key and the same body: you get the first answer back (with Idempotent-Replayed: true) instead of the work being done twice. Keys are kept for 24 hours per account.

Limits: up to 200 characters.

Example "2b5c4f8e-order-1042".

Responses#

200

The stopped campaign.

application/json

campaignobjectrequired

A campaign: one message sent to an audience. Field names are snake_case.

Child fields
idstringuuidrequired

The campaign id.

account_idstringuuidrequired

Your account id.

namestringrequired

Name, for you only (people do not see it).

bodystringrequired

The message as written, with any personalisation tags ({first_name}, {last_name}, {first_name|there}).

media_urlsarray of stringsurirequired

https addresses of pictures sent with the text. With a picture, every text is an MMS costing 3 credits.

from_number_idstringuuidnullablerequired

The sending number the campaign goes out from. Empty for a draft written before the account had a number; the first approved number is used when it is sent.

statusstringrequired

draft can be edited, deleted, sent or made recurring. recurring is a template sent again and again on a schedule (see recurrence); it can be edited and deleted but is never sent itself. sending means it was sent or scheduled and its texts are queued. sent means every text has gone out or ended. canceled means it was stopped with POST /v1/campaigns/{id}/cancel.

One of "draft", "recurring", "sending", "sent", "canceled".

audienceobjectrequired

Who a campaign (or a workflow enrollment) goes to: everyone subscribed, or the people on any of the lists or in any of the segments (a person in several is texted once). Only subscribed contacts are ever texted, and numbers blocked on SMSBlast are left out. Stored as {"all": true} or as {"lists": [...], "segments": [...]}.

Child fields
allboolean

Everyone subscribed. This is what you get when no lists or segments are given.

Always true.

listsarray of stringsuuid

List ids.

segmentsarray of stringsuuid

Segment ids.

recipientsintegerrequired

How many people it was sent to. 0 for a draft.

creditsintegerrequired

Credits taken when it was sent, before any refunds. 0 for a draft.

created_atstringdate-timerequired

When the draft was created.

started_atstringdate-timenullablerequired

When sending started, or the time it is scheduled for.

finished_atstringdate-timenullablerequired

When the last text went out or ended.

scheduled_atstringdate-timenullablerequired

The time it was scheduled for, when it was scheduled with sendAt.

track_linksbooleanrequired

Whether links in the body are swapped for a short tracking link per person (such as https://app.smsblast.net/s/Ab3dEf9), so clicks can be counted.

recurrenceobjectnullablerequired

The schedule of a recurring campaign. Empty for other campaigns.

Child fields
freqstringrequired

How often.

One of "daily", "weekly", "monthly".

intervalinteger

Every 1 to 12 days, weeks or months. Default 1.

Limits: 1 to 12.

timestringrequired

Local time in your account's time zone, HH:MM, between 08:00 and 20:59 (when texts may be sent).

Pattern "^([01]\\d|2[0-3]):[0-5]\\d$".

weekdaysarray of integers

Weekly only: the days of the week, 0 = Sunday to 6 = Saturday. At least one.

monthdayinteger

Monthly only: the day of the month, 1 to 28 (so it exists in every month).

Limits: 1 to 28.

startDatestringdate

The first day it may go out, YYYY-MM-DD in your account's time zone; weeks and months are counted from it. Default today.

endDatestringdatenullable

The last day it may go out, YYYY-MM-DD. Empty for no end.

next_run_atstringdate-timenullablerequired

When a recurring campaign goes out next.

parent_idstringuuidnullablerequired

For a campaign sent by a recurring campaign: the recurring campaign (template) it was copied from.

last_errorstringnullablerequired

For a recurring campaign: why its last occurrence could not go out (for example not enough credits). Empty when it went out.

canceledintegerrequired

Texts that had not gone out yet and now never will (they are skipped).

creditsReturnedintegerrequired

Credits given back for those texts.

Response headers
X-Request-Idstring Guide

The id of this request (req_...), on every answer. Quote it when you contact support.

X-RateLimit-Limitinteger Guide

Requests allowed per minute with this API key.

X-RateLimit-Remaininginteger Guide

Requests left in the current minute.

X-RateLimit-Resetinteger Guide

When the current minute ends and the count starts again, in Unix seconds.

Idempotent-Replayedstring Guide

true when this is the stored answer to an earlier request with the same Idempotency-Key, not a new one.

One of "true".

400

The request was refused because something in it is not valid. error.code is one of:

  • invalid_idempotency_key: The Idempotency-Key header is longer than 200 characters.
401

No API key, or one that is not valid or has been revoked (unauthorized).

404

Something the request names does not exist in your account. error.code is one of:

  • not_found: No campaign with that id in your account.
409

The request clashes with the current state of things. error.code is one of:

  • not_sending: The campaign is not scheduled or going out (it is a draft, a recurring campaign, already sent, or already stopped).
  • idempotency_in_progress: A request with the same Idempotency-Key is still running. Try again in a moment.
422

This Idempotency-Key was already used for a different request (another path or body) in the last 24 hours (idempotency_key_reused). Use a new key for each new request.

429

Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.

Every error has the same body: {"error": {"code", "message", "details", "requestId"}}. See Errors.

Make a campaign recurring

POST/v1/campaigns/{id}/recurring

Turns a draft into a recurring campaign, or changes the schedule of one: daily, weekly on chosen days, or monthly on a day of the month, at a time of day in your account's time zone (between 8:00 and 20:59).

A recurring campaign is a template and never sends itself. At each occurrence a copy named "<name> · Nov 21" (with parent_id set to the template) is made and sent to the audience as it is at that moment, by the same rules as POST /v1/campaigns/{id}/send: credits for the whole send taken at once, only subscribed people, each in their sending hours. If a copy cannot go out (not enough credits, nobody subscribed, no approved number), it is dropped, the reason is kept in the template's last_error and the series carries on with the next date. When the schedule reaches its endDate, the template goes back to being a draft.

Request

curl -X POST https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64/recurring \
  -H "Authorization: Bearer $SMSBLAST_API_KEY" \
  -H "Idempotency-Key: $(openssl rand -hex 16)" \
  -H "Content-Type: application/json" \
  -d '{
    "recurrence": {
      "freq": "weekly",
      "interval": 1,
      "weekdays": [
        5
      ],
      "time": "10:00",
      "startDate": "2026-11-27",
      "endDate": "2027-02-26"
    }
  }'
const res = await fetch('https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64/recurring', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
    'Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    recurrence: {
      freq: 'weekly',
      interval: 1,
      weekdays: [5],
      time: '10:00',
      startDate: '2026-11-27',
      endDate: '2027-02-26',
    },
  }),
});
console.log(res.status, await res.json());
import os
import uuid

import requests

res = requests.post(
    "https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64/recurring",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "recurrence": {
            "freq": "weekly",
            "interval": 1,
            "weekdays": [5],
            "time": "10:00",
            "startDate": "2026-11-27",
            "endDate": "2027-02-26",
        },
    },
)
print(res.status_code, res.json())
Response · 200
{
  "campaign": {
    "id": "c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64",
    "account_id": "5d0c6a2e-8f43-4b8a-9c1d-2e7f4a6b3c10",
    "name": "Friday bread drop",
    "body": "Hi {first_name|there}! Our holiday stollen is back this weekend: 15% off with code STOLLEN. Reply STOP to opt out.",
    "media_urls": [],
    "from_number_id": "b7e2f1a4-3c5d-4e6f-8a9b-0c1d2e3f4a5b",
    "status": "recurring",
    "audience": {
      "lists": [
        "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
      ],
      "segments": [
        "4f2a8c6e-1d3b-4f5a-9e7c-8b0d2f4a6c53"
      ]
    },
    "recipients": 0,
    "credits": 0,
    "created_at": "2026-11-18T22:05:31.640Z",
    "started_at": null,
    "finished_at": null,
    "scheduled_at": null,
    "track_links": true,
    "recurrence": {
      "freq": "weekly",
      "interval": 1,
      "time": "10:00",
      "startDate": "2026-11-27",
      "endDate": "2027-02-26",
      "weekdays": [
        5
      ]
    },
    "next_run_at": "2026-11-27T18:00:00.000Z",
    "parent_id": null,
    "last_error": null
  }
}

Needs an API key: Authorization: Bearer sb_... Authentication

Path parameters#

idstringuuidrequired

The campaign id.

Headers#

Idempotency-Keystring Guide

Any unique string up to 200 characters (a UUID works well). If a POST times out or you are not sure it went through, send it again with the same key and the same body: you get the first answer back (with Idempotent-Replayed: true) instead of the work being done twice. Keys are kept for 24 hours per account.

Limits: up to 200 characters.

Example "2b5c4f8e-order-1042".

Request body#

application/json · required

recurrenceobjectrequired

When a recurring campaign goes out.

Child fields
freqstringrequired

How often.

One of "daily", "weekly", "monthly".

intervalinteger

Every 1 to 12 days, weeks or months. Default 1.

Limits: 1 to 12.

timestringrequired

Local time in your account's time zone, HH:MM, between 08:00 and 20:59 (when texts may be sent).

Pattern "^([01]\\d|2[0-3]):[0-5]\\d$".

weekdaysarray of integers

Weekly only: the days of the week, 0 = Sunday to 6 = Saturday. At least one.

monthdayinteger

Monthly only: the day of the month, 1 to 28 (so it exists in every month).

Limits: 1 to 28.

startDatestringdate

The first day it may go out, YYYY-MM-DD in your account's time zone; weeks and months are counted from it. Default today.

endDatestringdatenullable

The last day it may go out, YYYY-MM-DD. Empty for no end.

Example request body
Request body
{
  "recurrence": {
    "freq": "weekly",
    "interval": 1,
    "weekdays": [
      5
    ],
    "time": "10:00",
    "startDate": "2026-11-27",
    "endDate": "2027-02-26"
  }
}

Responses#

200

The recurring campaign.

application/json

campaignobjectrequired

A campaign: one message sent to an audience. Field names are snake_case.

Child fields
idstringuuidrequired

The campaign id.

account_idstringuuidrequired

Your account id.

namestringrequired

Name, for you only (people do not see it).

bodystringrequired

The message as written, with any personalisation tags ({first_name}, {last_name}, {first_name|there}).

media_urlsarray of stringsurirequired

https addresses of pictures sent with the text. With a picture, every text is an MMS costing 3 credits.

from_number_idstringuuidnullablerequired

The sending number the campaign goes out from. Empty for a draft written before the account had a number; the first approved number is used when it is sent.

statusstringrequired

draft can be edited, deleted, sent or made recurring. recurring is a template sent again and again on a schedule (see recurrence); it can be edited and deleted but is never sent itself. sending means it was sent or scheduled and its texts are queued. sent means every text has gone out or ended. canceled means it was stopped with POST /v1/campaigns/{id}/cancel.

One of "draft", "recurring", "sending", "sent", "canceled".

audienceobjectrequired

Who a campaign (or a workflow enrollment) goes to: everyone subscribed, or the people on any of the lists or in any of the segments (a person in several is texted once). Only subscribed contacts are ever texted, and numbers blocked on SMSBlast are left out. Stored as {"all": true} or as {"lists": [...], "segments": [...]}.

Child fields
allboolean

Everyone subscribed. This is what you get when no lists or segments are given.

Always true.

listsarray of stringsuuid

List ids.

segmentsarray of stringsuuid

Segment ids.

recipientsintegerrequired

How many people it was sent to. 0 for a draft.

creditsintegerrequired

Credits taken when it was sent, before any refunds. 0 for a draft.

created_atstringdate-timerequired

When the draft was created.

started_atstringdate-timenullablerequired

When sending started, or the time it is scheduled for.

finished_atstringdate-timenullablerequired

When the last text went out or ended.

scheduled_atstringdate-timenullablerequired

The time it was scheduled for, when it was scheduled with sendAt.

track_linksbooleanrequired

Whether links in the body are swapped for a short tracking link per person (such as https://app.smsblast.net/s/Ab3dEf9), so clicks can be counted.

recurrenceobjectnullablerequired

The schedule of a recurring campaign. Empty for other campaigns.

Child fields
freqstringrequired

How often.

One of "daily", "weekly", "monthly".

intervalinteger

Every 1 to 12 days, weeks or months. Default 1.

Limits: 1 to 12.

timestringrequired

Local time in your account's time zone, HH:MM, between 08:00 and 20:59 (when texts may be sent).

Pattern "^([01]\\d|2[0-3]):[0-5]\\d$".

weekdaysarray of integers

Weekly only: the days of the week, 0 = Sunday to 6 = Saturday. At least one.

monthdayinteger

Monthly only: the day of the month, 1 to 28 (so it exists in every month).

Limits: 1 to 28.

startDatestringdate

The first day it may go out, YYYY-MM-DD in your account's time zone; weeks and months are counted from it. Default today.

endDatestringdatenullable

The last day it may go out, YYYY-MM-DD. Empty for no end.

next_run_atstringdate-timenullablerequired

When a recurring campaign goes out next.

parent_idstringuuidnullablerequired

For a campaign sent by a recurring campaign: the recurring campaign (template) it was copied from.

last_errorstringnullablerequired

For a recurring campaign: why its last occurrence could not go out (for example not enough credits). Empty when it went out.

Response headers
X-Request-Idstring Guide

The id of this request (req_...), on every answer. Quote it when you contact support.

X-RateLimit-Limitinteger Guide

Requests allowed per minute with this API key.

X-RateLimit-Remaininginteger Guide

Requests left in the current minute.

X-RateLimit-Resetinteger Guide

When the current minute ends and the count starts again, in Unix seconds.

Idempotent-Replayedstring Guide

true when this is the stored answer to an earlier request with the same Idempotency-Key, not a new one.

One of "true".

400

The request was refused because something in it is not valid. error.code is one of:

  • invalid_recurrence: The schedule is not valid (the message says what to fix), or it has no dates left.
  • invalid_json: The body is not a JSON object.
  • invalid_idempotency_key: The Idempotency-Key header is longer than 200 characters.
401

No API key, or one that is not valid or has been revoked (unauthorized).

404

Something the request names does not exist in your account. error.code is one of:

  • not_found: No campaign with that id in your account.
409

The request clashes with the current state of things. error.code is one of:

  • not_a_draft: The campaign is not a draft or recurring campaign, or it is an occurrence sent by one.
  • idempotency_in_progress: A request with the same Idempotency-Key is still running. Try again in a moment.
422

This Idempotency-Key was already used for a different request (another path or body) in the last 24 hours (idempotency_key_reused). Use a new key for each new request.

429

Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.

Every error has the same body: {"error": {"code", "message", "details", "requestId"}}. See Errors.

Stop a recurring campaign

DELETE/v1/campaigns/{id}/recurring

Stops the schedule. The campaign becomes a draft again (with its last schedule kept in recurrence); the campaigns it already sent stay as they are.

Request

curl -X DELETE https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64/recurring \
  -H "Authorization: Bearer $SMSBLAST_API_KEY"
const res = await fetch('https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64/recurring', {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
  },
});
console.log(res.status, await res.json());
import os

import requests

res = requests.delete(
    "https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64/recurring",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response · 200
{
  "campaign": {
    "id": "c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64",
    "account_id": "5d0c6a2e-8f43-4b8a-9c1d-2e7f4a6b3c10",
    "name": "Friday bread drop",
    "body": "Hi {first_name|there}! Our holiday stollen is back this weekend: 15% off with code STOLLEN. Reply STOP to opt out.",
    "media_urls": [],
    "from_number_id": "b7e2f1a4-3c5d-4e6f-8a9b-0c1d2e3f4a5b",
    "status": "draft",
    "audience": {
      "lists": [
        "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
      ],
      "segments": [
        "4f2a8c6e-1d3b-4f5a-9e7c-8b0d2f4a6c53"
      ]
    },
    "recipients": 0,
    "credits": 0,
    "created_at": "2026-11-18T22:05:31.640Z",
    "started_at": null,
    "finished_at": null,
    "scheduled_at": null,
    "track_links": true,
    "recurrence": {
      "freq": "weekly",
      "interval": 1,
      "time": "10:00",
      "startDate": "2026-11-27",
      "endDate": "2027-02-26",
      "weekdays": [
        5
      ]
    },
    "next_run_at": null,
    "parent_id": null,
    "last_error": null
  }
}

Needs an API key: Authorization: Bearer sb_... Authentication

Path parameters#

idstringuuidrequired

The campaign id.

Responses#

200

The campaign, a draft again.

application/json

campaignobjectrequired

A campaign: one message sent to an audience. Field names are snake_case.

Child fields
idstringuuidrequired

The campaign id.

account_idstringuuidrequired

Your account id.

namestringrequired

Name, for you only (people do not see it).

bodystringrequired

The message as written, with any personalisation tags ({first_name}, {last_name}, {first_name|there}).

media_urlsarray of stringsurirequired

https addresses of pictures sent with the text. With a picture, every text is an MMS costing 3 credits.

from_number_idstringuuidnullablerequired

The sending number the campaign goes out from. Empty for a draft written before the account had a number; the first approved number is used when it is sent.

statusstringrequired

draft can be edited, deleted, sent or made recurring. recurring is a template sent again and again on a schedule (see recurrence); it can be edited and deleted but is never sent itself. sending means it was sent or scheduled and its texts are queued. sent means every text has gone out or ended. canceled means it was stopped with POST /v1/campaigns/{id}/cancel.

One of "draft", "recurring", "sending", "sent", "canceled".

audienceobjectrequired

Who a campaign (or a workflow enrollment) goes to: everyone subscribed, or the people on any of the lists or in any of the segments (a person in several is texted once). Only subscribed contacts are ever texted, and numbers blocked on SMSBlast are left out. Stored as {"all": true} or as {"lists": [...], "segments": [...]}.

Child fields
allboolean

Everyone subscribed. This is what you get when no lists or segments are given.

Always true.

listsarray of stringsuuid

List ids.

segmentsarray of stringsuuid

Segment ids.

recipientsintegerrequired

How many people it was sent to. 0 for a draft.

creditsintegerrequired

Credits taken when it was sent, before any refunds. 0 for a draft.

created_atstringdate-timerequired

When the draft was created.

started_atstringdate-timenullablerequired

When sending started, or the time it is scheduled for.

finished_atstringdate-timenullablerequired

When the last text went out or ended.

scheduled_atstringdate-timenullablerequired

The time it was scheduled for, when it was scheduled with sendAt.

track_linksbooleanrequired

Whether links in the body are swapped for a short tracking link per person (such as https://app.smsblast.net/s/Ab3dEf9), so clicks can be counted.

recurrenceobjectnullablerequired

The schedule of a recurring campaign. Empty for other campaigns.

Child fields
freqstringrequired

How often.

One of "daily", "weekly", "monthly".

intervalinteger

Every 1 to 12 days, weeks or months. Default 1.

Limits: 1 to 12.

timestringrequired

Local time in your account's time zone, HH:MM, between 08:00 and 20:59 (when texts may be sent).

Pattern "^([01]\\d|2[0-3]):[0-5]\\d$".

weekdaysarray of integers

Weekly only: the days of the week, 0 = Sunday to 6 = Saturday. At least one.

monthdayinteger

Monthly only: the day of the month, 1 to 28 (so it exists in every month).

Limits: 1 to 28.

startDatestringdate

The first day it may go out, YYYY-MM-DD in your account's time zone; weeks and months are counted from it. Default today.

endDatestringdatenullable

The last day it may go out, YYYY-MM-DD. Empty for no end.

next_run_atstringdate-timenullablerequired

When a recurring campaign goes out next.

parent_idstringuuidnullablerequired

For a campaign sent by a recurring campaign: the recurring campaign (template) it was copied from.

last_errorstringnullablerequired

For a recurring campaign: why its last occurrence could not go out (for example not enough credits). Empty when it went out.

Response headers
X-Request-Idstring Guide

The id of this request (req_...), on every answer. Quote it when you contact support.

X-RateLimit-Limitinteger Guide

Requests allowed per minute with this API key.

X-RateLimit-Remaininginteger Guide

Requests left in the current minute.

X-RateLimit-Resetinteger Guide

When the current minute ends and the count starts again, in Unix seconds.

401

No API key, or one that is not valid or has been revoked (unauthorized).

404

Something the request names does not exist in your account. error.code is one of:

  • not_found: No campaign with that id in your account.
409

The request clashes with the current state of things. error.code is one of:

  • not_recurring: The campaign is not recurring.
429

Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.

Every error has the same body: {"error": {"code", "message", "details", "requestId"}}. See Errors.

Send or schedule a campaign

POST/v1/campaigns/{id}/send

Sends a draft now, or at sendAt (up to a year ahead). The audience is worked out at this moment: everyone subscribed in it gets one text, personalised for them (numbers blocked on SMSBlast are left out).

The credits for every text are taken now, all or nothing: if your balance is too low nothing is sent (insufficient_credits, with needed, available and recipients). Texts that cannot be delivered to the carrier, or are skipped because the person opted out before their text went out, get their credits back.

Sending hours: each text waits until 8am to 9pm in the recipient's time zone (their contact time zone, else your account's), so a campaign sent in the evening reaches some people the next morning.

The campaign becomes sending at once (also when scheduled) and sent when its last text has gone out; the campaign.sending and campaign.sent webhooks tell you. To stop a scheduled campaign, or one still going out, use POST /v1/campaigns/{id}/cancel. The body is optional: send none (or {}) to send now.

Request

curl -X POST https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64/send \
  -H "Authorization: Bearer $SMSBLAST_API_KEY" \
  -H "Idempotency-Key: $(openssl rand -hex 16)" \
  -H "Content-Type: application/json" \
  -d '{
    "sendAt": "2026-11-28T17:00:00Z"
  }'
const res = await fetch('https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64/send', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
    'Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    sendAt: '2026-11-28T17:00:00Z',
  }),
});
console.log(res.status, await res.json());
import os
import uuid

import requests

res = requests.post(
    "https://app.smsblast.net/v1/campaigns/c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64/send",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "sendAt": "2026-11-28T17:00:00Z",
    },
)
print(res.status_code, res.json())
Response · 200
{
  "campaign": {
    "id": "c8d2e4f6-a1b3-4c5d-8e7f-9a0b1c2d3e64",
    "account_id": "5d0c6a2e-8f43-4b8a-9c1d-2e7f4a6b3c10",
    "name": "Holiday stollen",
    "body": "Hi {first_name|there}! Our holiday stollen is back this weekend: 15% off with code STOLLEN. Reply STOP to opt out.",
    "media_urls": [],
    "from_number_id": "b7e2f1a4-3c5d-4e6f-8a9b-0c1d2e3f4a5b",
    "status": "sending",
    "audience": {
      "lists": [
        "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
      ],
      "segments": [
        "4f2a8c6e-1d3b-4f5a-9e7c-8b0d2f4a6c53"
      ]
    },
    "recipients": 1284,
    "credits": 1290,
    "created_at": "2026-11-18T22:05:31.640Z",
    "started_at": "2026-11-28T17:00:00.000Z",
    "finished_at": null,
    "scheduled_at": "2026-11-28T17:00:00.000Z",
    "track_links": true,
    "recurrence": null,
    "next_run_at": null,
    "parent_id": null,
    "last_error": null
  },
  "recipients": 1284,
  "credits": 1290,
  "balanceAfter": 2920
}

Needs an API key: Authorization: Bearer sb_... Authentication

Path parameters#

idstringuuidrequired

The campaign id.

Headers#

Idempotency-Keystring Guide

Any unique string up to 200 characters (a UUID works well). If a POST times out or you are not sure it went through, send it again with the same key and the same body: you get the first answer back (with Idempotent-Replayed: true) instead of the work being done twice. Keys are kept for 24 hours per account.

Limits: up to 200 characters.

Example "2b5c4f8e-order-1042".

Request body#

application/json

sendAtstringdate-timenullable

Schedule it, up to a year ahead, for example 2026-11-28T17:00:00Z. Leave it out (or send no body) to send now.

Example request body
Request body
{
  "sendAt": "2026-11-28T17:00:00Z"
}

Responses#

200

The campaign, now sending.

application/json

campaignobjectrequired

A campaign: one message sent to an audience. Field names are snake_case.

Child fields
idstringuuidrequired

The campaign id.

account_idstringuuidrequired

Your account id.

namestringrequired

Name, for you only (people do not see it).

bodystringrequired

The message as written, with any personalisation tags ({first_name}, {last_name}, {first_name|there}).

media_urlsarray of stringsurirequired

https addresses of pictures sent with the text. With a picture, every text is an MMS costing 3 credits.

from_number_idstringuuidnullablerequired

The sending number the campaign goes out from. Empty for a draft written before the account had a number; the first approved number is used when it is sent.

statusstringrequired

draft can be edited, deleted, sent or made recurring. recurring is a template sent again and again on a schedule (see recurrence); it can be edited and deleted but is never sent itself. sending means it was sent or scheduled and its texts are queued. sent means every text has gone out or ended. canceled means it was stopped with POST /v1/campaigns/{id}/cancel.

One of "draft", "recurring", "sending", "sent", "canceled".

audienceobjectrequired

Who a campaign (or a workflow enrollment) goes to: everyone subscribed, or the people on any of the lists or in any of the segments (a person in several is texted once). Only subscribed contacts are ever texted, and numbers blocked on SMSBlast are left out. Stored as {"all": true} or as {"lists": [...], "segments": [...]}.

Child fields
allboolean

Everyone subscribed. This is what you get when no lists or segments are given.

Always true.

listsarray of stringsuuid

List ids.

segmentsarray of stringsuuid

Segment ids.

recipientsintegerrequired

How many people it was sent to. 0 for a draft.

creditsintegerrequired

Credits taken when it was sent, before any refunds. 0 for a draft.

created_atstringdate-timerequired

When the draft was created.

started_atstringdate-timenullablerequired

When sending started, or the time it is scheduled for.

finished_atstringdate-timenullablerequired

When the last text went out or ended.

scheduled_atstringdate-timenullablerequired

The time it was scheduled for, when it was scheduled with sendAt.

track_linksbooleanrequired

Whether links in the body are swapped for a short tracking link per person (such as https://app.smsblast.net/s/Ab3dEf9), so clicks can be counted.

recurrenceobjectnullablerequired

The schedule of a recurring campaign. Empty for other campaigns.

Child fields
freqstringrequired

How often.

One of "daily", "weekly", "monthly".

intervalinteger

Every 1 to 12 days, weeks or months. Default 1.

Limits: 1 to 12.

timestringrequired

Local time in your account's time zone, HH:MM, between 08:00 and 20:59 (when texts may be sent).

Pattern "^([01]\\d|2[0-3]):[0-5]\\d$".

weekdaysarray of integers

Weekly only: the days of the week, 0 = Sunday to 6 = Saturday. At least one.

monthdayinteger

Monthly only: the day of the month, 1 to 28 (so it exists in every month).

Limits: 1 to 28.

startDatestringdate

The first day it may go out, YYYY-MM-DD in your account's time zone; weeks and months are counted from it. Default today.

endDatestringdatenullable

The last day it may go out, YYYY-MM-DD. Empty for no end.

next_run_atstringdate-timenullablerequired

When a recurring campaign goes out next.

parent_idstringuuidnullablerequired

For a campaign sent by a recurring campaign: the recurring campaign (template) it was copied from.

last_errorstringnullablerequired

For a recurring campaign: why its last occurrence could not go out (for example not enough credits). Empty when it went out.

recipientsintegerrequired

People it is going to.

creditsintegerrequired

Credits taken.

balanceAfterintegerrequired

Your credit balance afterwards.

Response headers
X-Request-Idstring Guide

The id of this request (req_...), on every answer. Quote it when you contact support.

X-RateLimit-Limitinteger Guide

Requests allowed per minute with this API key.

X-RateLimit-Remaininginteger Guide

Requests left in the current minute.

X-RateLimit-Resetinteger Guide

When the current minute ends and the count starts again, in Unix seconds.

Idempotent-Replayedstring Guide

true when this is the stored answer to an earlier request with the same Idempotency-Key, not a new one.

One of "true".

400

The request was refused because something in it is not valid. error.code is one of:

  • invalid_send_at: sendAt is not a date and time, is in the past, or is more than a year ahead.
  • invalid_json: The body is not a JSON object.
  • invalid_idempotency_key: The Idempotency-Key header is longer than 200 characters.
401

No API key, or one that is not valid or has been revoked (unauthorized).

402

Sending is not possible right now. error.code is one of:

  • insufficient_credits: Not enough credits for every text. error.details has needed, available and recipients.
  • trial_ended: The 14-day free trial is over. Choose a plan on the Billing page of the dashboard to keep sending.
  • plan_required: Your paid plan has ended. Choose a plan on the Billing page of the dashboard to keep sending.
404

Something the request names does not exist in your account. error.code is one of:

  • not_found: No campaign with that id in your account.
409

The request clashes with the current state of things. error.code is one of:

  • already_sent: The campaign is not a draft: it was already sent, scheduled or stopped.
  • recurring: It is a recurring campaign, which only sends on its schedule. Stop the schedule (DELETE /v1/campaigns/{id}/recurring) to send it by hand.
  • number_not_active: The campaign's number is not approved yet (details.numberStatus says what it is), or you have no number.
  • no_recipients: Nobody subscribed is in the audience.
  • idempotency_in_progress: A request with the same Idempotency-Key is still running. Try again in a moment.
422

This Idempotency-Key was already used for a different request (another path or body) in the last 24 hours (idempotency_key_reused). Use a new key for each new request.

429

Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.

Every error has the same body: {"error": {"code", "message", "details", "requestId"}}. See Errors.