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

API reference

Workflows

Automatic text series. A trigger (someone subscribes, is added to a list, texts a keyword, or has a birthday) starts a run for that person, who then goes through the steps: send a text, wait, add to or remove from a list. Each person goes through a workflow once (birthday workflows once a year), and leaves it when they opt out. Workflow texts follow campaign rules: credits, personalisation, tracked links and sending hours.

List workflows

GET/v1/workflows

All your workflows, newest first, with counts of people part way through, finished, exited and failed, and texts sent.

Request

curl https://app.smsblast.net/v1/workflows \
  -H "Authorization: Bearer $SMSBLAST_API_KEY"
const res = await fetch('https://app.smsblast.net/v1/workflows', {
  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/workflows",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response · 200
{
  "workflows": [
    {
      "id": "5e7c9a1b-3d5f-4a7c-9e1b-3d5f7a9c1e74",
      "name": "Welcome series",
      "enabled": true,
      "trigger": {
        "type": "subscribed"
      },
      "steps": [
        {
          "type": "send",
          "body": "Welcome to Corner Bakery texts, {first_name|friend}! Show this text for a free cookie. Reply STOP to opt out."
        },
        {
          "type": "wait",
          "amount": 3,
          "unit": "days"
        },
        {
          "type": "send",
          "body": "Did you know we bake rye every Thursday? Pre-order at https://example.com/order. Reply STOP to opt out."
        },
        {
          "type": "add_to_list",
          "listId": "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
        }
      ],
      "createdAt": "2026-11-10T20:14:05.902Z",
      "updatedAt": "2026-11-12T17:30:44.118Z",
      "stats": {
        "active": 37,
        "completed": 212,
        "exited": 6,
        "failed": 0,
        "sent": 461
      }
    }
  ]
}

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

Responses#

200

Your workflows.

application/json

workflowsarray of objectsrequired

Newest first.

Fields of each item
idstringuuidrequired

The workflow id.

namestringrequired

Name, for you only.

enabledbooleanrequired

Whether it is switched on. Switched off, it starts nobody new and the people part way through wait where they are until it is switched back on.

triggerobjectrequired

What starts a workflow for a contact:

  • subscribed: they become a subscriber: added with POST /v1/contacts (or by hand in the dashboard), sign up with a signup form, text a signup keyword for the first time (or after opting out), or text START to rejoin. Imports do not start workflows.
  • list_added: they are added to the list listId: with POST /v1/contacts/bulk (add_to_list), POST /v1/contacts with listId, a signup keyword or signup form that adds to the list, or another workflow's add_to_list step. Imports do not start workflows.
  • keyword: they text word, and that word is set up as a signup keyword under Keywords.
  • birthday: it is their birthday. Once a day, at hour (8 to 20, default 10) in your account's time zone, every subscribed contact whose custom field birthday is today (written MM/DD, MM/DD/YYYY or YYYY-MM-DD) starts the workflow. This repeats every year; 29 February birthdays count on 28 February in other years. Signup forms that ask for a birthday fill in that field.

Only subscribed contacts start. Each person goes through a workflow once, except birthday workflows, which they go through again each year (their run from the year before is replaced).

Shapes

One of these shapes:

subscribed
typestringrequired

Always "subscribed".

list_added
typestringrequired

Always "list_added".

listIdstringuuidrequired

The list.

keyword
typestringrequired

Always "keyword".

wordstringrequired

A keyword that is set up under Keywords (POST /v1/keywords), stored upper case without punctuation (join! becomes JOIN). An unknown word is refused with 400 invalid_trigger.

birthday
typestringrequired

Always "birthday".

hourinteger

The local hour (in your account's time zone) it runs each day, 8 to 20. Default 10.

Limits: 8 to 20.

stepsarray of objectsrequired

What happens, in order. Up to 30 steps.

Fields of each item

One of these shapes:

send
typestringrequired

Always "send".

bodystringrequired

The text, with any personalisation tags. May be empty when mediaUrls is given.

Limits: up to 1600 characters.

mediaUrlsarray of stringsuri

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

wait
typestringrequired

Always "wait".

amountintegerrequired

How many units to wait, at least 1.

Limits: at least 1.

unitstringrequired

The unit.

One of "minutes", "hours", "days".

add_to_list
typestringrequired

Always "add_to_list".

listIdstringuuidrequired

The list.

remove_from_list
typestringrequired

Always "remove_from_list".

listIdstringuuidrequired

The list.

createdAtstringdate-timerequired

When it was created.

updatedAtstringdate-timerequired

When it was last changed.

statsobjectrequired

Counts of runs (one per person) and texts.

Child fields
activeintegerrequired

People part way through.

completedintegerrequired

People who went through every step.

exitedintegerrequired

People who stopped early (opted out, or were deleted).

failedintegerrequired

People whose run failed (no approved number, not enough credits, or no plan after the free trial).

sentintegerrequired

Workflow texts sent or delivered.

Response headers
X-Request-Idstring Guide

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

X-RateLimit-Limitinteger Guide

Requests allowed per minute with this API key.

X-RateLimit-Remaininginteger Guide

Requests left in the current minute.

X-RateLimit-Resetinteger Guide

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

401

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

429

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

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

Create a workflow

POST/v1/workflows

Creates an automatic series: when the trigger happens to a contact (they subscribe, are added to a list, text a keyword, or it is their birthday), they go through the steps one by one: send a text, wait, add to or remove from a list. Each person goes through a workflow once (a birthday workflow once a year).

Workflow texts follow campaign rules: personalisation tags are filled in, they cost credits like any text, they wait for 8am to 9pm in the contact's time zone, and links become tracked short links. A person who opts out leaves the workflow at their next step. A run fails when a text cannot be queued: no approved number, not enough credits, or the account cannot send (the free trial is over and there is no plan).

A new workflow is off unless you send enabled: true, which needs at least one step.

Request

curl -X POST https://app.smsblast.net/v1/workflows \
  -H "Authorization: Bearer $SMSBLAST_API_KEY" \
  -H "Idempotency-Key: $(openssl rand -hex 16)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Welcome series",
    "trigger": {
      "type": "subscribed"
    },
    "steps": [
      {
        "type": "send",
        "body": "Welcome to Corner Bakery texts, {first_name|friend}! Show this text for a free cookie. Reply STOP to opt out."
      },
      {
        "type": "wait",
        "amount": 3,
        "unit": "days"
      },
      {
        "type": "send",
        "body": "Did you know we bake rye every Thursday? Pre-order at https://example.com/order. Reply STOP to opt out."
      },
      {
        "type": "add_to_list",
        "listId": "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
      }
    ],
    "enabled": true
  }'
const res = await fetch('https://app.smsblast.net/v1/workflows', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
    'Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'Welcome series',
    trigger: {
      type: 'subscribed',
    },
    steps: [
      {
        type: 'send',
        body: 'Welcome to Corner Bakery texts, {first_name|friend}! Show this text for a free cookie. Reply STOP to opt out.',
      },
      {
        type: 'wait',
        amount: 3,
        unit: 'days',
      },
      {
        type: 'send',
        body: 'Did you know we bake rye every Thursday? Pre-order at https://example.com/order. Reply STOP to opt out.',
      },
      {
        type: 'add_to_list',
        listId: 'e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30',
      },
    ],
    enabled: true,
  }),
});
console.log(res.status, await res.json());
import os
import uuid

import requests

res = requests.post(
    "https://app.smsblast.net/v1/workflows",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "name": "Welcome series",
        "trigger": {
            "type": "subscribed",
        },
        "steps": [
            {
                "type": "send",
                "body": "Welcome to Corner Bakery texts, {first_name|friend}! Show this text for a free cookie. Reply STOP to opt out.",
            },
            {
                "type": "wait",
                "amount": 3,
                "unit": "days",
            },
            {
                "type": "send",
                "body": "Did you know we bake rye every Thursday? Pre-order at https://example.com/order. Reply STOP to opt out.",
            },
            {
                "type": "add_to_list",
                "listId": "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30",
            },
        ],
        "enabled": True,
    },
)
print(res.status_code, res.json())
Response · 201
{
  "workflow": {
    "id": "5e7c9a1b-3d5f-4a7c-9e1b-3d5f7a9c1e74",
    "name": "Welcome series",
    "enabled": true,
    "trigger": {
      "type": "subscribed"
    },
    "steps": [
      {
        "type": "send",
        "body": "Welcome to Corner Bakery texts, {first_name|friend}! Show this text for a free cookie. Reply STOP to opt out."
      },
      {
        "type": "wait",
        "amount": 3,
        "unit": "days"
      },
      {
        "type": "send",
        "body": "Did you know we bake rye every Thursday? Pre-order at https://example.com/order. Reply STOP to opt out."
      },
      {
        "type": "add_to_list",
        "listId": "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
      }
    ],
    "createdAt": "2026-11-10T20:14:05.902Z",
    "updatedAt": "2026-11-10T20:14:05.902Z",
    "stats": {
      "active": 0,
      "completed": 0,
      "exited": 0,
      "failed": 0,
      "sent": 0
    }
  }
}

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

Headers#

Idempotency-Keystring Guide

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

Limits: up to 200 characters.

Example "2b5c4f8e-order-1042".

Request body#

application/json · required

namestring

Name, up to 120 characters. Default "Untitled workflow".

triggerobjectrequired

What starts a workflow for a contact:

  • subscribed: they become a subscriber: added with POST /v1/contacts (or by hand in the dashboard), sign up with a signup form, text a signup keyword for the first time (or after opting out), or text START to rejoin. Imports do not start workflows.
  • list_added: they are added to the list listId: with POST /v1/contacts/bulk (add_to_list), POST /v1/contacts with listId, a signup keyword or signup form that adds to the list, or another workflow's add_to_list step. Imports do not start workflows.
  • keyword: they text word, and that word is set up as a signup keyword under Keywords.
  • birthday: it is their birthday. Once a day, at hour (8 to 20, default 10) in your account's time zone, every subscribed contact whose custom field birthday is today (written MM/DD, MM/DD/YYYY or YYYY-MM-DD) starts the workflow. This repeats every year; 29 February birthdays count on 28 February in other years. Signup forms that ask for a birthday fill in that field.

Only subscribed contacts start. Each person goes through a workflow once, except birthday workflows, which they go through again each year (their run from the year before is replaced).

Shapes

One of these shapes:

subscribed
typestringrequired

Always "subscribed".

list_added
typestringrequired

Always "list_added".

listIdstringuuidrequired

The list.

keyword
typestringrequired

Always "keyword".

wordstringrequired

A keyword that is set up under Keywords (POST /v1/keywords), stored upper case without punctuation (join! becomes JOIN). An unknown word is refused with 400 invalid_trigger.

birthday
typestringrequired

Always "birthday".

hourinteger

The local hour (in your account's time zone) it runs each day, 8 to 20. Default 10.

Limits: 8 to 20.

stepsarray of objects

Up to 30 steps. Default none.

Limits: up to 30 items.

Fields of each item

One of these shapes:

send
typestringrequired

Always "send".

bodystringrequired

The text, with any personalisation tags. May be empty when mediaUrls is given.

Limits: up to 1600 characters.

mediaUrlsarray of stringsuri

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

wait
typestringrequired

Always "wait".

amountintegerrequired

How many units to wait, at least 1.

Limits: at least 1.

unitstringrequired

The unit.

One of "minutes", "hours", "days".

add_to_list
typestringrequired

Always "add_to_list".

listIdstringuuidrequired

The list.

remove_from_list
typestringrequired

Always "remove_from_list".

listIdstringuuidrequired

The list.

enabledboolean

true switches it on at once (it needs at least one step). Default false.

Example request body
Request body
{
  "name": "Welcome series",
  "trigger": {
    "type": "subscribed"
  },
  "steps": [
    {
      "type": "send",
      "body": "Welcome to Corner Bakery texts, {first_name|friend}! Show this text for a free cookie. Reply STOP to opt out."
    },
    {
      "type": "wait",
      "amount": 3,
      "unit": "days"
    },
    {
      "type": "send",
      "body": "Did you know we bake rye every Thursday? Pre-order at https://example.com/order. Reply STOP to opt out."
    },
    {
      "type": "add_to_list",
      "listId": "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
    }
  ],
  "enabled": true
}

Responses#

201

The new workflow.

application/json

workflowobjectrequired

An automatic series of texts and list changes that each person goes through once (birthday workflows: once a year). Field names are camelCase.

Child fields
idstringuuidrequired

The workflow id.

namestringrequired

Name, for you only.

enabledbooleanrequired

Whether it is switched on. Switched off, it starts nobody new and the people part way through wait where they are until it is switched back on.

triggerobjectrequired

What starts a workflow for a contact:

  • subscribed: they become a subscriber: added with POST /v1/contacts (or by hand in the dashboard), sign up with a signup form, text a signup keyword for the first time (or after opting out), or text START to rejoin. Imports do not start workflows.
  • list_added: they are added to the list listId: with POST /v1/contacts/bulk (add_to_list), POST /v1/contacts with listId, a signup keyword or signup form that adds to the list, or another workflow's add_to_list step. Imports do not start workflows.
  • keyword: they text word, and that word is set up as a signup keyword under Keywords.
  • birthday: it is their birthday. Once a day, at hour (8 to 20, default 10) in your account's time zone, every subscribed contact whose custom field birthday is today (written MM/DD, MM/DD/YYYY or YYYY-MM-DD) starts the workflow. This repeats every year; 29 February birthdays count on 28 February in other years. Signup forms that ask for a birthday fill in that field.

Only subscribed contacts start. Each person goes through a workflow once, except birthday workflows, which they go through again each year (their run from the year before is replaced).

Shapes

One of these shapes:

subscribed
typestringrequired

Always "subscribed".

list_added
typestringrequired

Always "list_added".

listIdstringuuidrequired

The list.

keyword
typestringrequired

Always "keyword".

wordstringrequired

A keyword that is set up under Keywords (POST /v1/keywords), stored upper case without punctuation (join! becomes JOIN). An unknown word is refused with 400 invalid_trigger.

birthday
typestringrequired

Always "birthday".

hourinteger

The local hour (in your account's time zone) it runs each day, 8 to 20. Default 10.

Limits: 8 to 20.

stepsarray of objectsrequired

What happens, in order. Up to 30 steps.

Fields of each item

One of these shapes:

send
typestringrequired

Always "send".

bodystringrequired

The text, with any personalisation tags. May be empty when mediaUrls is given.

Limits: up to 1600 characters.

mediaUrlsarray of stringsuri

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

wait
typestringrequired

Always "wait".

amountintegerrequired

How many units to wait, at least 1.

Limits: at least 1.

unitstringrequired

The unit.

One of "minutes", "hours", "days".

add_to_list
typestringrequired

Always "add_to_list".

listIdstringuuidrequired

The list.

remove_from_list
typestringrequired

Always "remove_from_list".

listIdstringuuidrequired

The list.

createdAtstringdate-timerequired

When it was created.

updatedAtstringdate-timerequired

When it was last changed.

statsobjectrequired

Counts of runs (one per person) and texts.

Child fields
activeintegerrequired

People part way through.

completedintegerrequired

People who went through every step.

exitedintegerrequired

People who stopped early (opted out, or were deleted).

failedintegerrequired

People whose run failed (no approved number, not enough credits, or no plan after the free trial).

sentintegerrequired

Workflow texts sent or delivered.

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_trigger: trigger is missing or not valid (an unknown type, a list that does not exist, an empty keyword, or a birthday hour outside 8 to 20).
  • invalid_steps: A step is not valid (the message says which and why), or there are more than 30.
  • no_steps: enabled is true but there are no steps.
  • 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.

Get a workflow

GET/v1/workflows/{id}

One workflow, its steps and its counts.

Request

curl https://app.smsblast.net/v1/workflows/5e7c9a1b-3d5f-4a7c-9e1b-3d5f7a9c1e74 \
  -H "Authorization: Bearer $SMSBLAST_API_KEY"
const res = await fetch('https://app.smsblast.net/v1/workflows/5e7c9a1b-3d5f-4a7c-9e1b-3d5f7a9c1e74', {
  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/workflows/5e7c9a1b-3d5f-4a7c-9e1b-3d5f7a9c1e74",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response · 200
{
  "workflow": {
    "id": "5e7c9a1b-3d5f-4a7c-9e1b-3d5f7a9c1e74",
    "name": "Welcome series",
    "enabled": true,
    "trigger": {
      "type": "subscribed"
    },
    "steps": [
      {
        "type": "send",
        "body": "Welcome to Corner Bakery texts, {first_name|friend}! Show this text for a free cookie. Reply STOP to opt out."
      },
      {
        "type": "wait",
        "amount": 3,
        "unit": "days"
      },
      {
        "type": "send",
        "body": "Did you know we bake rye every Thursday? Pre-order at https://example.com/order. Reply STOP to opt out."
      },
      {
        "type": "add_to_list",
        "listId": "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
      }
    ],
    "createdAt": "2026-11-10T20:14:05.902Z",
    "updatedAt": "2026-11-12T17:30:44.118Z",
    "stats": {
      "active": 37,
      "completed": 212,
      "exited": 6,
      "failed": 0,
      "sent": 461
    }
  }
}

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

Path parameters#

idstringuuidrequired

The workflow id.

Responses#

200

The workflow.

application/json

workflowobjectrequired

An automatic series of texts and list changes that each person goes through once (birthday workflows: once a year). Field names are camelCase.

Child fields
idstringuuidrequired

The workflow id.

namestringrequired

Name, for you only.

enabledbooleanrequired

Whether it is switched on. Switched off, it starts nobody new and the people part way through wait where they are until it is switched back on.

triggerobjectrequired

What starts a workflow for a contact:

  • subscribed: they become a subscriber: added with POST /v1/contacts (or by hand in the dashboard), sign up with a signup form, text a signup keyword for the first time (or after opting out), or text START to rejoin. Imports do not start workflows.
  • list_added: they are added to the list listId: with POST /v1/contacts/bulk (add_to_list), POST /v1/contacts with listId, a signup keyword or signup form that adds to the list, or another workflow's add_to_list step. Imports do not start workflows.
  • keyword: they text word, and that word is set up as a signup keyword under Keywords.
  • birthday: it is their birthday. Once a day, at hour (8 to 20, default 10) in your account's time zone, every subscribed contact whose custom field birthday is today (written MM/DD, MM/DD/YYYY or YYYY-MM-DD) starts the workflow. This repeats every year; 29 February birthdays count on 28 February in other years. Signup forms that ask for a birthday fill in that field.

Only subscribed contacts start. Each person goes through a workflow once, except birthday workflows, which they go through again each year (their run from the year before is replaced).

Shapes

One of these shapes:

subscribed
typestringrequired

Always "subscribed".

list_added
typestringrequired

Always "list_added".

listIdstringuuidrequired

The list.

keyword
typestringrequired

Always "keyword".

wordstringrequired

A keyword that is set up under Keywords (POST /v1/keywords), stored upper case without punctuation (join! becomes JOIN). An unknown word is refused with 400 invalid_trigger.

birthday
typestringrequired

Always "birthday".

hourinteger

The local hour (in your account's time zone) it runs each day, 8 to 20. Default 10.

Limits: 8 to 20.

stepsarray of objectsrequired

What happens, in order. Up to 30 steps.

Fields of each item

One of these shapes:

send
typestringrequired

Always "send".

bodystringrequired

The text, with any personalisation tags. May be empty when mediaUrls is given.

Limits: up to 1600 characters.

mediaUrlsarray of stringsuri

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

wait
typestringrequired

Always "wait".

amountintegerrequired

How many units to wait, at least 1.

Limits: at least 1.

unitstringrequired

The unit.

One of "minutes", "hours", "days".

add_to_list
typestringrequired

Always "add_to_list".

listIdstringuuidrequired

The list.

remove_from_list
typestringrequired

Always "remove_from_list".

listIdstringuuidrequired

The list.

createdAtstringdate-timerequired

When it was created.

updatedAtstringdate-timerequired

When it was last changed.

statsobjectrequired

Counts of runs (one per person) and texts.

Child fields
activeintegerrequired

People part way through.

completedintegerrequired

People who went through every step.

exitedintegerrequired

People who stopped early (opted out, or were deleted).

failedintegerrequired

People whose run failed (no approved number, not enough credits, or no plan after the free trial).

sentintegerrequired

Workflow texts sent or delivered.

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 workflow with that id in your account.
429

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

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

Update a workflow

PATCH/v1/workflows/{id}

Changes a workflow's name, trigger or steps, or switches it on or off. Only the fields you send change; steps, when sent, replaces the whole list.

Changes apply to people already part way through, from the step number they are on: if you insert or remove steps before that point, they carry on from whatever step now has that number. Switching a workflow off pauses everyone in it; switching it on again lets them carry on.

Request

curl -X PATCH https://app.smsblast.net/v1/workflows/5e7c9a1b-3d5f-4a7c-9e1b-3d5f7a9c1e74 \
  -H "Authorization: Bearer $SMSBLAST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": false
  }'
const res = await fetch('https://app.smsblast.net/v1/workflows/5e7c9a1b-3d5f-4a7c-9e1b-3d5f7a9c1e74', {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    enabled: false,
  }),
});
console.log(res.status, await res.json());
import os

import requests

res = requests.patch(
    "https://app.smsblast.net/v1/workflows/5e7c9a1b-3d5f-4a7c-9e1b-3d5f7a9c1e74",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
    },
    json={
        "enabled": False,
    },
)
print(res.status_code, res.json())
Response · 200
{
  "workflow": {
    "id": "5e7c9a1b-3d5f-4a7c-9e1b-3d5f7a9c1e74",
    "name": "Welcome series",
    "enabled": false,
    "trigger": {
      "type": "subscribed"
    },
    "steps": [
      {
        "type": "send",
        "body": "Welcome to Corner Bakery texts, {first_name|friend}! Show this text for a free cookie. Reply STOP to opt out."
      },
      {
        "type": "wait",
        "amount": 3,
        "unit": "days"
      },
      {
        "type": "send",
        "body": "Did you know we bake rye every Thursday? Pre-order at https://example.com/order. Reply STOP to opt out."
      },
      {
        "type": "add_to_list",
        "listId": "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
      }
    ],
    "createdAt": "2026-11-10T20:14:05.902Z",
    "updatedAt": "2026-11-22T18:02:31.004Z",
    "stats": {
      "active": 37,
      "completed": 212,
      "exited": 6,
      "failed": 0,
      "sent": 461
    }
  }
}

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

Path parameters#

idstringuuidrequired

The workflow id.

Request body#

application/json · required

Only the fields you send change.

namestring

New name.

triggerobject

What starts a workflow for a contact:

  • subscribed: they become a subscriber: added with POST /v1/contacts (or by hand in the dashboard), sign up with a signup form, text a signup keyword for the first time (or after opting out), or text START to rejoin. Imports do not start workflows.
  • list_added: they are added to the list listId: with POST /v1/contacts/bulk (add_to_list), POST /v1/contacts with listId, a signup keyword or signup form that adds to the list, or another workflow's add_to_list step. Imports do not start workflows.
  • keyword: they text word, and that word is set up as a signup keyword under Keywords.
  • birthday: it is their birthday. Once a day, at hour (8 to 20, default 10) in your account's time zone, every subscribed contact whose custom field birthday is today (written MM/DD, MM/DD/YYYY or YYYY-MM-DD) starts the workflow. This repeats every year; 29 February birthdays count on 28 February in other years. Signup forms that ask for a birthday fill in that field.

Only subscribed contacts start. Each person goes through a workflow once, except birthday workflows, which they go through again each year (their run from the year before is replaced).

Shapes

One of these shapes:

subscribed
typestringrequired

Always "subscribed".

list_added
typestringrequired

Always "list_added".

listIdstringuuidrequired

The list.

keyword
typestringrequired

Always "keyword".

wordstringrequired

A keyword that is set up under Keywords (POST /v1/keywords), stored upper case without punctuation (join! becomes JOIN). An unknown word is refused with 400 invalid_trigger.

birthday
typestringrequired

Always "birthday".

hourinteger

The local hour (in your account's time zone) it runs each day, 8 to 20. Default 10.

Limits: 8 to 20.

stepsarray of objects

The full new list of steps, replacing the old one.

Limits: up to 30 items.

Fields of each item

One of these shapes:

send
typestringrequired

Always "send".

bodystringrequired

The text, with any personalisation tags. May be empty when mediaUrls is given.

Limits: up to 1600 characters.

mediaUrlsarray of stringsuri

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

wait
typestringrequired

Always "wait".

amountintegerrequired

How many units to wait, at least 1.

Limits: at least 1.

unitstringrequired

The unit.

One of "minutes", "hours", "days".

add_to_list
typestringrequired

Always "add_to_list".

listIdstringuuidrequired

The list.

remove_from_list
typestringrequired

Always "remove_from_list".

listIdstringuuidrequired

The list.

enabledboolean

Switch it on (it needs at least one step) or off.

Example request body
Request body
{
  "enabled": false
}

Responses#

200

The workflow.

application/json

workflowobjectrequired

An automatic series of texts and list changes that each person goes through once (birthday workflows: once a year). Field names are camelCase.

Child fields
idstringuuidrequired

The workflow id.

namestringrequired

Name, for you only.

enabledbooleanrequired

Whether it is switched on. Switched off, it starts nobody new and the people part way through wait where they are until it is switched back on.

triggerobjectrequired

What starts a workflow for a contact:

  • subscribed: they become a subscriber: added with POST /v1/contacts (or by hand in the dashboard), sign up with a signup form, text a signup keyword for the first time (or after opting out), or text START to rejoin. Imports do not start workflows.
  • list_added: they are added to the list listId: with POST /v1/contacts/bulk (add_to_list), POST /v1/contacts with listId, a signup keyword or signup form that adds to the list, or another workflow's add_to_list step. Imports do not start workflows.
  • keyword: they text word, and that word is set up as a signup keyword under Keywords.
  • birthday: it is their birthday. Once a day, at hour (8 to 20, default 10) in your account's time zone, every subscribed contact whose custom field birthday is today (written MM/DD, MM/DD/YYYY or YYYY-MM-DD) starts the workflow. This repeats every year; 29 February birthdays count on 28 February in other years. Signup forms that ask for a birthday fill in that field.

Only subscribed contacts start. Each person goes through a workflow once, except birthday workflows, which they go through again each year (their run from the year before is replaced).

Shapes

One of these shapes:

subscribed
typestringrequired

Always "subscribed".

list_added
typestringrequired

Always "list_added".

listIdstringuuidrequired

The list.

keyword
typestringrequired

Always "keyword".

wordstringrequired

A keyword that is set up under Keywords (POST /v1/keywords), stored upper case without punctuation (join! becomes JOIN). An unknown word is refused with 400 invalid_trigger.

birthday
typestringrequired

Always "birthday".

hourinteger

The local hour (in your account's time zone) it runs each day, 8 to 20. Default 10.

Limits: 8 to 20.

stepsarray of objectsrequired

What happens, in order. Up to 30 steps.

Fields of each item

One of these shapes:

send
typestringrequired

Always "send".

bodystringrequired

The text, with any personalisation tags. May be empty when mediaUrls is given.

Limits: up to 1600 characters.

mediaUrlsarray of stringsuri

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

wait
typestringrequired

Always "wait".

amountintegerrequired

How many units to wait, at least 1.

Limits: at least 1.

unitstringrequired

The unit.

One of "minutes", "hours", "days".

add_to_list
typestringrequired

Always "add_to_list".

listIdstringuuidrequired

The list.

remove_from_list
typestringrequired

Always "remove_from_list".

listIdstringuuidrequired

The list.

createdAtstringdate-timerequired

When it was created.

updatedAtstringdate-timerequired

When it was last changed.

statsobjectrequired

Counts of runs (one per person) and texts.

Child fields
activeintegerrequired

People part way through.

completedintegerrequired

People who went through every step.

exitedintegerrequired

People who stopped early (opted out, or were deleted).

failedintegerrequired

People whose run failed (no approved number, not enough credits, or no plan after the free trial).

sentintegerrequired

Workflow texts sent or delivered.

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_trigger: trigger is not valid.
  • invalid_steps: A step is not valid, or there are more than 30.
  • no_steps: Switching on a workflow with no steps.
  • invalid_json: The body is not a JSON object.
401

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

404

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

  • not_found: No workflow 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.

Delete a workflow

DELETE/v1/workflows/{id}

Deletes a workflow and everyone's place in it. Texts it already queued still go out.

Request

curl -X DELETE https://app.smsblast.net/v1/workflows/5e7c9a1b-3d5f-4a7c-9e1b-3d5f7a9c1e74 \
  -H "Authorization: Bearer $SMSBLAST_API_KEY"
const res = await fetch('https://app.smsblast.net/v1/workflows/5e7c9a1b-3d5f-4a7c-9e1b-3d5f7a9c1e74', {
  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/workflows/5e7c9a1b-3d5f-4a7c-9e1b-3d5f7a9c1e74",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response · 200
{
  "ok": true
}

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

Path parameters#

idstringuuidrequired

The workflow id.

Responses#

200

Deleted.

application/json

okbooleanrequired

Always true.

Response headers
X-Request-Idstring Guide

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

X-RateLimit-Limitinteger Guide

Requests allowed per minute with this API key.

X-RateLimit-Remaininginteger Guide

Requests left in the current minute.

X-RateLimit-Resetinteger Guide

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

401

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

404

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

  • not_found: No workflow 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.

List people in a workflow

GET/v1/workflows/{id}/runs

The people who started a workflow (one run each), newest first, with where they are and how their run ended.

Request

curl https://app.smsblast.net/v1/workflows/5e7c9a1b-3d5f-4a7c-9e1b-3d5f7a9c1e74/runs \
  -H "Authorization: Bearer $SMSBLAST_API_KEY"
const res = await fetch('https://app.smsblast.net/v1/workflows/5e7c9a1b-3d5f-4a7c-9e1b-3d5f7a9c1e74/runs', {
  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/workflows/5e7c9a1b-3d5f-4a7c-9e1b-3d5f7a9c1e74/runs",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response · 200
{
  "runs": [
    {
      "id": "7a9c1e3b-5d7f-4c9a-8b1d-3f5a7c9e1b85",
      "status": "active",
      "step": 2,
      "nextRunAt": "2026-11-23T18:24:10.000Z",
      "detail": null,
      "createdAt": "2026-11-20T18:24:09.950Z",
      "finishedAt": null,
      "contact": {
        "id": "0f8d5c3a-6b2e-4f1d-9a7c-3e5b8d2f1a60",
        "phone": "+14155550101",
        "first_name": "Alice",
        "last_name": "Moreno"
      }
    },
    {
      "id": "c9e1a3c5-7e9b-4d1f-a3c5-e7a9c1e3a5b6",
      "status": "exited",
      "step": 2,
      "nextRunAt": null,
      "detail": "The contact opted out",
      "createdAt": "2026-11-09T21:40:52.300Z",
      "finishedAt": "2026-11-19T23:15:04.000Z",
      "contact": {
        "id": "7c4e1b9d-2a3f-4c5e-8d6b-9f0a1e2d3c71",
        "phone": "+14155550102",
        "first_name": "Ben",
        "last_name": "Carter"
      }
    }
  ]
}

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

Path parameters#

idstringuuidrequired

The workflow id.

Query parameters#

statusstring

Only runs with this status.

One of "active", "completed", "exited", "failed".

limitinteger

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

Default 50. Limits: 1 to 200.

Responses#

200

Runs.

application/json

runsarray of objectsrequired

Newest first.

Fields of each item
idstringuuidrequired

The run id.

statusstringrequired

active: part way through. completed: went through every step. exited: stopped early because the contact opted out or was deleted (or the workflow was). failed: a text could not be queued (no approved number, not enough credits, or the account cannot send: the free trial is over and there is no plan); detail says which.

One of "active", "completed", "exited", "failed".

stepintegerrequired

The next step to run, counted from 0. Equal to the number of steps once completed.

nextRunAtstringdate-timenullablerequired

When the run moves on next (the end of a wait). Empty while it is being processed or once it has ended.

detailstringnullablerequired

Why it exited or failed, such as "The contact opted out", "Not enough credits" or "Your 14-day free trial has ended. Choose a plan on the Billing page to keep sending."

createdAtstringdate-timerequired

When the person started the workflow.

finishedAtstringdate-timenullablerequired

When the run ended.

contactobjectrequired

Who it is (snake_case, like contacts).

Child fields
idstringuuidrequired

The contact id.

phonestringrequired

Their number, E.164.

first_namestringnullablerequired

First name.

last_namestringnullablerequired

Last name.

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

Enroll contacts in a workflow

POST/v1/workflows/{id}/enroll

Starts the workflow now for contacts you choose, whatever its trigger: specific contacts (contactIds), or an audience like a campaign's (audience: everyone, lists and/or segments). Only subscribed contacts who have not been through the workflow before start; started says how many did.

Say who explicitly: contactIds as a list, or audience as an object ({"all": true} for everyone subscribed). A request with neither is refused (no_audience). If the workflow is switched off, the people wait at the first step until it is switched on.

Request

curl -X POST https://app.smsblast.net/v1/workflows/5e7c9a1b-3d5f-4a7c-9e1b-3d5f7a9c1e74/enroll \
  -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"
      ]
    }
  }'
const res = await fetch('https://app.smsblast.net/v1/workflows/5e7c9a1b-3d5f-4a7c-9e1b-3d5f7a9c1e74/enroll', {
  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'],
    },
  }),
});
console.log(res.status, await res.json());
import os
import uuid

import requests

res = requests.post(
    "https://app.smsblast.net/v1/workflows/5e7c9a1b-3d5f-4a7c-9e1b-3d5f7a9c1e74/enroll",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "audience": {
            "lists": ["e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"],
        },
    },
)
print(res.status_code, res.json())
Response · 200
{
  "started": 398
}

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

Path parameters#

idstringuuidrequired

The workflow id.

Headers#

Idempotency-Keystring Guide

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

Limits: up to 200 characters.

Example "2b5c4f8e-order-1042".

Request body#

application/json · required

Send contactIds (a list) or audience (an object). Without either, the request is refused with no_audience. Note that an audience with no lists or segments, such as {}, means everyone subscribed, the same as {"all": true}.

contactIdsarray of stringsuuid

Specific contacts to start. When this is a list, audience is ignored.

audienceobject

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

Child fields
allboolean

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

Always true.

listsarray of stringsuuid

List ids.

segmentsarray of stringsuuid

Segment ids.

Example request body
Request body
{
  "audience": {
    "lists": [
      "e3a9c7f2-4b1d-4e8a-9c6f-2d5b7a1e8f30"
    ]
  }
}

Responses#

200

How many started.

application/json

startedintegerrequired

People who started the workflow now: subscribed contacts that were not in it before.

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:

  • no_steps: The workflow has no steps.
  • no_audience: Neither contactIds (a list) nor audience (an object) was sent.
  • invalid_json: The body is not a JSON object.
  • invalid_idempotency_key: The Idempotency-Key header is longer than 200 characters.
401

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

404

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

  • not_found: No workflow with that id, or a list or segment in audience does not exist.
409

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

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

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

429

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

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