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).
- GET
/v1/campaignsList campaigns - POST
/v1/campaignsCreate a campaign draft - POST
/v1/campaigns/estimateEstimate a campaign - POST
/v1/campaigns/testSend a test text - GET
/v1/campaigns/{id}Get a campaign report - PATCH
/v1/campaigns/{id}Update a campaign draft - DELETE
/v1/campaigns/{id}Delete a campaign draft - POST
/v1/campaigns/{id}/duplicateDuplicate a campaign - POST
/v1/campaigns/{id}/cancelStop a campaign - POST
/v1/campaigns/{id}/recurringMake a campaign recurring - DELETE
/v1/campaigns/{id}/recurringStop a recurring campaign - POST
/v1/campaigns/{id}/sendSend or schedule a campaign
List campaigns
/v1/campaignsYour 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()){
"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#
statusstringOnly campaigns with this status. Other values are ignored.
searchstringOnly campaigns whose name contains this text (ignoring case).
Responses#
Campaigns.
application/json
campaignsarray of objectsrequiredMost recent first.
Fields of each item
idstringuuidrequiredThe campaign id.
account_idstringuuidrequiredYour account id.
namestringrequiredName, for you only (people do not see it).
bodystringrequiredThe message as written, with any personalisation tags ({first_name}, {last_name}, {first_name|there}).
media_urlsarray of stringsurirequiredhttps addresses of pictures sent with the text. With a picture, every text is an MMS costing 3 credits.
from_number_idstringuuidnullablerequiredThe 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.
statusstringrequireddraft 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.
audienceobjectrequiredWho 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
allbooleanEveryone subscribed. This is what you get when no lists or segments are given.
listsarray of stringsuuidList ids.
segmentsarray of stringsuuidSegment ids.
recipientsintegerrequiredHow many people it was sent to. 0 for a draft.
creditsintegerrequiredCredits taken when it was sent, before any refunds. 0 for a draft.
created_atstringdate-timerequiredWhen the draft was created.
started_atstringdate-timenullablerequiredWhen sending started, or the time it is scheduled for.
finished_atstringdate-timenullablerequiredWhen the last text went out or ended.
scheduled_atstringdate-timenullablerequiredThe time it was scheduled for, when it was scheduled with sendAt.
track_linksbooleanrequiredWhether 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.
recurrenceobjectnullablerequiredThe schedule of a recurring campaign. Empty for other campaigns.
Child fields
freqstringrequiredHow often.
intervalintegerEvery 1 to 12 days, weeks or months. Default 1.
timestringrequiredLocal time in your account's time zone, HH:MM, between 08:00 and 20:59 (when texts may be sent).
weekdaysarray of integersWeekly only: the days of the week, 0 = Sunday to 6 = Saturday. At least one.
monthdayintegerMonthly only: the day of the month, 1 to 28 (so it exists in every month).
startDatestringdateThe first day it may go out, YYYY-MM-DD in your account's time zone; weeks and months are counted from it. Default today.
endDatestringdatenullableThe last day it may go out, YYYY-MM-DD. Empty for no end.
next_run_atstringdate-timenullablerequiredWhen a recurring campaign goes out next.
parent_idstringuuidnullablerequiredFor a campaign sent by a recurring campaign: the recurring campaign (template) it was copied from.
last_errorstringnullablerequiredFor a recurring campaign: why its last occurrence could not go out (for example not enough credits). Empty when it went out.
deliveredintegerrequiredTexts confirmed delivered.
failedintegerrequiredTexts that failed.
unsubsintegerrequiredPeople who opted out within 3 days of getting it.
clickedintegerrequiredPeople who clicked at least one tracked link in it.
audience_labelstringrequiredThe audience in words: "All subscribers", a list or segment name, or "2 lists, 1 segment".
Response headers
The id of this request (req_...), on every answer. Quote it when you contact support.
Requests allowed per minute with this API key.
Requests left in the current minute.
When the current minute ends and the count starts again, in Unix seconds.
No API key, or one that is not valid or has been revoked (unauthorized).
Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.
Create a campaign draft
/v1/campaignsSaves 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()){
"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#
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.
Request body#
application/json · required
namestringName, for you only, up to 120 characters. Default "Untitled campaign".
bodystringrequiredThe 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").
mediaUrlsarray of stringsurihttps addresses of pictures. Any picture makes every text an MMS costing 3 credits.
fromNumberIdstringuuidThe sending number to use. Leave it out for your first approved number.
audienceobjectWho 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
allbooleanEveryone subscribed. This is what you get when no lists or segments are given.
listsarray of stringsuuidList ids.
segmentsarray of stringsuuidSegment ids.
trackLinksbooleanDefault 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
{
"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#
The draft and a preview of its message.
application/json
campaignobjectrequiredA campaign: one message sent to an audience. Field names are snake_case.
Child fields
idstringuuidrequiredThe campaign id.
account_idstringuuidrequiredYour account id.
namestringrequiredName, for you only (people do not see it).
bodystringrequiredThe message as written, with any personalisation tags ({first_name}, {last_name}, {first_name|there}).
media_urlsarray of stringsurirequiredhttps addresses of pictures sent with the text. With a picture, every text is an MMS costing 3 credits.
from_number_idstringuuidnullablerequiredThe 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.
statusstringrequireddraft 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.
audienceobjectrequiredWho 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
allbooleanEveryone subscribed. This is what you get when no lists or segments are given.
listsarray of stringsuuidList ids.
segmentsarray of stringsuuidSegment ids.
recipientsintegerrequiredHow many people it was sent to. 0 for a draft.
creditsintegerrequiredCredits taken when it was sent, before any refunds. 0 for a draft.
created_atstringdate-timerequiredWhen the draft was created.
started_atstringdate-timenullablerequiredWhen sending started, or the time it is scheduled for.
finished_atstringdate-timenullablerequiredWhen the last text went out or ended.
scheduled_atstringdate-timenullablerequiredThe time it was scheduled for, when it was scheduled with sendAt.
track_linksbooleanrequiredWhether 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.
recurrenceobjectnullablerequiredThe schedule of a recurring campaign. Empty for other campaigns.
Child fields
freqstringrequiredHow often.
intervalintegerEvery 1 to 12 days, weeks or months. Default 1.
timestringrequiredLocal time in your account's time zone, HH:MM, between 08:00 and 20:59 (when texts may be sent).
weekdaysarray of integersWeekly only: the days of the week, 0 = Sunday to 6 = Saturday. At least one.
monthdayintegerMonthly only: the day of the month, 1 to 28 (so it exists in every month).
startDatestringdateThe first day it may go out, YYYY-MM-DD in your account's time zone; weeks and months are counted from it. Default today.
endDatestringdatenullableThe last day it may go out, YYYY-MM-DD. Empty for no end.
next_run_atstringdate-timenullablerequiredWhen a recurring campaign goes out next.
parent_idstringuuidnullablerequiredFor a campaign sent by a recurring campaign: the recurring campaign (template) it was copied from.
last_errorstringnullablerequiredFor a recurring campaign: why its last occurrence could not go out (for example not enough credits). Empty when it went out.
previewobjectrequiredHow a message body will be sent and what it costs.
Child fields
encodingstringrequiredGSM-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.
charactersintegerrequiredCharacters in the body as written.
segmentsintegerrequiredSMS segments, counted with personalisation tags filled in with their fallbacks (or left empty).
creditsPerMessageintegerrequiredCredits one recipient costs: the segments (at least 1), or 3 with a picture.
nonGsmarray of stringsrequiredThe characters that forced UCS-2, each once.
warningsarray of stringsrequiredThings 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
The id of this request (req_...), on every answer. Quote it when you contact support.
Requests allowed per minute with this API key.
Requests left in the current minute.
When the current minute ends and the count starts again, in Unix seconds.
true when this is the stored answer to an earlier request with the same Idempotency-Key, not a new one.
The request was refused because something in it is not valid. error.code is one of:
empty_body:bodyis missing or empty.body_too_long:bodyis longer than 1,600 characters.invalid_media: AmediaUrlsentry 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.
No API key, or one that is not valid or has been revoked (unauthorized).
Something the request names does not exist in your account. error.code is one of:
not_found: A list or segment inaudiencedoes not exist.no_sending_number: The number infromNumberIddoes not exist.
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.
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.
Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.
Estimate a campaign
/v1/campaigns/estimateCounts 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()){
"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#
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.
Request body#
application/json · required
audienceobjectWho 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
allbooleanEveryone subscribed. This is what you get when no lists or segments are given.
listsarray of stringsuuidList ids.
segmentsarray of stringsuuidSegment ids.
bodystringThe message, with any personalisation tags. Without one, each recipient is counted as 1 credit.
mediaUrlsarray of stringsAny non-empty list prices it as a picture message (3 credits each).
Example 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#
The estimate.
application/json
recipientsintegerrequiredSubscribed people in the audience now (numbers blocked on SMSBlast are left out).
creditsintegerrequiredCredits it would cost, with each person's personalisation filled in.
balanceintegerrequiredYour credit balance now.
previewobjectrequiredHow a message body will be sent and what it costs.
Child fields
encodingstringrequiredGSM-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.
charactersintegerrequiredCharacters in the body as written.
segmentsintegerrequiredSMS segments, counted with personalisation tags filled in with their fallbacks (or left empty).
creditsPerMessageintegerrequiredCredits one recipient costs: the segments (at least 1), or 3 with a picture.
nonGsmarray of stringsrequiredThe characters that forced UCS-2, each once.
warningsarray of stringsrequiredThings 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
The id of this request (req_...), on every answer. Quote it when you contact support.
Requests allowed per minute with this API key.
Requests left in the current minute.
When the current minute ends and the count starts again, in Unix seconds.
true when this is the stored answer to an earlier request with the same Idempotency-Key, not a new one.
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.
No API key, or one that is not valid or has been revoked (unauthorized).
Something the request names does not exist in your account. error.code is one of:
not_found: A list or segment inaudiencedoes not exist.
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.
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.
Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.
Send a test text
/v1/campaigns/testSends 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()){
"messageId": "a4c6e8f0-2b4d-4f6a-8c0e-1d3f5a7c9e86",
"credits": 1
}Needs an API key: Authorization: Bearer sb_... Authentication
Headers#
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.
Request body#
application/json · required
tostringrequiredWhere 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).
bodystringrequiredThe message. Personalisation is filled in with the name Sam Rivera.
mediaUrlsarray of stringsuriUp to 10 https addresses of pictures (makes it a 3-credit MMS).
Example 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#
The test text, queued.
application/json
messageIdstringuuidrequiredThe test text. Look it up with GET /v1/messages/{id}.
creditsintegerrequiredCredits it cost.
Response headers
The id of this request (req_...), on every answer. Quote it when you contact support.
Requests allowed per minute with this API key.
Requests left in the current minute.
When the current minute ends and the count starts again, in Unix seconds.
true when this is the stored answer to an earlier request with the same Idempotency-Key, not a new one.
The request was refused because something in it is not valid. error.code is one of:
invalid_phone:tois not a valid US or Canada mobile number.empty_body:bodyis missing or empty.invalid_media:mediaUrlshas 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.
No API key, or one that is not valid or has been revoked (unauthorized).
Sending is not possible right now. error.code is one of:
insufficient_credits: Your credit balance is too low for this.error.detailshasneededandavailable.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.
The request clashes with the current state of things. error.code is one of:
test_recipient:tois neither a teammate's own mobile number nor a subscribed contact.unsubscribed:tobelongs 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.
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.
Too many requests. error.code is one of:
rate_limited: More than your API key's requests per minute. Wait forRetry-Afterseconds.test_limit: You have sent 20 tests in the last 24 hours.
Get a campaign report
/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()){
"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#
idstringuuidrequiredThe campaign id.
Responses#
The campaign and how it went.
application/json
campaignobjectrequiredChild fields
idstringuuidrequiredThe campaign id.
account_idstringuuidrequiredYour account id.
namestringrequiredName, for you only (people do not see it).
bodystringrequiredThe message as written, with any personalisation tags ({first_name}, {last_name}, {first_name|there}).
media_urlsarray of stringsurirequiredhttps addresses of pictures sent with the text. With a picture, every text is an MMS costing 3 credits.
from_number_idstringuuidnullablerequiredThe 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.
statusstringrequireddraft 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.
audienceobjectrequiredWho 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
allbooleanEveryone subscribed. This is what you get when no lists or segments are given.
listsarray of stringsuuidList ids.
segmentsarray of stringsuuidSegment ids.
recipientsintegerrequiredHow many people it was sent to. 0 for a draft.
creditsintegerrequiredCredits taken when it was sent, before any refunds. 0 for a draft.
created_atstringdate-timerequiredWhen the draft was created.
started_atstringdate-timenullablerequiredWhen sending started, or the time it is scheduled for.
finished_atstringdate-timenullablerequiredWhen the last text went out or ended.
scheduled_atstringdate-timenullablerequiredThe time it was scheduled for, when it was scheduled with sendAt.
track_linksbooleanrequiredWhether 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.
recurrenceobjectnullablerequiredThe schedule of a recurring campaign. Empty for other campaigns.
Child fields
freqstringrequiredHow often.
intervalintegerEvery 1 to 12 days, weeks or months. Default 1.
timestringrequiredLocal time in your account's time zone, HH:MM, between 08:00 and 20:59 (when texts may be sent).
weekdaysarray of integersWeekly only: the days of the week, 0 = Sunday to 6 = Saturday. At least one.
monthdayintegerMonthly only: the day of the month, 1 to 28 (so it exists in every month).
startDatestringdateThe first day it may go out, YYYY-MM-DD in your account's time zone; weeks and months are counted from it. Default today.
endDatestringdatenullableThe last day it may go out, YYYY-MM-DD. Empty for no end.
next_run_atstringdate-timenullablerequiredWhen a recurring campaign goes out next.
parent_idstringuuidnullablerequiredFor a campaign sent by a recurring campaign: the recurring campaign (template) it was copied from.
last_errorstringnullablerequiredFor a recurring campaign: why its last occurrence could not go out (for example not enough credits). Empty when it went out.
audience_labelstringrequiredThe audience in words: "All subscribers", a list or segment name, or "2 lists, 1 segment".
countsobjectrequiredTexts by their status now. Each text is in exactly one of these.
Child fields
queuedintegerrequiredWaiting to go out (scheduled, or holding for the recipient's sending hours).
sendingintegerrequiredBeing handed to the carrier.
sentintegerrequiredAccepted by the carrier, no delivery report yet.
deliveredintegerrequiredConfirmed delivered.
failedintegerrequiredFailed.
skippedintegerrequiredNot sent because the person opted out first, or because the campaign was stopped.
creditsRefundedintegerrequiredCredits given back for texts that failed before reaching the carrier or were skipped.
unsubsintegerrequiredPeople who opted out within 3 days of getting it.
clicksobjectrequiredLink clicks. All zero when the campaign had no links or link tracking was off.
Child fields
clicksintegerrequiredClicks on its tracked links, by people (link scanners and previews are not counted).
peopleintegerrequiredPeople who clicked at least once.
linksintegerrequiredDifferent links in the message.
byUrlarray of objectsrequiredEach link, most clicked first.
Fields of each item
urlstringrequiredThe original link.
clicksintegerrequiredClicks on it.
peopleintegerrequiredPeople who clicked it.
Response headers
The id of this request (req_...), on every answer. Quote it when you contact support.
Requests allowed per minute with this API key.
Requests left in the current minute.
When the current minute ends and the count starts again, in Unix seconds.
No API key, or one that is not valid or has been revoked (unauthorized).
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.
Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.
Update a campaign draft
/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()){
"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#
idstringuuidrequiredThe campaign id.
Request body#
application/json · required
Only the fields you send change.
namestringName, for you only, up to 120 characters.
bodystringThe message, up to 1,600 characters, with any personalisation tags.
mediaUrlsarray of stringsurihttps addresses of pictures, replacing the current ones ([] for none).
fromNumberIdstringuuidThe sending number to use.
audienceobjectWho 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
allbooleanEveryone subscribed. This is what you get when no lists or segments are given.
listsarray of stringsuuidList ids.
segmentsarray of stringsuuidSegment ids.
trackLinksbooleanWhether links become tracked short links.
Example request body
{
"name": "Holiday stollen (final)",
"audience": {
"lists": [
"e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
]
}
}Responses#
The draft and a preview of its message.
application/json
campaignobjectrequiredA campaign: one message sent to an audience. Field names are snake_case.
Child fields
idstringuuidrequiredThe campaign id.
account_idstringuuidrequiredYour account id.
namestringrequiredName, for you only (people do not see it).
bodystringrequiredThe message as written, with any personalisation tags ({first_name}, {last_name}, {first_name|there}).
media_urlsarray of stringsurirequiredhttps addresses of pictures sent with the text. With a picture, every text is an MMS costing 3 credits.
from_number_idstringuuidnullablerequiredThe 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.
statusstringrequireddraft 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.
audienceobjectrequiredWho 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
allbooleanEveryone subscribed. This is what you get when no lists or segments are given.
listsarray of stringsuuidList ids.
segmentsarray of stringsuuidSegment ids.
recipientsintegerrequiredHow many people it was sent to. 0 for a draft.
creditsintegerrequiredCredits taken when it was sent, before any refunds. 0 for a draft.
created_atstringdate-timerequiredWhen the draft was created.
started_atstringdate-timenullablerequiredWhen sending started, or the time it is scheduled for.
finished_atstringdate-timenullablerequiredWhen the last text went out or ended.
scheduled_atstringdate-timenullablerequiredThe time it was scheduled for, when it was scheduled with sendAt.
track_linksbooleanrequiredWhether 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.
recurrenceobjectnullablerequiredThe schedule of a recurring campaign. Empty for other campaigns.
Child fields
freqstringrequiredHow often.
intervalintegerEvery 1 to 12 days, weeks or months. Default 1.
timestringrequiredLocal time in your account's time zone, HH:MM, between 08:00 and 20:59 (when texts may be sent).
weekdaysarray of integersWeekly only: the days of the week, 0 = Sunday to 6 = Saturday. At least one.
monthdayintegerMonthly only: the day of the month, 1 to 28 (so it exists in every month).
startDatestringdateThe first day it may go out, YYYY-MM-DD in your account's time zone; weeks and months are counted from it. Default today.
endDatestringdatenullableThe last day it may go out, YYYY-MM-DD. Empty for no end.
next_run_atstringdate-timenullablerequiredWhen a recurring campaign goes out next.
parent_idstringuuidnullablerequiredFor a campaign sent by a recurring campaign: the recurring campaign (template) it was copied from.
last_errorstringnullablerequiredFor a recurring campaign: why its last occurrence could not go out (for example not enough credits). Empty when it went out.
previewobjectrequiredHow a message body will be sent and what it costs.
Child fields
encodingstringrequiredGSM-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.
charactersintegerrequiredCharacters in the body as written.
segmentsintegerrequiredSMS segments, counted with personalisation tags filled in with their fallbacks (or left empty).
creditsPerMessageintegerrequiredCredits one recipient costs: the segments (at least 1), or 3 with a picture.
nonGsmarray of stringsrequiredThe characters that forced UCS-2, each once.
warningsarray of stringsrequiredThings 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
The id of this request (req_...), on every answer. Quote it when you contact support.
Requests allowed per minute with this API key.
Requests left in the current minute.
When the current minute ends and the count starts again, in Unix seconds.
The request was refused because something in it is not valid. error.code is one of:
empty_body:bodyis empty.body_too_long:bodyis longer than 1,600 characters.invalid_media: AmediaUrlsentry is not an https address.invalid_json: The body is not a JSON object.
No API key, or one that is not valid or has been revoked (unauthorized).
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 inaudiencedoes not exist.no_sending_number: The number infromNumberIddoes not exist.
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.
Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.
Delete a campaign draft
/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()){
"ok": true
}Needs an API key: Authorization: Bearer sb_... Authentication
Path parameters#
idstringuuidrequiredThe campaign id.
Responses#
Deleted.
application/json
okbooleanrequiredResponse headers
The id of this request (req_...), on every answer. Quote it when you contact support.
Requests allowed per minute with this API key.
Requests left in the current minute.
When the current minute ends and the count starts again, in Unix seconds.
No API key, or one that is not valid or has been revoked (unauthorized).
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.
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.
Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.
Duplicate a campaign
/v1/campaigns/{id}/duplicateCopies 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()){
"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#
idstringuuidrequiredThe campaign id.
Headers#
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.
Responses#
The new draft.
application/json
campaignobjectrequiredA campaign: one message sent to an audience. Field names are snake_case.
Child fields
idstringuuidrequiredThe campaign id.
account_idstringuuidrequiredYour account id.
namestringrequiredName, for you only (people do not see it).
bodystringrequiredThe message as written, with any personalisation tags ({first_name}, {last_name}, {first_name|there}).
media_urlsarray of stringsurirequiredhttps addresses of pictures sent with the text. With a picture, every text is an MMS costing 3 credits.
from_number_idstringuuidnullablerequiredThe 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.
statusstringrequireddraft 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.
audienceobjectrequiredWho 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
allbooleanEveryone subscribed. This is what you get when no lists or segments are given.
listsarray of stringsuuidList ids.
segmentsarray of stringsuuidSegment ids.
recipientsintegerrequiredHow many people it was sent to. 0 for a draft.
creditsintegerrequiredCredits taken when it was sent, before any refunds. 0 for a draft.
created_atstringdate-timerequiredWhen the draft was created.
started_atstringdate-timenullablerequiredWhen sending started, or the time it is scheduled for.
finished_atstringdate-timenullablerequiredWhen the last text went out or ended.
scheduled_atstringdate-timenullablerequiredThe time it was scheduled for, when it was scheduled with sendAt.
track_linksbooleanrequiredWhether 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.
recurrenceobjectnullablerequiredThe schedule of a recurring campaign. Empty for other campaigns.
Child fields
freqstringrequiredHow often.
intervalintegerEvery 1 to 12 days, weeks or months. Default 1.
timestringrequiredLocal time in your account's time zone, HH:MM, between 08:00 and 20:59 (when texts may be sent).
weekdaysarray of integersWeekly only: the days of the week, 0 = Sunday to 6 = Saturday. At least one.
monthdayintegerMonthly only: the day of the month, 1 to 28 (so it exists in every month).
startDatestringdateThe first day it may go out, YYYY-MM-DD in your account's time zone; weeks and months are counted from it. Default today.
endDatestringdatenullableThe last day it may go out, YYYY-MM-DD. Empty for no end.
next_run_atstringdate-timenullablerequiredWhen a recurring campaign goes out next.
parent_idstringuuidnullablerequiredFor a campaign sent by a recurring campaign: the recurring campaign (template) it was copied from.
last_errorstringnullablerequiredFor a recurring campaign: why its last occurrence could not go out (for example not enough credits). Empty when it went out.
Response headers
The id of this request (req_...), on every answer. Quote it when you contact support.
Requests allowed per minute with this API key.
Requests left in the current minute.
When the current minute ends and the count starts again, in Unix seconds.
true when this is the stored answer to an earlier request with the same Idempotency-Key, not a new one.
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.
No API key, or one that is not valid or has been revoked (unauthorized).
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.
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.
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.
Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.
Stop a campaign
/v1/campaigns/{id}/cancelStops 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()){
"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#
idstringuuidrequiredThe campaign id.
Headers#
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.
Responses#
The stopped campaign.
application/json
campaignobjectrequiredA campaign: one message sent to an audience. Field names are snake_case.
Child fields
idstringuuidrequiredThe campaign id.
account_idstringuuidrequiredYour account id.
namestringrequiredName, for you only (people do not see it).
bodystringrequiredThe message as written, with any personalisation tags ({first_name}, {last_name}, {first_name|there}).
media_urlsarray of stringsurirequiredhttps addresses of pictures sent with the text. With a picture, every text is an MMS costing 3 credits.
from_number_idstringuuidnullablerequiredThe 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.
statusstringrequireddraft 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.
audienceobjectrequiredWho 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
allbooleanEveryone subscribed. This is what you get when no lists or segments are given.
listsarray of stringsuuidList ids.
segmentsarray of stringsuuidSegment ids.
recipientsintegerrequiredHow many people it was sent to. 0 for a draft.
creditsintegerrequiredCredits taken when it was sent, before any refunds. 0 for a draft.
created_atstringdate-timerequiredWhen the draft was created.
started_atstringdate-timenullablerequiredWhen sending started, or the time it is scheduled for.
finished_atstringdate-timenullablerequiredWhen the last text went out or ended.
scheduled_atstringdate-timenullablerequiredThe time it was scheduled for, when it was scheduled with sendAt.
track_linksbooleanrequiredWhether 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.
recurrenceobjectnullablerequiredThe schedule of a recurring campaign. Empty for other campaigns.
Child fields
freqstringrequiredHow often.
intervalintegerEvery 1 to 12 days, weeks or months. Default 1.
timestringrequiredLocal time in your account's time zone, HH:MM, between 08:00 and 20:59 (when texts may be sent).
weekdaysarray of integersWeekly only: the days of the week, 0 = Sunday to 6 = Saturday. At least one.
monthdayintegerMonthly only: the day of the month, 1 to 28 (so it exists in every month).
startDatestringdateThe first day it may go out, YYYY-MM-DD in your account's time zone; weeks and months are counted from it. Default today.
endDatestringdatenullableThe last day it may go out, YYYY-MM-DD. Empty for no end.
next_run_atstringdate-timenullablerequiredWhen a recurring campaign goes out next.
parent_idstringuuidnullablerequiredFor a campaign sent by a recurring campaign: the recurring campaign (template) it was copied from.
last_errorstringnullablerequiredFor a recurring campaign: why its last occurrence could not go out (for example not enough credits). Empty when it went out.
canceledintegerrequiredTexts that had not gone out yet and now never will (they are skipped).
creditsReturnedintegerrequiredCredits given back for those texts.
Response headers
The id of this request (req_...), on every answer. Quote it when you contact support.
Requests allowed per minute with this API key.
Requests left in the current minute.
When the current minute ends and the count starts again, in Unix seconds.
true when this is the stored answer to an earlier request with the same Idempotency-Key, not a new one.
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.
No API key, or one that is not valid or has been revoked (unauthorized).
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.
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.
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.
Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.
Make a campaign recurring
/v1/campaigns/{id}/recurringTurns 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()){
"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#
idstringuuidrequiredThe campaign id.
Headers#
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.
Request body#
application/json · required
recurrenceobjectrequiredWhen a recurring campaign goes out.
Child fields
freqstringrequiredHow often.
intervalintegerEvery 1 to 12 days, weeks or months. Default 1.
timestringrequiredLocal time in your account's time zone, HH:MM, between 08:00 and 20:59 (when texts may be sent).
weekdaysarray of integersWeekly only: the days of the week, 0 = Sunday to 6 = Saturday. At least one.
monthdayintegerMonthly only: the day of the month, 1 to 28 (so it exists in every month).
startDatestringdateThe first day it may go out, YYYY-MM-DD in your account's time zone; weeks and months are counted from it. Default today.
endDatestringdatenullableThe last day it may go out, YYYY-MM-DD. Empty for no end.
Example request body
{
"recurrence": {
"freq": "weekly",
"interval": 1,
"weekdays": [
5
],
"time": "10:00",
"startDate": "2026-11-27",
"endDate": "2027-02-26"
}
}Responses#
The recurring campaign.
application/json
campaignobjectrequiredA campaign: one message sent to an audience. Field names are snake_case.
Child fields
idstringuuidrequiredThe campaign id.
account_idstringuuidrequiredYour account id.
namestringrequiredName, for you only (people do not see it).
bodystringrequiredThe message as written, with any personalisation tags ({first_name}, {last_name}, {first_name|there}).
media_urlsarray of stringsurirequiredhttps addresses of pictures sent with the text. With a picture, every text is an MMS costing 3 credits.
from_number_idstringuuidnullablerequiredThe 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.
statusstringrequireddraft 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.
audienceobjectrequiredWho 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
allbooleanEveryone subscribed. This is what you get when no lists or segments are given.
listsarray of stringsuuidList ids.
segmentsarray of stringsuuidSegment ids.
recipientsintegerrequiredHow many people it was sent to. 0 for a draft.
creditsintegerrequiredCredits taken when it was sent, before any refunds. 0 for a draft.
created_atstringdate-timerequiredWhen the draft was created.
started_atstringdate-timenullablerequiredWhen sending started, or the time it is scheduled for.
finished_atstringdate-timenullablerequiredWhen the last text went out or ended.
scheduled_atstringdate-timenullablerequiredThe time it was scheduled for, when it was scheduled with sendAt.
track_linksbooleanrequiredWhether 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.
recurrenceobjectnullablerequiredThe schedule of a recurring campaign. Empty for other campaigns.
Child fields
freqstringrequiredHow often.
intervalintegerEvery 1 to 12 days, weeks or months. Default 1.
timestringrequiredLocal time in your account's time zone, HH:MM, between 08:00 and 20:59 (when texts may be sent).
weekdaysarray of integersWeekly only: the days of the week, 0 = Sunday to 6 = Saturday. At least one.
monthdayintegerMonthly only: the day of the month, 1 to 28 (so it exists in every month).
startDatestringdateThe first day it may go out, YYYY-MM-DD in your account's time zone; weeks and months are counted from it. Default today.
endDatestringdatenullableThe last day it may go out, YYYY-MM-DD. Empty for no end.
next_run_atstringdate-timenullablerequiredWhen a recurring campaign goes out next.
parent_idstringuuidnullablerequiredFor a campaign sent by a recurring campaign: the recurring campaign (template) it was copied from.
last_errorstringnullablerequiredFor a recurring campaign: why its last occurrence could not go out (for example not enough credits). Empty when it went out.
Response headers
The id of this request (req_...), on every answer. Quote it when you contact support.
Requests allowed per minute with this API key.
Requests left in the current minute.
When the current minute ends and the count starts again, in Unix seconds.
true when this is the stored answer to an earlier request with the same Idempotency-Key, not a new one.
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.
No API key, or one that is not valid or has been revoked (unauthorized).
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.
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.
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.
Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.
Stop a recurring campaign
/v1/campaigns/{id}/recurringStops 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()){
"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#
idstringuuidrequiredThe campaign id.
Responses#
The campaign, a draft again.
application/json
campaignobjectrequiredA campaign: one message sent to an audience. Field names are snake_case.
Child fields
idstringuuidrequiredThe campaign id.
account_idstringuuidrequiredYour account id.
namestringrequiredName, for you only (people do not see it).
bodystringrequiredThe message as written, with any personalisation tags ({first_name}, {last_name}, {first_name|there}).
media_urlsarray of stringsurirequiredhttps addresses of pictures sent with the text. With a picture, every text is an MMS costing 3 credits.
from_number_idstringuuidnullablerequiredThe 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.
statusstringrequireddraft 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.
audienceobjectrequiredWho 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
allbooleanEveryone subscribed. This is what you get when no lists or segments are given.
listsarray of stringsuuidList ids.
segmentsarray of stringsuuidSegment ids.
recipientsintegerrequiredHow many people it was sent to. 0 for a draft.
creditsintegerrequiredCredits taken when it was sent, before any refunds. 0 for a draft.
created_atstringdate-timerequiredWhen the draft was created.
started_atstringdate-timenullablerequiredWhen sending started, or the time it is scheduled for.
finished_atstringdate-timenullablerequiredWhen the last text went out or ended.
scheduled_atstringdate-timenullablerequiredThe time it was scheduled for, when it was scheduled with sendAt.
track_linksbooleanrequiredWhether 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.
recurrenceobjectnullablerequiredThe schedule of a recurring campaign. Empty for other campaigns.
Child fields
freqstringrequiredHow often.
intervalintegerEvery 1 to 12 days, weeks or months. Default 1.
timestringrequiredLocal time in your account's time zone, HH:MM, between 08:00 and 20:59 (when texts may be sent).
weekdaysarray of integersWeekly only: the days of the week, 0 = Sunday to 6 = Saturday. At least one.
monthdayintegerMonthly only: the day of the month, 1 to 28 (so it exists in every month).
startDatestringdateThe first day it may go out, YYYY-MM-DD in your account's time zone; weeks and months are counted from it. Default today.
endDatestringdatenullableThe last day it may go out, YYYY-MM-DD. Empty for no end.
next_run_atstringdate-timenullablerequiredWhen a recurring campaign goes out next.
parent_idstringuuidnullablerequiredFor a campaign sent by a recurring campaign: the recurring campaign (template) it was copied from.
last_errorstringnullablerequiredFor a recurring campaign: why its last occurrence could not go out (for example not enough credits). Empty when it went out.
Response headers
The id of this request (req_...), on every answer. Quote it when you contact support.
Requests allowed per minute with this API key.
Requests left in the current minute.
When the current minute ends and the count starts again, in Unix seconds.
No API key, or one that is not valid or has been revoked (unauthorized).
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.
The request clashes with the current state of things. error.code is one of:
not_recurring: The campaign is not recurring.
Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.
Send or schedule a campaign
/v1/campaigns/{id}/sendSends 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()){
"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#
idstringuuidrequiredThe campaign id.
Headers#
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.
Request body#
application/json
sendAtstringdate-timenullableSchedule 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
{
"sendAt": "2026-11-28T17:00:00Z"
}Responses#
The campaign, now sending.
application/json
campaignobjectrequiredA campaign: one message sent to an audience. Field names are snake_case.
Child fields
idstringuuidrequiredThe campaign id.
account_idstringuuidrequiredYour account id.
namestringrequiredName, for you only (people do not see it).
bodystringrequiredThe message as written, with any personalisation tags ({first_name}, {last_name}, {first_name|there}).
media_urlsarray of stringsurirequiredhttps addresses of pictures sent with the text. With a picture, every text is an MMS costing 3 credits.
from_number_idstringuuidnullablerequiredThe 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.
statusstringrequireddraft 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.
audienceobjectrequiredWho 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
allbooleanEveryone subscribed. This is what you get when no lists or segments are given.
listsarray of stringsuuidList ids.
segmentsarray of stringsuuidSegment ids.
recipientsintegerrequiredHow many people it was sent to. 0 for a draft.
creditsintegerrequiredCredits taken when it was sent, before any refunds. 0 for a draft.
created_atstringdate-timerequiredWhen the draft was created.
started_atstringdate-timenullablerequiredWhen sending started, or the time it is scheduled for.
finished_atstringdate-timenullablerequiredWhen the last text went out or ended.
scheduled_atstringdate-timenullablerequiredThe time it was scheduled for, when it was scheduled with sendAt.
track_linksbooleanrequiredWhether 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.
recurrenceobjectnullablerequiredThe schedule of a recurring campaign. Empty for other campaigns.
Child fields
freqstringrequiredHow often.
intervalintegerEvery 1 to 12 days, weeks or months. Default 1.
timestringrequiredLocal time in your account's time zone, HH:MM, between 08:00 and 20:59 (when texts may be sent).
weekdaysarray of integersWeekly only: the days of the week, 0 = Sunday to 6 = Saturday. At least one.
monthdayintegerMonthly only: the day of the month, 1 to 28 (so it exists in every month).
startDatestringdateThe first day it may go out, YYYY-MM-DD in your account's time zone; weeks and months are counted from it. Default today.
endDatestringdatenullableThe last day it may go out, YYYY-MM-DD. Empty for no end.
next_run_atstringdate-timenullablerequiredWhen a recurring campaign goes out next.
parent_idstringuuidnullablerequiredFor a campaign sent by a recurring campaign: the recurring campaign (template) it was copied from.
last_errorstringnullablerequiredFor a recurring campaign: why its last occurrence could not go out (for example not enough credits). Empty when it went out.
recipientsintegerrequiredPeople it is going to.
creditsintegerrequiredCredits taken.
balanceAfterintegerrequiredYour credit balance afterwards.
Response headers
The id of this request (req_...), on every answer. Quote it when you contact support.
Requests allowed per minute with this API key.
Requests left in the current minute.
When the current minute ends and the count starts again, in Unix seconds.
true when this is the stored answer to an earlier request with the same Idempotency-Key, not a new one.
The request was refused because something in it is not valid. error.code is one of:
invalid_send_at:sendAtis 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.
No API key, or one that is not valid or has been revoked (unauthorized).
Sending is not possible right now. error.code is one of:
insufficient_credits: Not enough credits for every text.error.detailshasneeded,availableandrecipients.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.
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.
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.numberStatussays 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.
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.
Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.