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

API reference

Webhooks

Have SMSBlast tell your own systems the moment something happens: a reply comes in, a text is delivered, someone opts out, a campaign finishes, a link is clicked. Each event is posted as JSON to the endpoints subscribed to it (see the event payloads under Webhooks/Events).

Verify every delivery. The SMSBlast-Signature header looks like t=1795712703,v1=5f0b.... Compute an HMAC-SHA256 with your webhook's secret (whsec_...) over the string <t>.<raw request body> (the exact bytes received, before parsing the JSON), hex-encode it and compare it to v1 in constant time. Reject the delivery if they differ or if t is more than 5 minutes from now.

Answer quickly. Any 2xx within 10 seconds marks a delivery done; do slow work afterwards. Anything else (an error status, a redirect, a timeout) is retried after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours and 24 hours: 8 attempts over about two days, then the delivery is failed (send it again with the retry operation). An endpoint that fails 100 deliveries in a row is switched off; switch it back on with PATCH once it is fixed.

Expect repeats and any order. The same event can arrive more than once and events can arrive out of order: use the event id (also SMSBlast-Event-Id) to ignore repeats. Events that happen while an endpoint is switched off are not sent later. Delivery history is kept for 30 days.

List webhooks

GET/v1/webhooks

Your webhook endpoints, oldest first (without their secrets), and every event type you can subscribe to.

Request

curl https://app.smsblast.net/v1/webhooks \
  -H "Authorization: Bearer $SMSBLAST_API_KEY"
const res = await fetch('https://app.smsblast.net/v1/webhooks', {
  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/webhooks",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response · 200
{
  "webhooks": [
    {
      "id": "8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30",
      "url": "https://hooks.example.com/smsblast",
      "description": "CRM sync",
      "events": [
        "message.received",
        "contact.opted_out"
      ],
      "enabled": true,
      "disabledReason": null,
      "lastSuccessAt": "2026-11-20T16:45:05.441Z",
      "lastFailureAt": null,
      "createdAt": "2026-11-01T15:00:12.000Z"
    }
  ],
  "eventTypes": [
    "message.received",
    "message.sent",
    "message.delivered",
    "message.failed",
    "contact.created",
    "contact.opted_in",
    "contact.opted_out",
    "campaign.sending",
    "campaign.sent",
    "link.clicked"
  ]
}

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

Responses#

200

Webhooks and event types.

application/json

webhooksarray of objectsrequired

Oldest first. secret is not included.

Fields of each item
idstringuuidrequired

The webhook id.

urlstringurirequired

Where events are posted: a public https address.

descriptionstringnullablerequired

A note, for you.

eventsarray of stringsrequired

The event types it gets (see EventType), or ["*"] for all of them.

enabledbooleanrequired

Whether events are sent to it. It is switched off by you, or automatically after 100 failed deliveries in a row.

disabledReasonstringnullablerequired

Why it was switched off automatically.

lastSuccessAtstringdate-timenullablerequired

The last delivery it answered with a 2xx.

lastFailureAtstringdate-timenullablerequired

The last delivery that failed.

createdAtstringdate-timerequired

When it was created.

secretstring

The signing secret (whsec_...) used for the SMSBlast-Signature header. Included when you create, fetch, update or rotate a webhook; not in the list.

eventTypesarray of stringsrequired

Every event type.

Each one of "message.received", "message.sent", "message.delivered", "message.failed", "contact.created", "contact.opted_in", "contact.opted_out", "campaign.sending", "campaign.sent", "link.clicked".

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 webhook

POST/v1/webhooks

Adds an endpoint of yours that SMSBlast posts events to, for the event types you choose (or ["*"] for all, the default). The address must be public and https; addresses in private networks are refused when saved and again before every delivery.

The answer includes the signing secret (whsec_...): use it to check the SMSBlast-Signature header of every delivery. You can fetch it again with GET /v1/webhooks/{id}. Up to 10 webhooks per account. Send a test event with POST /v1/webhooks/{id}/test.

Request

curl -X POST https://app.smsblast.net/v1/webhooks \
  -H "Authorization: Bearer $SMSBLAST_API_KEY" \
  -H "Idempotency-Key: $(openssl rand -hex 16)" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://hooks.example.com/smsblast",
    "events": [
      "message.received",
      "contact.opted_out"
    ],
    "description": "CRM sync"
  }'
const res = await fetch('https://app.smsblast.net/v1/webhooks', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
    'Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    url: 'https://hooks.example.com/smsblast',
    events: ['message.received', 'contact.opted_out'],
    description: 'CRM sync',
  }),
});
console.log(res.status, await res.json());
import os
import uuid

import requests

res = requests.post(
    "https://app.smsblast.net/v1/webhooks",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "url": "https://hooks.example.com/smsblast",
        "events": ["message.received", "contact.opted_out"],
        "description": "CRM sync",
    },
)
print(res.status_code, res.json())
Response · 201
{
  "webhook": {
    "id": "8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30",
    "url": "https://hooks.example.com/smsblast",
    "description": "CRM sync",
    "events": [
      "message.received",
      "contact.opted_out"
    ],
    "enabled": true,
    "disabledReason": null,
    "lastSuccessAt": null,
    "lastFailureAt": null,
    "createdAt": "2026-11-01T15:00:12.000Z",
    "secret": "whsec_Zk3vQ8pL2mN7xR4tW9yB1cD6fH0jK5sA"
  }
}

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

urlstringurirequired

A public https address. Addresses inside private networks, localhost and addresses with a user name or password are refused.

eventsarray of strings

Event types (see EventType), or ["*"] for all. Default ["*"].

Limits: at least 1 item.

descriptionstringnullable

A note, up to 200 characters.

Example request body
Request body
{
  "url": "https://hooks.example.com/smsblast",
  "events": [
    "message.received",
    "contact.opted_out"
  ],
  "description": "CRM sync"
}

Responses#

201

The new webhook, with its secret.

application/json

webhookobjectrequired

A place your own system receives events. Field names are camelCase.

Child fields
idstringuuidrequired

The webhook id.

urlstringurirequired

Where events are posted: a public https address.

descriptionstringnullablerequired

A note, for you.

eventsarray of stringsrequired

The event types it gets (see EventType), or ["*"] for all of them.

enabledbooleanrequired

Whether events are sent to it. It is switched off by you, or automatically after 100 failed deliveries in a row.

disabledReasonstringnullablerequired

Why it was switched off automatically.

lastSuccessAtstringdate-timenullablerequired

The last delivery it answered with a 2xx.

lastFailureAtstringdate-timenullablerequired

The last delivery that failed.

createdAtstringdate-timerequired

When it was created.

secretstring

The signing secret (whsec_...) used for the SMSBlast-Signature header. Included when you create, fetch, update or rotate a webhook; not in the list.

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_url: url is not a full public https address (or the host cannot be found).
  • invalid_events: events is empty or has an unknown type (details.allowed lists them).
  • 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:

  • too_many_webhooks: You already have 10 webhooks.
  • 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 webhook

GET/v1/webhooks/{id}

One webhook endpoint, with its signing secret.

Request

curl https://app.smsblast.net/v1/webhooks/8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30 \
  -H "Authorization: Bearer $SMSBLAST_API_KEY"
const res = await fetch('https://app.smsblast.net/v1/webhooks/8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30', {
  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/webhooks/8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response · 200
{
  "webhook": {
    "id": "8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30",
    "url": "https://hooks.example.com/smsblast",
    "description": "CRM sync",
    "events": [
      "message.received",
      "contact.opted_out"
    ],
    "enabled": true,
    "disabledReason": null,
    "lastSuccessAt": "2026-11-20T16:45:05.441Z",
    "lastFailureAt": null,
    "createdAt": "2026-11-01T15:00:12.000Z",
    "secret": "whsec_Zk3vQ8pL2mN7xR4tW9yB1cD6fH0jK5sA"
  }
}

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

Path parameters#

idstringuuidrequired

The webhook id.

Responses#

200

The webhook.

application/json

webhookobjectrequired

A place your own system receives events. Field names are camelCase.

Child fields
idstringuuidrequired

The webhook id.

urlstringurirequired

Where events are posted: a public https address.

descriptionstringnullablerequired

A note, for you.

eventsarray of stringsrequired

The event types it gets (see EventType), or ["*"] for all of them.

enabledbooleanrequired

Whether events are sent to it. It is switched off by you, or automatically after 100 failed deliveries in a row.

disabledReasonstringnullablerequired

Why it was switched off automatically.

lastSuccessAtstringdate-timenullablerequired

The last delivery it answered with a 2xx.

lastFailureAtstringdate-timenullablerequired

The last delivery that failed.

createdAtstringdate-timerequired

When it was created.

secretstring

The signing secret (whsec_...) used for the SMSBlast-Signature header. Included when you create, fetch, update or rotate a webhook; not in the list.

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 webhook 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 webhook

PATCH/v1/webhooks/{id}

Changes a webhook's address, events or description, or switches it off or on. Only the fields you send change. Switching it back on (after you switched it off, or after it was switched off for failing 100 times in a row) clears disabledReason and the failure count. Events that happen while it is off are not sent later.

Request

curl -X PATCH https://app.smsblast.net/v1/webhooks/8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30 \
  -H "Authorization: Bearer $SMSBLAST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "events": [
      "*"
    ],
    "enabled": true
  }'
const res = await fetch('https://app.smsblast.net/v1/webhooks/8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30', {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    events: ['*'],
    enabled: true,
  }),
});
console.log(res.status, await res.json());
import os

import requests

res = requests.patch(
    "https://app.smsblast.net/v1/webhooks/8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
    },
    json={
        "events": ["*"],
        "enabled": True,
    },
)
print(res.status_code, res.json())
Response · 200
{
  "webhook": {
    "id": "8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30",
    "url": "https://hooks.example.com/smsblast",
    "description": "CRM sync",
    "events": [
      "*"
    ],
    "enabled": true,
    "disabledReason": null,
    "lastSuccessAt": "2026-11-20T16:45:05.441Z",
    "lastFailureAt": null,
    "createdAt": "2026-11-01T15:00:12.000Z",
    "secret": "whsec_Zk3vQ8pL2mN7xR4tW9yB1cD6fH0jK5sA"
  }
}

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

Path parameters#

idstringuuidrequired

The webhook id.

Request body#

application/json · required

Only the fields you send change.

urlstringuri

A new public https address.

eventsarray of strings

The new event types, or ["*"].

Limits: at least 1 item.

descriptionstringnullable

A new note.

enabledboolean

false switches it off; true switches it back on and clears disabledReason and the failure count.

Example request body
Request body
{
  "events": [
    "*"
  ],
  "enabled": true
}

Responses#

200

The webhook.

application/json

webhookobjectrequired

A place your own system receives events. Field names are camelCase.

Child fields
idstringuuidrequired

The webhook id.

urlstringurirequired

Where events are posted: a public https address.

descriptionstringnullablerequired

A note, for you.

eventsarray of stringsrequired

The event types it gets (see EventType), or ["*"] for all of them.

enabledbooleanrequired

Whether events are sent to it. It is switched off by you, or automatically after 100 failed deliveries in a row.

disabledReasonstringnullablerequired

Why it was switched off automatically.

lastSuccessAtstringdate-timenullablerequired

The last delivery it answered with a 2xx.

lastFailureAtstringdate-timenullablerequired

The last delivery that failed.

createdAtstringdate-timerequired

When it was created.

secretstring

The signing secret (whsec_...) used for the SMSBlast-Signature header. Included when you create, fetch, update or rotate a webhook; not in the list.

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_url: url is not a full public https address.
  • invalid_events: events is empty or has an unknown type.
  • 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 webhook 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 webhook

DELETE/v1/webhooks/{id}

Deletes a webhook and its delivery history. Deliveries still waiting are dropped.

Request

curl -X DELETE https://app.smsblast.net/v1/webhooks/8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30 \
  -H "Authorization: Bearer $SMSBLAST_API_KEY"
const res = await fetch('https://app.smsblast.net/v1/webhooks/8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30', {
  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/webhooks/8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30",
    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 webhook 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 webhook 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.

Rotate the signing secret

POST/v1/webhooks/{id}/rotate-secret

Gives the webhook a new signing secret. The old one stops working at once: every delivery from now on, retries included, is signed with the new secret, so update your endpoint right after.

Request

curl -X POST https://app.smsblast.net/v1/webhooks/8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30/rotate-secret \
  -H "Authorization: Bearer $SMSBLAST_API_KEY" \
  -H "Idempotency-Key: $(openssl rand -hex 16)"
const res = await fetch('https://app.smsblast.net/v1/webhooks/8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30/rotate-secret', {
  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/webhooks/8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30/rotate-secret",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
)
print(res.status_code, res.json())
Response · 200
{
  "webhook": {
    "id": "8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30",
    "url": "https://hooks.example.com/smsblast",
    "description": "CRM sync",
    "events": [
      "message.received",
      "contact.opted_out"
    ],
    "enabled": true,
    "disabledReason": null,
    "lastSuccessAt": "2026-11-20T16:45:05.441Z",
    "lastFailureAt": null,
    "createdAt": "2026-11-01T15:00:12.000Z",
    "secret": "whsec_Pq7rS2tU9vW4xY1zA6bC3dE8fG5hJ0kL"
  }
}

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

Path parameters#

idstringuuidrequired

The webhook id.

Headers#

Idempotency-Keystring Guide

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

Limits: up to 200 characters.

Example "2b5c4f8e-order-1042".

Responses#

200

The webhook with its new secret.

application/json

webhookobjectrequired

A place your own system receives events. Field names are camelCase.

Child fields
idstringuuidrequired

The webhook id.

urlstringurirequired

Where events are posted: a public https address.

descriptionstringnullablerequired

A note, for you.

eventsarray of stringsrequired

The event types it gets (see EventType), or ["*"] for all of them.

enabledbooleanrequired

Whether events are sent to it. It is switched off by you, or automatically after 100 failed deliveries in a row.

disabledReasonstringnullablerequired

Why it was switched off automatically.

lastSuccessAtstringdate-timenullablerequired

The last delivery it answered with a 2xx.

lastFailureAtstringdate-timenullablerequired

The last delivery that failed.

createdAtstringdate-timerequired

When it was created.

secretstring

The signing secret (whsec_...) used for the SMSBlast-Signature header. Included when you create, fetch, update or rotate a webhook; not in the list.

Response headers
X-Request-Idstring Guide

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

X-RateLimit-Limitinteger Guide

Requests allowed per minute with this API key.

X-RateLimit-Remaininginteger Guide

Requests left in the current minute.

X-RateLimit-Resetinteger Guide

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

Idempotent-Replayedstring Guide

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

One of "true".

400

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

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

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

404

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

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

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

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

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

429

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

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

Send a test event

POST/v1/webhooks/{id}/test

Queues a webhook.test event to this endpoint (even if it is switched off), signed like any other, to check your endpoint is reachable and verifies signatures. It goes out within a few seconds, is tried once and never retried; see the result in GET /v1/webhooks/{id}/deliveries.

Request

curl -X POST https://app.smsblast.net/v1/webhooks/8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30/test \
  -H "Authorization: Bearer $SMSBLAST_API_KEY" \
  -H "Idempotency-Key: $(openssl rand -hex 16)"
const res = await fetch('https://app.smsblast.net/v1/webhooks/8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30/test', {
  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/webhooks/8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30/test",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
)
print(res.status_code, res.json())
Response · 201
{
  "deliveryId": "3c5e7a9b-1d3f-4b5c-8e7a-9b1d3f5a7c41",
  "eventId": "evt_Qm4xT9rV2kLp8NwZ"
}

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

Path parameters#

idstringuuidrequired

The webhook id.

Headers#

Idempotency-Keystring Guide

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

Limits: up to 200 characters.

Example "2b5c4f8e-order-1042".

Responses#

201

The test delivery, queued.

application/json

deliveryIdstringuuidrequired

The delivery. Watch it in GET /v1/webhooks/{id}/deliveries.

eventIdstringrequired

The test event id.

Response headers
X-Request-Idstring Guide

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

X-RateLimit-Limitinteger Guide

Requests allowed per minute with this API key.

X-RateLimit-Remaininginteger Guide

Requests left in the current minute.

X-RateLimit-Resetinteger Guide

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

Idempotent-Replayedstring Guide

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

One of "true".

400

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

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

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

404

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

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

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

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

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

429

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

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

List deliveries

GET/v1/webhooks/{id}/deliveries

The events sent (or waiting to be sent) to one endpoint, newest first, with each attempt's outcome and the payload. History is kept for 30 days.

Request

curl https://app.smsblast.net/v1/webhooks/8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30/deliveries \
  -H "Authorization: Bearer $SMSBLAST_API_KEY"
const res = await fetch('https://app.smsblast.net/v1/webhooks/8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30/deliveries', {
  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/webhooks/8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30/deliveries",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
    },
)
print(res.status_code, res.json())
Response · 200
{
  "deliveries": [
    {
      "id": "3c5e7a9b-1d3f-4b5c-8e7a-9b1d3f5a7c41",
      "eventId": "evt_Qm4xT9rV2kLp8NwZ",
      "eventType": "message.received",
      "status": "pending",
      "attempts": 2,
      "nextAttemptAt": "2026-11-20T17:21:05.000Z",
      "lastStatus": 503,
      "lastError": "Answered 503",
      "lastResponse": "Service Unavailable",
      "createdAt": "2026-11-20T16:45:03.200Z",
      "deliveredAt": null,
      "payload": {
        "id": "evt_Qm4xT9rV2kLp8NwZ",
        "type": "message.received",
        "created": "2026-11-20T16:45:03.200Z",
        "data": {
          "message": {
            "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
          }
        }
      }
    }
  ]
}

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

Path parameters#

idstringuuidrequired

The webhook id.

Query parameters#

statusstring

Only deliveries with this status.

One of "pending", "sending", "delivered", "failed", "canceled".

limitinteger

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

Default 50. Limits: 1 to 100.

Responses#

200

Deliveries.

application/json

deliveriesarray of objectsrequired

Newest first.

Fields of each item
idstringuuidrequired

The delivery id.

eventIdstringrequired

The event id (evt_...).

eventTypestringrequired

The event type.

statusstringrequired

pending: waiting for its first try or a retry. sending: being posted. delivered: your endpoint answered 2xx. failed: every attempt failed (or, for a test event, the one attempt). canceled: not sent because the webhook was switched off or deleted.

One of "pending", "sending", "delivered", "failed", "canceled".

attemptsintegerrequired

Attempts so far.

nextAttemptAtstringdate-timenullablerequired

When it will be tried next, while pending.

lastStatusintegernullablerequired

The HTTP status your endpoint last answered with. Empty when it could not be reached.

lastErrorstringnullablerequired

What went wrong last time, such as "Answered 500", "No answer within 10 seconds" or "Redirected (301); webhooks do not follow redirects".

lastResponsestringnullablerequired

The first 500 characters of your endpoint's last answer.

createdAtstringdate-timerequired

When the event was recorded for this endpoint.

deliveredAtstringdate-timenullablerequired

When it was delivered.

payloadobjectrequired

What a webhook delivery posts: an envelope with the event id, type and time, and the event's data.

Shapes

One of these shapes:

type: message.received

Someone texted one of your numbers. Sent for every incoming text, including STOP, HELP and keywords.

idstringrequired

The event id, evt_ and 16 characters. The same event can be delivered more than once (a retry, or a manual resend): use the id to ignore repeats. Also sent in the SMSBlast-Event-Id header.

typestringrequired

The event type. Also sent in the SMSBlast-Event-Type header.

Always "message.received".

createdstringdate-timerequired

When the event happened.

dataobjectrequired

The text as GET /v1/messages/{id} returned it at the time of the event.

Child fields
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.

type: message.sent

The carrier accepted an outgoing text (of any kind: campaign, API, inbox, workflow, keyword reply, compliance answer or test).

idstringrequired

The event id, evt_ and 16 characters. The same event can be delivered more than once (a retry, or a manual resend): use the id to ignore repeats. Also sent in the SMSBlast-Event-Id header.

typestringrequired

The event type. Also sent in the SMSBlast-Event-Type header.

Always "message.sent".

createdstringdate-timerequired

When the event happened.

dataobjectrequired

The text as GET /v1/messages/{id} returned it at the time of the event.

Child fields
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.

type: message.delivered

The carrier confirmed an outgoing text reached the phone.

idstringrequired

The event id, evt_ and 16 characters. The same event can be delivered more than once (a retry, or a manual resend): use the id to ignore repeats. Also sent in the SMSBlast-Event-Id header.

typestringrequired

The event type. Also sent in the SMSBlast-Event-Type header.

Always "message.delivered".

createdstringdate-timerequired

When the event happened.

dataobjectrequired

The text as GET /v1/messages/{id} returned it at the time of the event.

Child fields
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.

type: message.failed

An outgoing text could not be sent, or the carrier reported it undelivered. data.message.error says why. (Skipped texts send no event.)

idstringrequired

The event id, evt_ and 16 characters. The same event can be delivered more than once (a retry, or a manual resend): use the id to ignore repeats. Also sent in the SMSBlast-Event-Id header.

typestringrequired

The event type. Also sent in the SMSBlast-Event-Type header.

Always "message.failed".

createdstringdate-timerequired

When the event happened.

dataobjectrequired

The text as GET /v1/messages/{id} returned it at the time of the event.

Child fields
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.

type: contact.created

A contact was added with POST /v1/contacts (or by hand in the dashboard), joined by texting a signup keyword or with a signup form, or was recorded as an opt-out when an unknown number texted STOP. Imports do not send this event.

idstringrequired

The event id, evt_ and 16 characters. The same event can be delivered more than once (a retry, or a manual resend): use the id to ignore repeats. Also sent in the SMSBlast-Event-Id header.

typestringrequired

The event type. Also sent in the SMSBlast-Event-Type header.

Always "contact.created".

createdstringdate-timerequired

When the event happened.

dataobjectrequired

The contact as GET /v1/contacts/{id} returns it, at the time of the event.

Child fields
contactobjectrequired

A person on your contact list. Field names are snake_case.

Child fields
idstringuuidrequired

The contact id.

phonestringrequired

Mobile number in E.164 format, such as +14155550101. There is one contact per number in an account.

first_namestringnullablerequired

First name. Used by the {first_name} personalisation tag.

last_namestringnullablerequired

Last name. Used by the {last_name} personalisation tag.

emailstringnullablerequired

Email address, lower case.

timezonestringnullablerequired

IANA time zone such as America/Chicago. Campaign and workflow texts wait for 8am to 9pm in this time zone; when it is empty, the account time zone is used.

statusstringrequired

subscribed people can be texted. unsubscribed people opted out (by texting STOP or similar, or by being unsubscribed by you) and get nothing until they opt back in themselves.

One of "subscribed", "unsubscribed".

sourcestringnullablerequired

How the contact first got onto your list: import (an import or POST /v1/contacts/import), manual (POST /v1/contacts, or added by hand in the dashboard), keyword:JOIN (texted that signup keyword), form:Website footer (signed up with that signup form, by its name) or sms (first heard from when they texted STOP).

fieldsobjectrequired

Custom fields, as text: up to 30 per contact, names up to 60 characters, values up to 500. Segments can filter on them.

Any keys, each with a string value.

created_atstringdate-timerequired

When the contact was added.

type: contact.opted_in

A contact agreed to get your texts: added with consent through POST /v1/contacts (or by hand), texted a signup keyword, signed up with a signup form, or texted START after opting out. Imports do not send this event.

idstringrequired

The event id, evt_ and 16 characters. The same event can be delivered more than once (a retry, or a manual resend): use the id to ignore repeats. Also sent in the SMSBlast-Event-Id header.

typestringrequired

The event type. Also sent in the SMSBlast-Event-Type header.

Always "contact.opted_in".

createdstringdate-timerequired

When the event happened.

dataobjectrequired

The contact as GET /v1/contacts/{id} returns it, at the time of the event.

Child fields
contactobjectrequired

A person on your contact list. Field names are snake_case.

Child fields
idstringuuidrequired

The contact id.

phonestringrequired

Mobile number in E.164 format, such as +14155550101. There is one contact per number in an account.

first_namestringnullablerequired

First name. Used by the {first_name} personalisation tag.

last_namestringnullablerequired

Last name. Used by the {last_name} personalisation tag.

emailstringnullablerequired

Email address, lower case.

timezonestringnullablerequired

IANA time zone such as America/Chicago. Campaign and workflow texts wait for 8am to 9pm in this time zone; when it is empty, the account time zone is used.

statusstringrequired

subscribed people can be texted. unsubscribed people opted out (by texting STOP or similar, or by being unsubscribed by you) and get nothing until they opt back in themselves.

One of "subscribed", "unsubscribed".

sourcestringnullablerequired

How the contact first got onto your list: import (an import or POST /v1/contacts/import), manual (POST /v1/contacts, or added by hand in the dashboard), keyword:JOIN (texted that signup keyword), form:Website footer (signed up with that signup form, by its name) or sms (first heard from when they texted STOP).

fieldsobjectrequired

Custom fields, as text: up to 30 per contact, names up to 60 characters, values up to 500. Segments can filter on them.

Any keys, each with a string value.

created_atstringdate-timerequired

When the contact was added.

sourcestringrequired

Where they opted in: the consent source given to POST /v1/contacts (default manual), keyword:JOIN, form:Rk4xT9vQ (a signup form's publicId) or sms:START (the word they texted).

type: contact.opted_out

A contact opted out: they texted STOP (or a similar word or phrase), or you unsubscribed them. Stop texting them from your own systems too.

idstringrequired

The event id, evt_ and 16 characters. The same event can be delivered more than once (a retry, or a manual resend): use the id to ignore repeats. Also sent in the SMSBlast-Event-Id header.

typestringrequired

The event type. Also sent in the SMSBlast-Event-Type header.

Always "contact.opted_out".

createdstringdate-timerequired

When the event happened.

dataobjectrequired

The contact as GET /v1/contacts/{id} returns it, at the time of the event.

Child fields
contactobjectrequired

A person on your contact list. Field names are snake_case.

Child fields
idstringuuidrequired

The contact id.

phonestringrequired

Mobile number in E.164 format, such as +14155550101. There is one contact per number in an account.

first_namestringnullablerequired

First name. Used by the {first_name} personalisation tag.

last_namestringnullablerequired

Last name. Used by the {last_name} personalisation tag.

emailstringnullablerequired

Email address, lower case.

timezonestringnullablerequired

IANA time zone such as America/Chicago. Campaign and workflow texts wait for 8am to 9pm in this time zone; when it is empty, the account time zone is used.

statusstringrequired

subscribed people can be texted. unsubscribed people opted out (by texting STOP or similar, or by being unsubscribed by you) and get nothing until they opt back in themselves.

One of "subscribed", "unsubscribed".

sourcestringnullablerequired

How the contact first got onto your list: import (an import or POST /v1/contacts/import), manual (POST /v1/contacts, or added by hand in the dashboard), keyword:JOIN (texted that signup keyword), form:Website footer (signed up with that signup form, by its name) or sms (first heard from when they texted STOP).

fieldsobjectrequired

Custom fields, as text: up to 30 per contact, names up to 60 characters, values up to 500. Segments can filter on them.

Any keys, each with a string value.

created_atstringdate-timerequired

When the contact was added.

sourcestringrequired

How they opted out: sms:STOP (the words they texted, normalised, such as sms:PLEASE STOP) or manual (unsubscribed with POST /v1/contacts/bulk or in the dashboard).

type: campaign.sending

A campaign was sent or scheduled and its texts are queued.

idstringrequired

The event id, evt_ and 16 characters. The same event can be delivered more than once (a retry, or a manual resend): use the id to ignore repeats. Also sent in the SMSBlast-Event-Id header.

typestringrequired

The event type. Also sent in the SMSBlast-Event-Type header.

Always "campaign.sending".

createdstringdate-timerequired

When the event happened.

dataobjectrequired
Child fields
campaignobjectrequired
Child fields
idstringuuidrequired

The campaign id.

namestringrequired

The campaign name.

recipientsintegerrequired

How many people it was sent to.

creditsintegerrequired

Credits taken for it.

startedAtstringdate-timerequired

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

statusstringrequired

Always "sending".

scheduledForstringdate-timenullablerequired

The time it is scheduled for, or empty when it goes now.

type: campaign.sent

Every text of a campaign has gone out or ended.

idstringrequired

The event id, evt_ and 16 characters. The same event can be delivered more than once (a retry, or a manual resend): use the id to ignore repeats. Also sent in the SMSBlast-Event-Id header.

typestringrequired

The event type. Also sent in the SMSBlast-Event-Type header.

Always "campaign.sent".

createdstringdate-timerequired

When the event happened.

dataobjectrequired
Child fields
campaignobjectrequired
Child fields
idstringuuidrequired

The campaign id.

namestringrequired

The campaign name.

recipientsintegerrequired

How many people it was sent to.

creditsintegerrequired

Credits taken for it.

startedAtstringdate-timerequired

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

statusstringrequired

Always "sent".

finishedAtstringdate-timerequired

When the last text went out or ended.

resultsobjectrequired

Results at the moment it finished. Delivery reports can still arrive later.

Child fields
sentintegerrequired

Texts the carrier accepted (including the delivered ones).

deliveredintegerrequired

Texts confirmed delivered so far.

failedintegerrequired

Texts that failed.

skippedintegerrequired

Texts not sent because the person opted out first.

type: link.clicked

A person opened a tracked link for the first time. Later clicks on the same link by the same person, and visits by link previewers and scanners, send no event.

idstringrequired

The event id, evt_ and 16 characters. The same event can be delivered more than once (a retry, or a manual resend): use the id to ignore repeats. Also sent in the SMSBlast-Event-Id header.

typestringrequired

The event type. Also sent in the SMSBlast-Event-Type header.

Always "link.clicked".

createdstringdate-timerequired

When the event happened.

dataobjectrequired
Child fields
linkobjectrequired
Child fields
urlstringrequired

The original link.

campaignIdstringuuidnullablerequired

The campaign the text was part of.

workflowIdstringuuidnullablerequired

The workflow the text was part of.

clickedAtstringdate-timerequired

When it was clicked.

contactobjectnullablerequired

Who clicked, when the text went to a contact.

Child fields
idstringuuidrequired

The contact id.

phonestringrequired

Their number, E.164.

first_namestringnullablerequired

First name.

last_namestringnullablerequired

Last name.

statusstringrequired

Their status now.

One of "subscribed", "unsubscribed".

type: webhook.test

A test event sent by POST /v1/webhooks/{id}/test, even to a webhook that is switched off. It is tried once and never retried.

idstringrequired

The event id, evt_ and 16 characters. The same event can be delivered more than once (a retry, or a manual resend): use the id to ignore repeats. Also sent in the SMSBlast-Event-Id header.

typestringrequired

The event type. Also sent in the SMSBlast-Event-Type header.

Always "webhook.test".

createdstringdate-timerequired

When the event happened.

dataobjectrequired
Child fields
messagestringrequired

Always "This is a test event from SMSBlast. If you can read it, your endpoint works."

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

Send a delivery again

POST/v1/webhooks/{id}/deliveries/{deliveryId}/retry

Sends one delivery again now, whatever happened to it before (also a delivered one, so your endpoint gets it twice). A delivery that has used up its automatic retries gets one more attempt.

Request

curl -X POST https://app.smsblast.net/v1/webhooks/8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30/deliveries/3c5e7a9b-1d3f-4b5c-8e7a-9b1d3f5a7c41/retry \
  -H "Authorization: Bearer $SMSBLAST_API_KEY" \
  -H "Idempotency-Key: $(openssl rand -hex 16)"
const res = await fetch('https://app.smsblast.net/v1/webhooks/8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30/deliveries/3c5e7a9b-1d3f-4b5c-8e7a-9b1d3f5a7c41/retry', {
  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/webhooks/8e0a2c4f-6b8d-4e1a-9c3e-5f7a9c1e3b30/deliveries/3c5e7a9b-1d3f-4b5c-8e7a-9b1d3f5a7c41/retry",
    headers={
        "Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
)
print(res.status_code, res.json())
Response · 200
{
  "ok": true
}

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

Path parameters#

idstringuuidrequired

The webhook id.

deliveryIdstringuuidrequired

The delivery id.

Headers#

Idempotency-Keystring Guide

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

Limits: up to 200 characters.

Example "2b5c4f8e-order-1042".

Responses#

200

Queued to go out now.

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.

Idempotent-Replayedstring Guide

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

One of "true".

400

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

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

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

404

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

  • not_found: No such delivery for this webhook, or it is being sent right now.
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.