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

API reference

Messages

Send one text to one subscribed contact, look up any text sent or received (campaign, inbox, workflow, API, automatic answers and incoming texts), and preview what a message will cost.

An outgoing text moves from queued to sending to sent and then delivered or failed; a text not sent because the person opted out first is skipped. Incoming texts are received.

Send a text

POST/v1/messages

Sends one text to one person, such as an order update, a reminder or an answer to something they did. It is queued at once and usually goes out within seconds; follow it with GET /v1/messages/{id} or the message.sent, message.delivered and message.failed webhooks.

The person must already be a contact who is subscribed: add them first with POST /v1/contacts and your record of their consent. Texting anyone else is refused (not_a_contact, unsubscribed), the same as in the dashboard. The text also appears in that person's inbox conversation.

Credits are taken when the text is queued: 1 per SMS segment (160 plain characters, or 153 per segment once a text is split; 70 and 67 when it contains an emoji or another character outside GSM-7), or 3 for a picture message. A text that cannot be sent, or is skipped because the person opted out first, gets its credits back.

API texts go out at any hour unless you send respectQuietHours: true, which holds the text until 8am to 9pm in the contact's time zone (or your account's). Schedule a text with sendAt. Send the final text: personalisation tags are not filled in here.

Use an Idempotency-Key so a retried request cannot send the text twice.

Request

curl -X POST https://app.smsblast.net/v1/messages \
  -H "Authorization: Bearer $SMSBLAST_API_KEY" \
  -H "Idempotency-Key: $(openssl rand -hex 16)" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+14155550101",
    "body": "Hi Alice, your sourdough order is ready for pickup at Corner Bakery. Reply STOP to opt out.",
    "respectQuietHours": false
  }'
const res = await fetch('https://app.smsblast.net/v1/messages', {
  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 Alice, your sourdough order is ready for pickup at Corner Bakery. Reply STOP to opt out.',
    respectQuietHours: false,
  }),
});
console.log(res.status, await res.json());
import os
import uuid

import requests

res = requests.post(
    "https://app.smsblast.net/v1/messages",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "to": "+14155550101",
        "body": "Hi Alice, your sourdough order is ready for pickup at Corner Bakery. Reply STOP to opt out.",
        "respectQuietHours": False,
    },
)
print(res.status_code, res.json())
Response · 201
{
  "message": {
    "id": "a4c6e8f0-2b4d-4f6a-8c0e-1d3f5a7c9e86",
    "direction": "outbound",
    "status": "queued",
    "kind": "api",
    "from": "+14155550100",
    "to": "+14155550101",
    "body": "Hi Alice, your sourdough order is ready for pickup at Corner Bakery. Reply STOP to opt out.",
    "mediaUrls": [],
    "credits": 1,
    "contactId": "0f8d5c3a-6b2e-4f1d-9a7c-3e5b8d2f1a60",
    "campaignId": null,
    "error": null,
    "sendAt": null,
    "createdAt": "2026-11-20T17:02:11.482Z",
    "sentAt": null,
    "deliveredAt": null
  }
}

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

Send to and at least one of body or mediaUrls.

tostring

Who to text. A US or Canada mobile number in any common format (+14155550101, (415) 555-0101, 415-555-0101). Stored and returned in E.164 (+14155550101). The person must already be a subscribed contact.

bodystring

The text, up to 1,600 characters. Personalisation tags are not filled in here: send the final text. Optional when you send mediaUrls.

Limits: up to 1600 characters.

mediaUrlsarray of stringsuri

Up to 10 https addresses of pictures. Any picture makes it an MMS costing 3 credits.

Limits: up to 10 items.

fromstring

Which of your approved sending numbers to send from (E.164 or any common format). Leave it out to use your first approved number.

sendAtstringdate-timenullable

Schedule the text, up to a year ahead, for example 2026-11-24T17:00:00Z. A time in the past sends it now.

respectQuietHoursboolean

true holds the text until 8am to 9pm in the contact's time zone (or your account's), counted from sendAt when given. Default false: API texts go out at any hour, as they are usually answers to something the person did.

trackLinksboolean

true swaps each link in the body for a short tracking link (such as https://app.smsblast.net/s/Ab3dEf9) so you hear about clicks (the link.clicked webhook). Default false.

Example request body
Request body
{
  "to": "+14155550101",
  "body": "Hi Alice, your sourdough order is ready for pickup at Corner Bakery. Reply STOP to opt out.",
  "respectQuietHours": false
}

Responses#

201

The text, queued.

application/json

messageobjectrequired

One text, sent or received. Field names are camelCase.

Child fields
idstringuuidrequired

The message id.

directionstringrequired

outbound: a text you sent. inbound: a text someone sent to one of your numbers.

One of "outbound", "inbound".

statusstringrequired

Where the text is:

  • queued: waiting to go out (now, at sendAt, when sending hours open, or for a retry after the carrier was busy).
  • sending: being handed to the carrier right now.
  • sent: the carrier accepted it.
  • delivered: the carrier confirmed it reached the phone.
  • failed: it could not be sent, or the carrier reported it undelivered. error says why. A text that never reached the carrier gets its credits back.
  • skipped: not sent, because the person opted out before it went out, its campaign was stopped, the number is blocked on SMSBlast, or (for a keyword reply) there were not enough credits. Credits are given back.
  • received: an inbound text.

One of "queued", "sending", "sent", "delivered", "failed", "skipped", "received".

kindstringrequired

What sent it: campaign, api (POST /v1/messages), conversation (a reply from the inbox), workflow, welcome (a signup form's welcome text), reply (the answer to a signup keyword), compliance (the automatic answer to STOP, HELP or START), test (a campaign test send) or inbound (a text someone sent you).

One of "campaign", "api", "conversation", "workflow", "welcome", "reply", "compliance", "test", "inbound".

fromstringrequired

The sending number for outbound texts; the person's number for inbound ones. E.164.

tostringrequired

The person's number for outbound texts; your number for inbound ones. E.164.

bodystringrequired

The text exactly as sent or received (personalisation already filled in, tracked links already shortened).

mediaUrlsarray of stringsurirequired

Pictures sent with the text (MMS). For inbound texts, the pictures the person sent.

creditsintegerrequired

Credits it cost: 1 per SMS segment, 3 for a picture message, 0 for inbound texts and compliance answers.

contactIdstringuuidnullablerequired

The contact it was sent to or came from, when there is one.

campaignIdstringuuidnullablerequired

The campaign it belongs to, for campaign texts.

errorstringnullablerequired

Why it failed or was skipped. While a text is queued for another try after the carrier was busy, this reads "Will retry: ...".

sendAtstringdate-timenullablerequired

The earliest time it may go out, when it was scheduled, held for sending hours, or is waiting for a retry. Empty when it goes out as soon as possible.

createdAtstringdate-timerequired

When it was created (outbound) or received (inbound).

sentAtstringdate-timenullablerequired

When the carrier accepted it.

deliveredAtstringdate-timenullablerequired

When the carrier confirmed delivery.

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: There is no body and no mediaUrls.
  • body_too_long: body is longer than 1,600 characters.
  • invalid_media: mediaUrls is not a list of up to 10 https addresses.
  • invalid_send_at: sendAt is not a date and time, or is more than a year ahead.
  • invalid_from: from is not one of your approved sending numbers.
  • 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:

  • not_a_contact: The number is not one of your contacts. Add them, with their consent, first.
  • unsubscribed: The contact has 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 (your number registration is still under review).
  • 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.

List texts

GET/v1/messages

Every text sent or received by your account (campaigns, inbox replies, workflows, API texts, automatic answers and incoming texts), newest first, a page at a time.

To page through, pass the nextCursor of one page as cursor for the next; nextCursor is empty on the last page. Filters can be combined.

Request

curl https://app.smsblast.net/v1/messages \
  -H "Authorization: Bearer $SMSBLAST_API_KEY"
const res = await fetch('https://app.smsblast.net/v1/messages', {
  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/messages",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response · 200
{
  "messages": [
    {
      "id": "a4c6e8f0-2b4d-4f6a-8c0e-1d3f5a7c9e86",
      "direction": "outbound",
      "status": "delivered",
      "kind": "api",
      "from": "+14155550100",
      "to": "+14155550101",
      "body": "Hi Alice, your sourdough order is ready for pickup at Corner Bakery. Reply STOP to opt out.",
      "mediaUrls": [],
      "credits": 1,
      "contactId": "0f8d5c3a-6b2e-4f1d-9a7c-3e5b8d2f1a60",
      "campaignId": null,
      "error": null,
      "sendAt": null,
      "createdAt": "2026-11-20T17:02:11.482Z",
      "sentAt": "2026-11-20T17:02:12.104Z",
      "deliveredAt": "2026-11-20T17:02:15.930Z"
    },
    {
      "id": "d1f3a5c7-9e0b-4d2f-a4c6-e8f0b2d4f697",
      "direction": "inbound",
      "status": "received",
      "kind": "inbound",
      "from": "+14155550101",
      "to": "+14155550100",
      "body": "Do you have rye bread today?",
      "mediaUrls": [],
      "credits": 0,
      "contactId": "0f8d5c3a-6b2e-4f1d-9a7c-3e5b8d2f1a60",
      "campaignId": null,
      "error": null,
      "sendAt": null,
      "createdAt": "2026-11-20T16:45:03.118Z",
      "sentAt": null,
      "deliveredAt": null
    }
  ],
  "nextCursor": "MjAyNi0xMS0yMFQxNjo0NTowMy4xMThafGQxZjNhNWM3LTllMGItNGQyZi1hNGM2LWU4ZjBiMmQ0ZjY5Nw"
}

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

Query parameters#

directionstring

Only incoming (inbound) or outgoing (outbound) texts.

One of "inbound", "outbound".

statusstring

Only texts with this status.

One of "queued", "sending", "sent", "delivered", "failed", "skipped", "received".

kindstring

Only texts of this kind.

One of "campaign", "api", "conversation", "workflow", "welcome", "reply", "compliance", "test", "inbound".

contactIdstringuuid

Only texts to or from this contact.

campaignIdstringuuid

Only texts of this campaign.

phonestring

Only texts to or from this number, in any common format.

sincestringdate-time

Only texts created at or after this time (a date like 2026-11-01 or a date and time).

untilstringdate-time

Only texts created before this time.

cursorstring

The nextCursor from the previous page. Leave it out for the first (newest) page.

limitinteger

How many to return, 1 to 200. Default 50.

Default 50. Limits: 1 to 200.

Responses#

200

One page of texts.

application/json

messagesarray of objectsrequired

Newest first.

Fields of each item
idstringuuidrequired

The message id.

directionstringrequired

outbound: a text you sent. inbound: a text someone sent to one of your numbers.

One of "outbound", "inbound".

statusstringrequired

Where the text is:

  • queued: waiting to go out (now, at sendAt, when sending hours open, or for a retry after the carrier was busy).
  • sending: being handed to the carrier right now.
  • sent: the carrier accepted it.
  • delivered: the carrier confirmed it reached the phone.
  • failed: it could not be sent, or the carrier reported it undelivered. error says why. A text that never reached the carrier gets its credits back.
  • skipped: not sent, because the person opted out before it went out, its campaign was stopped, the number is blocked on SMSBlast, or (for a keyword reply) there were not enough credits. Credits are given back.
  • received: an inbound text.

One of "queued", "sending", "sent", "delivered", "failed", "skipped", "received".

kindstringrequired

What sent it: campaign, api (POST /v1/messages), conversation (a reply from the inbox), workflow, welcome (a signup form's welcome text), reply (the answer to a signup keyword), compliance (the automatic answer to STOP, HELP or START), test (a campaign test send) or inbound (a text someone sent you).

One of "campaign", "api", "conversation", "workflow", "welcome", "reply", "compliance", "test", "inbound".

fromstringrequired

The sending number for outbound texts; the person's number for inbound ones. E.164.

tostringrequired

The person's number for outbound texts; your number for inbound ones. E.164.

bodystringrequired

The text exactly as sent or received (personalisation already filled in, tracked links already shortened).

mediaUrlsarray of stringsurirequired

Pictures sent with the text (MMS). For inbound texts, the pictures the person sent.

creditsintegerrequired

Credits it cost: 1 per SMS segment, 3 for a picture message, 0 for inbound texts and compliance answers.

contactIdstringuuidnullablerequired

The contact it was sent to or came from, when there is one.

campaignIdstringuuidnullablerequired

The campaign it belongs to, for campaign texts.

errorstringnullablerequired

Why it failed or was skipped. While a text is queued for another try after the carrier was busy, this reads "Will retry: ...".

sendAtstringdate-timenullablerequired

The earliest time it may go out, when it was scheduled, held for sending hours, or is waiting for a retry. Empty when it goes out as soon as possible.

createdAtstringdate-timerequired

When it was created (outbound) or received (inbound).

sentAtstringdate-timenullablerequired

When the carrier accepted it.

deliveredAtstringdate-timenullablerequired

When the carrier confirmed delivery.

nextCursorstringnullablerequired

Pass as cursor to get the next (older) page. Empty on the last page.

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:

  • invalid_direction: direction is not inbound or outbound.
  • invalid_phone: phone is not a valid US or Canada number.
  • invalid_date: since or until is not a date.
  • invalid_cursor: cursor is not one this API gave out.
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.

Get a text

GET/v1/messages/{id}

One text, sent or received, with its current status. Useful to follow a text from POST /v1/messages until it is delivered (or use the webhooks).

Request

curl https://app.smsblast.net/v1/messages/a4c6e8f0-2b4d-4f6a-8c0e-1d3f5a7c9e86 \
  -H "Authorization: Bearer $SMSBLAST_API_KEY"
const res = await fetch('https://app.smsblast.net/v1/messages/a4c6e8f0-2b4d-4f6a-8c0e-1d3f5a7c9e86', {
  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/messages/a4c6e8f0-2b4d-4f6a-8c0e-1d3f5a7c9e86",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response · 200
{
  "message": {
    "id": "a4c6e8f0-2b4d-4f6a-8c0e-1d3f5a7c9e86",
    "direction": "outbound",
    "status": "delivered",
    "kind": "api",
    "from": "+14155550100",
    "to": "+14155550101",
    "body": "Hi Alice, your sourdough order is ready for pickup at Corner Bakery. Reply STOP to opt out.",
    "mediaUrls": [],
    "credits": 1,
    "contactId": "0f8d5c3a-6b2e-4f1d-9a7c-3e5b8d2f1a60",
    "campaignId": null,
    "error": null,
    "sendAt": null,
    "createdAt": "2026-11-20T17:02:11.482Z",
    "sentAt": "2026-11-20T17:02:12.104Z",
    "deliveredAt": "2026-11-20T17:02:15.930Z"
  }
}

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

Path parameters#

idstringuuidrequired

The message id.

Responses#

200

The text.

application/json

messageobjectrequired

One text, sent or received. Field names are camelCase.

Child fields
idstringuuidrequired

The message id.

directionstringrequired

outbound: a text you sent. inbound: a text someone sent to one of your numbers.

One of "outbound", "inbound".

statusstringrequired

Where the text is:

  • queued: waiting to go out (now, at sendAt, when sending hours open, or for a retry after the carrier was busy).
  • sending: being handed to the carrier right now.
  • sent: the carrier accepted it.
  • delivered: the carrier confirmed it reached the phone.
  • failed: it could not be sent, or the carrier reported it undelivered. error says why. A text that never reached the carrier gets its credits back.
  • skipped: not sent, because the person opted out before it went out, its campaign was stopped, the number is blocked on SMSBlast, or (for a keyword reply) there were not enough credits. Credits are given back.
  • received: an inbound text.

One of "queued", "sending", "sent", "delivered", "failed", "skipped", "received".

kindstringrequired

What sent it: campaign, api (POST /v1/messages), conversation (a reply from the inbox), workflow, welcome (a signup form's welcome text), reply (the answer to a signup keyword), compliance (the automatic answer to STOP, HELP or START), test (a campaign test send) or inbound (a text someone sent you).

One of "campaign", "api", "conversation", "workflow", "welcome", "reply", "compliance", "test", "inbound".

fromstringrequired

The sending number for outbound texts; the person's number for inbound ones. E.164.

tostringrequired

The person's number for outbound texts; your number for inbound ones. E.164.

bodystringrequired

The text exactly as sent or received (personalisation already filled in, tracked links already shortened).

mediaUrlsarray of stringsurirequired

Pictures sent with the text (MMS). For inbound texts, the pictures the person sent.

creditsintegerrequired

Credits it cost: 1 per SMS segment, 3 for a picture message, 0 for inbound texts and compliance answers.

contactIdstringuuidnullablerequired

The contact it was sent to or came from, when there is one.

campaignIdstringuuidnullablerequired

The campaign it belongs to, for campaign texts.

errorstringnullablerequired

Why it failed or was skipped. While a text is queued for another try after the carrier was busy, this reads "Will retry: ...".

sendAtstringdate-timenullablerequired

The earliest time it may go out, when it was scheduled, held for sending hours, or is waiting for a retry. Empty when it goes out as soon as possible.

createdAtstringdate-timerequired

When it was created (outbound) or received (inbound).

sentAtstringdate-timenullablerequired

When the carrier accepted it.

deliveredAtstringdate-timenullablerequired

When the carrier confirmed delivery.

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 text 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.

Preview a message

POST/v1/messages/preview

Works out how a message body would be sent, without sending anything: its encoding, length in SMS segments, the credits one recipient would cost, and warnings worth fixing (no opt-out wording, characters that shorten each segment, personalisation that can change the length).

Personalisation tags are counted with their fallbacks ({first_name|there} counts as "there") or as empty.

Request

curl -X POST https://app.smsblast.net/v1/messages/preview \
  -H "Authorization: Bearer $SMSBLAST_API_KEY" \
  -H "Idempotency-Key: $(openssl rand -hex 16)" \
  -H "Content-Type: application/json" \
  -d '{
    "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/messages/preview', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
    'Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    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/messages/preview",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "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
{
  "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

bodystring

The message, with any personalisation tags.

mediaUrlsarray of strings

Send any non-empty list to price it as a picture message (3 credits).

Example request body
Request body
{
  "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 preview.

application/json

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).

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.

List incoming texts

GET/v1/messages/inbound

Texts people sent to your numbers, newest first. With review=true, only texts a person should read because they mention opting out without being an exact opt-out keyword (for example "please remove me from this"); exact keywords such as STOP are handled automatically.

The objects here are snake_case and leave out pictures; GET /v1/messages?direction=inbound gives full Message objects with cursor paging.

Request

curl https://app.smsblast.net/v1/messages/inbound \
  -H "Authorization: Bearer $SMSBLAST_API_KEY"
const res = await fetch('https://app.smsblast.net/v1/messages/inbound', {
  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/messages/inbound",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response · 200
{
  "messages": [
    {
      "id": "d1f3a5c7-9e0b-4d2f-a4c6-e8f0b2d4f697",
      "from_number": "+14155550101",
      "to_number": "+14155550100",
      "body": "Do you have rye bread today?",
      "needs_review": false,
      "contact_id": "0f8d5c3a-6b2e-4f1d-9a7c-3e5b8d2f1a60",
      "created_at": "2026-11-20T16:45:03.118Z"
    },
    {
      "id": "b2d4f6a8-0c1e-4a3c-8e5a-7c9e1a3c5e97",
      "from_number": "+14155550102",
      "to_number": "+14155550100",
      "body": "Please remove me from this",
      "needs_review": true,
      "contact_id": "7c4e1b9d-2a3f-4c5e-8d6b-9f0a1e2d3c71",
      "created_at": "2026-11-19T23:12:40.551Z"
    }
  ]
}

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

Query parameters#

limitinteger

How many to return, 1 to 200. Default 50.

Default 50. Limits: 1 to 200.

reviewstring

true for only the texts flagged for review.

One of "true".

Responses#

200

Incoming texts.

application/json

messagesarray of objectsrequired

Newest first.

Fields of each item
idstringuuidrequired

The message id (the same id GET /v1/messages/{id} uses).

from_numberstringrequired

The person's number, E.164.

to_numberstringrequired

Your number the text was sent to, E.164.

bodystringrequired

The text they sent.

needs_reviewbooleanrequired

true when the text mentions an opt-out word (stop, unsubscribe, remove, opt out, revoke) without being one of the exact opt-out keywords, so a person should read it and unsubscribe them if that is what they meant.

contact_idstringuuidnullablerequired

The contact, when the number is one.

created_atstringdate-timerequired

When it was received.

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.