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.
- GET
/v1/webhooksList webhooks - POST
/v1/webhooksCreate a webhook - GET
/v1/webhooks/{id}Get a webhook - PATCH
/v1/webhooks/{id}Update a webhook - DELETE
/v1/webhooks/{id}Delete a webhook - POST
/v1/webhooks/{id}/rotate-secretRotate the signing secret - POST
/v1/webhooks/{id}/testSend a test event - GET
/v1/webhooks/{id}/deliveriesList deliveries - POST
/v1/webhooks/{id}/deliveries/{deliveryId}/retrySend a delivery again
List webhooks
/v1/webhooksYour 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()){
"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#
Webhooks and event types.
application/json
webhooksarray of objectsrequiredOldest first. secret is not included.
Fields of each item
idstringuuidrequiredThe webhook id.
urlstringurirequiredWhere events are posted: a public https address.
descriptionstringnullablerequiredA note, for you.
eventsarray of stringsrequiredThe event types it gets (see EventType), or ["*"] for all of them.
enabledbooleanrequiredWhether events are sent to it. It is switched off by you, or automatically after 100 failed deliveries in a row.
disabledReasonstringnullablerequiredWhy it was switched off automatically.
lastSuccessAtstringdate-timenullablerequiredThe last delivery it answered with a 2xx.
lastFailureAtstringdate-timenullablerequiredThe last delivery that failed.
createdAtstringdate-timerequiredWhen it was created.
secretstringThe 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 stringsrequiredEvery event type.
Response headers
The id of this request (req_...), on every answer. Quote it when you contact support.
Requests allowed per minute with this API key.
Requests left in the current minute.
When the current minute ends and the count starts again, in Unix seconds.
No API key, or one that is not valid or has been revoked (unauthorized).
Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.
Create a webhook
/v1/webhooksAdds 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()){
"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#
Any unique string up to 200 characters (a UUID works well). If a POST times out or you are not sure it went through, send it again with the same key and the same body: you get the first answer back (with Idempotent-Replayed: true) instead of the work being done twice. Keys are kept for 24 hours per account.
Request body#
application/json · required
urlstringurirequiredA public https address. Addresses inside private networks, localhost and addresses with a user name or password are refused.
eventsarray of stringsEvent types (see EventType), or ["*"] for all. Default ["*"].
descriptionstringnullableA note, up to 200 characters.
Example request body
{
"url": "https://hooks.example.com/smsblast",
"events": [
"message.received",
"contact.opted_out"
],
"description": "CRM sync"
}Responses#
The new webhook, with its secret.
application/json
webhookobjectrequiredA place your own system receives events. Field names are camelCase.
Child fields
idstringuuidrequiredThe webhook id.
urlstringurirequiredWhere events are posted: a public https address.
descriptionstringnullablerequiredA note, for you.
eventsarray of stringsrequiredThe event types it gets (see EventType), or ["*"] for all of them.
enabledbooleanrequiredWhether events are sent to it. It is switched off by you, or automatically after 100 failed deliveries in a row.
disabledReasonstringnullablerequiredWhy it was switched off automatically.
lastSuccessAtstringdate-timenullablerequiredThe last delivery it answered with a 2xx.
lastFailureAtstringdate-timenullablerequiredThe last delivery that failed.
createdAtstringdate-timerequiredWhen it was created.
secretstringThe 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
The id of this request (req_...), on every answer. Quote it when you contact support.
Requests allowed per minute with this API key.
Requests left in the current minute.
When the current minute ends and the count starts again, in Unix seconds.
true when this is the stored answer to an earlier request with the same Idempotency-Key, not a new one.
The request was refused because something in it is not valid. error.code is one of:
invalid_url:urlis not a full public https address (or the host cannot be found).invalid_events:eventsis empty or has an unknown type (details.allowedlists them).invalid_json: The body is not a JSON object.invalid_idempotency_key: The Idempotency-Key header is longer than 200 characters.
No API key, or one that is not valid or has been revoked (unauthorized).
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.
This Idempotency-Key was already used for a different request (another path or body) in the last 24 hours (idempotency_key_reused). Use a new key for each new request.
Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.
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()){
"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#
idstringuuidrequiredThe webhook id.
Responses#
The webhook.
application/json
webhookobjectrequiredA place your own system receives events. Field names are camelCase.
Child fields
idstringuuidrequiredThe webhook id.
urlstringurirequiredWhere events are posted: a public https address.
descriptionstringnullablerequiredA note, for you.
eventsarray of stringsrequiredThe event types it gets (see EventType), or ["*"] for all of them.
enabledbooleanrequiredWhether events are sent to it. It is switched off by you, or automatically after 100 failed deliveries in a row.
disabledReasonstringnullablerequiredWhy it was switched off automatically.
lastSuccessAtstringdate-timenullablerequiredThe last delivery it answered with a 2xx.
lastFailureAtstringdate-timenullablerequiredThe last delivery that failed.
createdAtstringdate-timerequiredWhen it was created.
secretstringThe 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
The id of this request (req_...), on every answer. Quote it when you contact support.
Requests allowed per minute with this API key.
Requests left in the current minute.
When the current minute ends and the count starts again, in Unix seconds.
No API key, or one that is not valid or has been revoked (unauthorized).
Something the request names does not exist in your account. error.code is one of:
not_found: No webhook with that id in your account.
Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.
Update a webhook
/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()){
"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#
idstringuuidrequiredThe webhook id.
Request body#
application/json · required
Only the fields you send change.
urlstringuriA new public https address.
eventsarray of stringsThe new event types, or ["*"].
descriptionstringnullableA new note.
enabledbooleanfalse switches it off; true switches it back on and clears disabledReason and the failure count.
Example request body
{
"events": [
"*"
],
"enabled": true
}Responses#
The webhook.
application/json
webhookobjectrequiredA place your own system receives events. Field names are camelCase.
Child fields
idstringuuidrequiredThe webhook id.
urlstringurirequiredWhere events are posted: a public https address.
descriptionstringnullablerequiredA note, for you.
eventsarray of stringsrequiredThe event types it gets (see EventType), or ["*"] for all of them.
enabledbooleanrequiredWhether events are sent to it. It is switched off by you, or automatically after 100 failed deliveries in a row.
disabledReasonstringnullablerequiredWhy it was switched off automatically.
lastSuccessAtstringdate-timenullablerequiredThe last delivery it answered with a 2xx.
lastFailureAtstringdate-timenullablerequiredThe last delivery that failed.
createdAtstringdate-timerequiredWhen it was created.
secretstringThe 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
The id of this request (req_...), on every answer. Quote it when you contact support.
Requests allowed per minute with this API key.
Requests left in the current minute.
When the current minute ends and the count starts again, in Unix seconds.
The request was refused because something in it is not valid. error.code is one of:
invalid_url:urlis not a full public https address.invalid_events:eventsis empty or has an unknown type.invalid_json: The body is not a JSON object.
No API key, or one that is not valid or has been revoked (unauthorized).
Something the request names does not exist in your account. error.code is one of:
not_found: No webhook with that id in your account.
Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.
Delete a webhook
/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()){
"ok": true
}Needs an API key: Authorization: Bearer sb_... Authentication
Path parameters#
idstringuuidrequiredThe webhook id.
Responses#
Deleted.
application/json
okbooleanrequiredResponse headers
The id of this request (req_...), on every answer. Quote it when you contact support.
Requests allowed per minute with this API key.
Requests left in the current minute.
When the current minute ends and the count starts again, in Unix seconds.
No API key, or one that is not valid or has been revoked (unauthorized).
Something the request names does not exist in your account. error.code is one of:
not_found: No webhook with that id in your account.
Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.
Rotate the signing secret
/v1/webhooks/{id}/rotate-secretGives 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()){
"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#
idstringuuidrequiredThe webhook id.
Headers#
Any unique string up to 200 characters (a UUID works well). If a POST times out or you are not sure it went through, send it again with the same key and the same body: you get the first answer back (with Idempotent-Replayed: true) instead of the work being done twice. Keys are kept for 24 hours per account.
Responses#
The webhook with its new secret.
application/json
webhookobjectrequiredA place your own system receives events. Field names are camelCase.
Child fields
idstringuuidrequiredThe webhook id.
urlstringurirequiredWhere events are posted: a public https address.
descriptionstringnullablerequiredA note, for you.
eventsarray of stringsrequiredThe event types it gets (see EventType), or ["*"] for all of them.
enabledbooleanrequiredWhether events are sent to it. It is switched off by you, or automatically after 100 failed deliveries in a row.
disabledReasonstringnullablerequiredWhy it was switched off automatically.
lastSuccessAtstringdate-timenullablerequiredThe last delivery it answered with a 2xx.
lastFailureAtstringdate-timenullablerequiredThe last delivery that failed.
createdAtstringdate-timerequiredWhen it was created.
secretstringThe 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
The id of this request (req_...), on every answer. Quote it when you contact support.
Requests allowed per minute with this API key.
Requests left in the current minute.
When the current minute ends and the count starts again, in Unix seconds.
true when this is the stored answer to an earlier request with the same Idempotency-Key, not a new one.
The request was refused because something in it is not valid. error.code is one of:
invalid_idempotency_key: The Idempotency-Key header is longer than 200 characters.
No API key, or one that is not valid or has been revoked (unauthorized).
Something the request names does not exist in your account. error.code is one of:
not_found: No webhook with that id in your account.
The request clashes with the current state of things. error.code is one of:
idempotency_in_progress: A request with the same Idempotency-Key is still running. Try again in a moment.
This Idempotency-Key was already used for a different request (another path or body) in the last 24 hours (idempotency_key_reused). Use a new key for each new request.
Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.
Send a test event
/v1/webhooks/{id}/testQueues 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()){
"deliveryId": "3c5e7a9b-1d3f-4b5c-8e7a-9b1d3f5a7c41",
"eventId": "evt_Qm4xT9rV2kLp8NwZ"
}Needs an API key: Authorization: Bearer sb_... Authentication
Path parameters#
idstringuuidrequiredThe webhook id.
Headers#
Any unique string up to 200 characters (a UUID works well). If a POST times out or you are not sure it went through, send it again with the same key and the same body: you get the first answer back (with Idempotent-Replayed: true) instead of the work being done twice. Keys are kept for 24 hours per account.
Responses#
The test delivery, queued.
application/json
deliveryIdstringuuidrequiredThe delivery. Watch it in GET /v1/webhooks/{id}/deliveries.
eventIdstringrequiredThe test event id.
Response headers
The id of this request (req_...), on every answer. Quote it when you contact support.
Requests allowed per minute with this API key.
Requests left in the current minute.
When the current minute ends and the count starts again, in Unix seconds.
true when this is the stored answer to an earlier request with the same Idempotency-Key, not a new one.
The request was refused because something in it is not valid. error.code is one of:
invalid_idempotency_key: The Idempotency-Key header is longer than 200 characters.
No API key, or one that is not valid or has been revoked (unauthorized).
Something the request names does not exist in your account. error.code is one of:
not_found: No webhook with that id in your account.
The request clashes with the current state of things. error.code is one of:
idempotency_in_progress: A request with the same Idempotency-Key is still running. Try again in a moment.
This Idempotency-Key was already used for a different request (another path or body) in the last 24 hours (idempotency_key_reused). Use a new key for each new request.
Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.
List deliveries
/v1/webhooks/{id}/deliveriesThe 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()){
"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#
idstringuuidrequiredThe webhook id.
Query parameters#
statusstringOnly deliveries with this status.
limitintegerHow many to return, 1 to 100. Default 50.
Responses#
Deliveries.
application/json
deliveriesarray of objectsrequiredNewest first.
Fields of each item
idstringuuidrequiredThe delivery id.
eventIdstringrequiredThe event id (evt_...).
eventTypestringrequiredThe event type.
statusstringrequiredpending: 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.
attemptsintegerrequiredAttempts so far.
nextAttemptAtstringdate-timenullablerequiredWhen it will be tried next, while pending.
lastStatusintegernullablerequiredThe HTTP status your endpoint last answered with. Empty when it could not be reached.
lastErrorstringnullablerequiredWhat went wrong last time, such as "Answered 500", "No answer within 10 seconds" or "Redirected (301); webhooks do not follow redirects".
lastResponsestringnullablerequiredThe first 500 characters of your endpoint's last answer.
createdAtstringdate-timerequiredWhen the event was recorded for this endpoint.
deliveredAtstringdate-timenullablerequiredWhen it was delivered.
payloadobjectrequiredWhat a webhook delivery posts: an envelope with the event id, type and time, and the event's data.
Shapes
type: message.received
Someone texted one of your numbers. Sent for every incoming text, including STOP, HELP and keywords.
idstringrequiredThe 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.
typestringrequiredThe event type. Also sent in the SMSBlast-Event-Type header.
createdstringdate-timerequiredWhen the event happened.
dataobjectrequiredThe text as GET /v1/messages/{id} returned it at the time of the event.
Child fields
messageobjectrequiredOne text, sent or received. Field names are camelCase.
Child fields
idstringuuidrequiredThe message id.
directionstringrequiredoutbound: a text you sent. inbound: a text someone sent to one of your numbers.
statusstringrequiredWhere the text is:
queued: waiting to go out (now, atsendAt, 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.errorsays 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.
kindstringrequiredWhat 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).
fromstringrequiredThe sending number for outbound texts; the person's number for inbound ones. E.164.
tostringrequiredThe person's number for outbound texts; your number for inbound ones. E.164.
bodystringrequiredThe text exactly as sent or received (personalisation already filled in, tracked links already shortened).
mediaUrlsarray of stringsurirequiredPictures sent with the text (MMS). For inbound texts, the pictures the person sent.
creditsintegerrequiredCredits it cost: 1 per SMS segment, 3 for a picture message, 0 for inbound texts and compliance answers.
contactIdstringuuidnullablerequiredThe contact it was sent to or came from, when there is one.
campaignIdstringuuidnullablerequiredThe campaign it belongs to, for campaign texts.
errorstringnullablerequiredWhy it failed or was skipped. While a text is queued for another try after the carrier was busy, this reads "Will retry: ...".
sendAtstringdate-timenullablerequiredThe 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-timerequiredWhen it was created (outbound) or received (inbound).
sentAtstringdate-timenullablerequiredWhen the carrier accepted it.
deliveredAtstringdate-timenullablerequiredWhen 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).
idstringrequiredThe 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.
typestringrequiredThe event type. Also sent in the SMSBlast-Event-Type header.
createdstringdate-timerequiredWhen the event happened.
dataobjectrequiredThe text as GET /v1/messages/{id} returned it at the time of the event.
Child fields
messageobjectrequiredOne text, sent or received. Field names are camelCase.
Child fields
idstringuuidrequiredThe message id.
directionstringrequiredoutbound: a text you sent. inbound: a text someone sent to one of your numbers.
statusstringrequiredWhere the text is:
queued: waiting to go out (now, atsendAt, 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.errorsays 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.
kindstringrequiredWhat 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).
fromstringrequiredThe sending number for outbound texts; the person's number for inbound ones. E.164.
tostringrequiredThe person's number for outbound texts; your number for inbound ones. E.164.
bodystringrequiredThe text exactly as sent or received (personalisation already filled in, tracked links already shortened).
mediaUrlsarray of stringsurirequiredPictures sent with the text (MMS). For inbound texts, the pictures the person sent.
creditsintegerrequiredCredits it cost: 1 per SMS segment, 3 for a picture message, 0 for inbound texts and compliance answers.
contactIdstringuuidnullablerequiredThe contact it was sent to or came from, when there is one.
campaignIdstringuuidnullablerequiredThe campaign it belongs to, for campaign texts.
errorstringnullablerequiredWhy it failed or was skipped. While a text is queued for another try after the carrier was busy, this reads "Will retry: ...".
sendAtstringdate-timenullablerequiredThe 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-timerequiredWhen it was created (outbound) or received (inbound).
sentAtstringdate-timenullablerequiredWhen the carrier accepted it.
deliveredAtstringdate-timenullablerequiredWhen the carrier confirmed delivery.
type: message.delivered
The carrier confirmed an outgoing text reached the phone.
idstringrequiredThe 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.
typestringrequiredThe event type. Also sent in the SMSBlast-Event-Type header.
createdstringdate-timerequiredWhen the event happened.
dataobjectrequiredThe text as GET /v1/messages/{id} returned it at the time of the event.
Child fields
messageobjectrequiredOne text, sent or received. Field names are camelCase.
Child fields
idstringuuidrequiredThe message id.
directionstringrequiredoutbound: a text you sent. inbound: a text someone sent to one of your numbers.
statusstringrequiredWhere the text is:
queued: waiting to go out (now, atsendAt, 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.errorsays 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.
kindstringrequiredWhat 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).
fromstringrequiredThe sending number for outbound texts; the person's number for inbound ones. E.164.
tostringrequiredThe person's number for outbound texts; your number for inbound ones. E.164.
bodystringrequiredThe text exactly as sent or received (personalisation already filled in, tracked links already shortened).
mediaUrlsarray of stringsurirequiredPictures sent with the text (MMS). For inbound texts, the pictures the person sent.
creditsintegerrequiredCredits it cost: 1 per SMS segment, 3 for a picture message, 0 for inbound texts and compliance answers.
contactIdstringuuidnullablerequiredThe contact it was sent to or came from, when there is one.
campaignIdstringuuidnullablerequiredThe campaign it belongs to, for campaign texts.
errorstringnullablerequiredWhy it failed or was skipped. While a text is queued for another try after the carrier was busy, this reads "Will retry: ...".
sendAtstringdate-timenullablerequiredThe 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-timerequiredWhen it was created (outbound) or received (inbound).
sentAtstringdate-timenullablerequiredWhen the carrier accepted it.
deliveredAtstringdate-timenullablerequiredWhen 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.)
idstringrequiredThe 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.
typestringrequiredThe event type. Also sent in the SMSBlast-Event-Type header.
createdstringdate-timerequiredWhen the event happened.
dataobjectrequiredThe text as GET /v1/messages/{id} returned it at the time of the event.
Child fields
messageobjectrequiredOne text, sent or received. Field names are camelCase.
Child fields
idstringuuidrequiredThe message id.
directionstringrequiredoutbound: a text you sent. inbound: a text someone sent to one of your numbers.
statusstringrequiredWhere the text is:
queued: waiting to go out (now, atsendAt, 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.errorsays 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.
kindstringrequiredWhat 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).
fromstringrequiredThe sending number for outbound texts; the person's number for inbound ones. E.164.
tostringrequiredThe person's number for outbound texts; your number for inbound ones. E.164.
bodystringrequiredThe text exactly as sent or received (personalisation already filled in, tracked links already shortened).
mediaUrlsarray of stringsurirequiredPictures sent with the text (MMS). For inbound texts, the pictures the person sent.
creditsintegerrequiredCredits it cost: 1 per SMS segment, 3 for a picture message, 0 for inbound texts and compliance answers.
contactIdstringuuidnullablerequiredThe contact it was sent to or came from, when there is one.
campaignIdstringuuidnullablerequiredThe campaign it belongs to, for campaign texts.
errorstringnullablerequiredWhy it failed or was skipped. While a text is queued for another try after the carrier was busy, this reads "Will retry: ...".
sendAtstringdate-timenullablerequiredThe 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-timerequiredWhen it was created (outbound) or received (inbound).
sentAtstringdate-timenullablerequiredWhen the carrier accepted it.
deliveredAtstringdate-timenullablerequiredWhen 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.
idstringrequiredThe 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.
typestringrequiredThe event type. Also sent in the SMSBlast-Event-Type header.
createdstringdate-timerequiredWhen the event happened.
dataobjectrequiredThe contact as GET /v1/contacts/{id} returns it, at the time of the event.
Child fields
contactobjectrequiredA person on your contact list. Field names are snake_case.
Child fields
idstringuuidrequiredThe contact id.
phonestringrequiredMobile number in E.164 format, such as +14155550101. There is one contact per number in an account.
first_namestringnullablerequiredFirst name. Used by the {first_name} personalisation tag.
last_namestringnullablerequiredLast name. Used by the {last_name} personalisation tag.
emailstringnullablerequiredEmail address, lower case.
timezonestringnullablerequiredIANA 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.
statusstringrequiredsubscribed 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.
sourcestringnullablerequiredHow 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).
fieldsobjectrequiredCustom fields, as text: up to 30 per contact, names up to 60 characters, values up to 500. Segments can filter on them.
created_atstringdate-timerequiredWhen 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.
idstringrequiredThe 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.
typestringrequiredThe event type. Also sent in the SMSBlast-Event-Type header.
createdstringdate-timerequiredWhen the event happened.
dataobjectrequiredThe contact as GET /v1/contacts/{id} returns it, at the time of the event.
Child fields
contactobjectrequiredA person on your contact list. Field names are snake_case.
Child fields
idstringuuidrequiredThe contact id.
phonestringrequiredMobile number in E.164 format, such as +14155550101. There is one contact per number in an account.
first_namestringnullablerequiredFirst name. Used by the {first_name} personalisation tag.
last_namestringnullablerequiredLast name. Used by the {last_name} personalisation tag.
emailstringnullablerequiredEmail address, lower case.
timezonestringnullablerequiredIANA 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.
statusstringrequiredsubscribed 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.
sourcestringnullablerequiredHow 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).
fieldsobjectrequiredCustom fields, as text: up to 30 per contact, names up to 60 characters, values up to 500. Segments can filter on them.
created_atstringdate-timerequiredWhen the contact was added.
sourcestringrequiredWhere 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.
idstringrequiredThe 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.
typestringrequiredThe event type. Also sent in the SMSBlast-Event-Type header.
createdstringdate-timerequiredWhen the event happened.
dataobjectrequiredThe contact as GET /v1/contacts/{id} returns it, at the time of the event.
Child fields
contactobjectrequiredA person on your contact list. Field names are snake_case.
Child fields
idstringuuidrequiredThe contact id.
phonestringrequiredMobile number in E.164 format, such as +14155550101. There is one contact per number in an account.
first_namestringnullablerequiredFirst name. Used by the {first_name} personalisation tag.
last_namestringnullablerequiredLast name. Used by the {last_name} personalisation tag.
emailstringnullablerequiredEmail address, lower case.
timezonestringnullablerequiredIANA 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.
statusstringrequiredsubscribed 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.
sourcestringnullablerequiredHow 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).
fieldsobjectrequiredCustom fields, as text: up to 30 per contact, names up to 60 characters, values up to 500. Segments can filter on them.
created_atstringdate-timerequiredWhen the contact was added.
sourcestringrequiredHow 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.
idstringrequiredThe 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.
typestringrequiredThe event type. Also sent in the SMSBlast-Event-Type header.
createdstringdate-timerequiredWhen the event happened.
dataobjectrequiredChild fields
campaignobjectrequiredChild fields
idstringuuidrequiredThe campaign id.
namestringrequiredThe campaign name.
recipientsintegerrequiredHow many people it was sent to.
creditsintegerrequiredCredits taken for it.
startedAtstringdate-timerequiredWhen sending started, or the time it was scheduled for.
statusstringrequiredscheduledForstringdate-timenullablerequiredThe time it is scheduled for, or empty when it goes now.
type: campaign.sent
Every text of a campaign has gone out or ended.
idstringrequiredThe 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.
typestringrequiredThe event type. Also sent in the SMSBlast-Event-Type header.
createdstringdate-timerequiredWhen the event happened.
dataobjectrequiredChild fields
campaignobjectrequiredChild fields
idstringuuidrequiredThe campaign id.
namestringrequiredThe campaign name.
recipientsintegerrequiredHow many people it was sent to.
creditsintegerrequiredCredits taken for it.
startedAtstringdate-timerequiredWhen sending started, or the time it was scheduled for.
statusstringrequiredfinishedAtstringdate-timerequiredWhen the last text went out or ended.
resultsobjectrequiredResults at the moment it finished. Delivery reports can still arrive later.
Child fields
sentintegerrequiredTexts the carrier accepted (including the delivered ones).
deliveredintegerrequiredTexts confirmed delivered so far.
failedintegerrequiredTexts that failed.
skippedintegerrequiredTexts 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.
idstringrequiredThe 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.
typestringrequiredThe event type. Also sent in the SMSBlast-Event-Type header.
createdstringdate-timerequiredWhen the event happened.
dataobjectrequiredChild fields
linkobjectrequiredChild fields
urlstringrequiredThe original link.
campaignIdstringuuidnullablerequiredThe campaign the text was part of.
workflowIdstringuuidnullablerequiredThe workflow the text was part of.
clickedAtstringdate-timerequiredWhen it was clicked.
contactobjectnullablerequiredWho clicked, when the text went to a contact.
Child fields
idstringuuidrequiredThe contact id.
phonestringrequiredTheir number, E.164.
first_namestringnullablerequiredFirst name.
last_namestringnullablerequiredLast name.
statusstringrequiredTheir status now.
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.
idstringrequiredThe 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.
typestringrequiredThe event type. Also sent in the SMSBlast-Event-Type header.
createdstringdate-timerequiredWhen the event happened.
dataobjectrequiredChild fields
messagestringrequiredAlways "This is a test event from SMSBlast. If you can read it, your endpoint works."
Response headers
The id of this request (req_...), on every answer. Quote it when you contact support.
Requests allowed per minute with this API key.
Requests left in the current minute.
When the current minute ends and the count starts again, in Unix seconds.
No API key, or one that is not valid or has been revoked (unauthorized).
Something the request names does not exist in your account. error.code is one of:
not_found: No webhook with that id in your account.
Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.
Send a delivery again
/v1/webhooks/{id}/deliveries/{deliveryId}/retrySends 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()){
"ok": true
}Needs an API key: Authorization: Bearer sb_... Authentication
Path parameters#
idstringuuidrequiredThe webhook id.
deliveryIdstringuuidrequiredThe delivery id.
Headers#
Any unique string up to 200 characters (a UUID works well). If a POST times out or you are not sure it went through, send it again with the same key and the same body: you get the first answer back (with Idempotent-Replayed: true) instead of the work being done twice. Keys are kept for 24 hours per account.
Responses#
Queued to go out now.
application/json
okbooleanrequiredResponse headers
The id of this request (req_...), on every answer. Quote it when you contact support.
Requests allowed per minute with this API key.
Requests left in the current minute.
When the current minute ends and the count starts again, in Unix seconds.
true when this is the stored answer to an earlier request with the same Idempotency-Key, not a new one.
The request was refused because something in it is not valid. error.code is one of:
invalid_idempotency_key: The Idempotency-Key header is longer than 200 characters.
No API key, or one that is not valid or has been revoked (unauthorized).
Something the request names does not exist in your account. error.code is one of:
not_found: No such delivery for this webhook, or it is being sent right now.
The request clashes with the current state of things. error.code is one of:
idempotency_in_progress: A request with the same Idempotency-Key is still running. Try again in a moment.
This Idempotency-Key was already used for a different request (another path or body) in the last 24 hours (idempotency_key_reused). Use a new key for each new request.
Too many requests with this API key (rate_limited). Wait for the number of seconds in Retry-After.