Testing SMS

Simulate every outcome from a sandbox environment with the SMS simulator.

Sandbox (coss_test_…) keys send nothing and bill nothing. They accept any from number, skip the number, country and plan checks, and simulate what a carrier does, so the whole flow (statuses, events, webhooks, suppressions, logs) works before you have a number. Messages to these numbers behave as below; any other number is delivered.

The reply to +15005550008 ("Thanks! This is a simulated reply.") arrives in the same sandbox environment, from that number to your from, and can be read with coss.sms.received.list(). Simulator numbers are never added to the suppression list, so they keep working; numbers you add yourself are skipped as in live environments.

const { :  } = await ..({
  : "+15005550000",
  : "+15005550004",
  : "Your Acme code is 482913",
});
// A moment later: status "undelivered", failure.code "carrier_filtered"

Each sandbox environment can send 200 segments a day. Sandbox messages are never screened, and their events and webhook payloads have sandbox: true.

Live opt-outs can't be simulated: a STOP to one of your numbers suppresses the sender in live environments only.