API reference
Account
Your account: business name, time zone, support contact, credit balance and sending numbers. API keys, billing and number registration are managed in the dashboard.
Get your account
/v1/accountYour account, your credit balance and your sending numbers. Only active numbers can send; a number stays pending until its carrier registration is approved in the dashboard.
Request
curl https://app.smsblast.net/v1/account \
-H "Authorization: Bearer $SMSBLAST_API_KEY"const res = await fetch('https://app.smsblast.net/v1/account', {
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/account",
headers={
"Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
},
)
print(res.status_code, res.json()){
"account": {
"id": "5d0c6a2e-8f43-4b8a-9c1d-2e7f4a6b3c10",
"name": "Corner Bakery",
"timezone": "America/Los_Angeles",
"support_contact": "help@example.com"
},
"credits": 4210,
"numbers": [
{
"id": "b7e2f1a4-3c5d-4e6f-8a9b-0c1d2e3f4a5b",
"account_id": "5d0c6a2e-8f43-4b8a-9c1d-2e7f4a6b3c10",
"e164": "+14155550100",
"kind": "10dlc",
"provider": "telnyx",
"status": "active"
}
]
}Needs an API key: Authorization: Bearer sb_... Authentication
Responses#
Your account.
application/json
accountobjectrequiredYour account. Field names are snake_case.
Child fields
idstringuuidrequiredYour account id.
namestringrequiredYour business name. It starts the automatic answers to STOP, HELP and START ("Corner Bakery: You are unsubscribed...").
timezonestringrequiredIANA time zone, used for sending hours when a contact has none and for analytics days.
support_contactstringnullablerequiredHow people reach you for help (an email address or phone number). It is included in the automatic answer to HELP.
creditsintegerrequiredYour credit balance.
numbersarray of objectsrequiredYour sending numbers, oldest first.
Fields of each item
idstringuuidrequiredThe number id (the fromNumberId of campaigns, the numberId of keywords).
account_idstringuuidrequiredYour account id.
e164stringrequiredThe number, E.164 (or 5 to 6 digits for a short code).
kindstringrequiredThe kind of number.
providerstringrequiredThe carrier network partner that sends from it, such as telnyx.
statusstringrequiredOnly active numbers send. A number is pending until its carrier registration is approved.
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.
Update your account
/v1/accountChanges your business name (it starts the automatic STOP, HELP and START answers), your time zone (used for sending hours when a contact has none, and for analytics days) or your support contact (included in the HELP answer). Only the fields you send change.
Request
curl -X PATCH https://app.smsblast.net/v1/account \
-H "Authorization: Bearer $SMSBLAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"timezone": "America/Los_Angeles",
"supportContact": "help@example.com"
}'const res = await fetch('https://app.smsblast.net/v1/account', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SMSBLAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
timezone: 'America/Los_Angeles',
supportContact: 'help@example.com',
}),
});
console.log(res.status, await res.json());import os
import requests
res = requests.patch(
"https://app.smsblast.net/v1/account",
headers={
"Authorization": f"Bearer {os.environ['SMSBLAST_API_KEY']}",
},
json={
"timezone": "America/Los_Angeles",
"supportContact": "help@example.com",
},
)
print(res.status_code, res.json()){
"account": {
"id": "5d0c6a2e-8f43-4b8a-9c1d-2e7f4a6b3c10",
"name": "Corner Bakery",
"timezone": "America/Los_Angeles",
"support_contact": "help@example.com"
}
}Needs an API key: Authorization: Bearer sb_... Authentication
Request body#
application/json · required
Only the fields you send change.
namestringYour business name, up to 120 characters. Empty values are ignored.
timezonestringIANA time zone, such as America/Los_Angeles.
supportContactstringHow people reach you for help, up to 160 characters. An empty string clears it.
Example request body
{
"timezone": "America/Los_Angeles",
"supportContact": "help@example.com"
}Responses#
Your account.
application/json
accountobjectrequiredYour account. Field names are snake_case.
Child fields
idstringuuidrequiredYour account id.
namestringrequiredYour business name. It starts the automatic answers to STOP, HELP and START ("Corner Bakery: You are unsubscribed...").
timezonestringrequiredIANA time zone, used for sending hours when a contact has none and for analytics days.
support_contactstringnullablerequiredHow people reach you for help (an email address or phone number). It is included in the automatic answer to HELP.
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_timezone:timezoneis not one we recognise.invalid_json: The body is not a JSON object.
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.