SMS
Send and receive text messages from your organization's phone numbers.
coss.sms sends text messages from your organization's phone numbers, reports what carriers do
with them, and receives the replies. It uses the same API key, webhooks,
logs and sandbox environments as email.
const { : , } = await ..({
: "+14155550123",
: "+14155550199",
: "Your Acme code is 482913",
});Numbers are in E.164 form: +, the country code, then
the number, without spaces. Sends return HTTP 202 with status: "queued"; a background worker
hands the message to the carrier. Follow it with coss.sms.get() or the sms.* webhooks.
Quick start
- Try it in a sandbox. Sandbox (
coss_test_…) keys accept anyfromnumber and simulate every message: send to+15005550006and it is delivered, to+15005550001and it fails withinvalid_number. The SMS simulator has a number for each outcome. Nothing is sent or billed. - Choose a paid plan. Live SMS is available on paid plans (plans); Free organizations can use sandboxes.
- Get a number and register it. On the dashboard's organization SMS page, owners and admins buy a local or toll-free number and register it with the carriers: US A2P 10DLC for local numbers, toll-free verification for toll-free ones. Reviews usually take a few days. See numbers and registration.
- Send with a live key. Once the registration is approved, live (
coss_live_…) keys send from the number to the countries your organization allows (the US and Canada to start with).
// Which numbers can send live messages now?
const { : } = await ...();
for (const of ?. ?? []) {
.(., ., ., .);
}What's in it
Segments, statuses, scheduling, failures and suppressions.
Local and toll-free numbers, US A2P 10DLC and toll-free verification.
Replies, STOP and START, and their webhooks.
The SMS simulator's numbers for every outcome.
Where you can send, and what a message costs.
Messages are kept for 45 days and received messages for
30 days (see data retention). Webhook
payloads never include the text: read it with coss.sms.get() or coss.sms.received.get().
On This Page