Skip to main content
This guide walks you through deploying Wraps SMS infrastructure and sending your first text message.

Prerequisites

  • Node.js 20+
  • AWS credentials configured (guide)
  • A phone number to test with (in E.164 format, e.g., +14155551234)

What gets deployed

Running wraps sms init creates the following resources in your AWS account:
ResourceDetails
Phone numberSimulator, toll-free, or 10DLC depending on preset
Configuration setNamed wraps-sms-config with delivery tracking
Phone poolGroups numbers for sending
Opt-out listManages opt-out compliance automatically
Protect configurationFraud protection with country-level allow/block lists
SNS topic + SQS queueEvent routing for delivery receipts
DynamoDB tableMessage history (production and enterprise presets)
IAM roleLeast-privilege role for SDK access

Configuration presets

PresetEstimated costFeatures
starter~$1/moSimulator phone number, basic tracking
production~$2–10/moToll-free number, event tracking, message history
enterprise~$10–50/moFull features, link tracking, 1-year history
SMS sending costs ~$0.00849/segment + carrier fees (AWS End User Messaging pricing), billed directly by AWS.
1

Deploy infrastructure

Run the following command. No install required.
npx @wraps.dev/cli sms init
The CLI will prompt you for:
  • Hosting provider — Vercel, AWS, Railway, or other
  • AWS region — defaults to your configured region
  • Configuration preset — starter, production, or enterprise
  • Allowed countries — for fraud protection (blocks SMS to unlisted countries)
To skip prompts and use a specific preset:
npx @wraps.dev/cli sms init --preset production --yes
Deployment takes about 2–3 minutes. When complete, the CLI prints your phone number, configuration set name, and IAM role ARN.
The starter preset provisions a simulator phone number for testing only. It supports 100 messages/day and does not require carrier registration. Upgrade to production for a real toll-free number.
2

Verify a destination number

New AWS accounts start in sandbox mode. In sandbox mode you can only send to phone numbers you have explicitly verified.Verify a destination number:
npx @wraps.dev/cli sms verify-number --phoneNumber +14155551234
AWS sends a verification code to that number via SMS. Once you receive it:
npx @wraps.dev/cli sms verify-number --phoneNumber +14155551234 --code 123456
List all verified numbers at any time:
npx @wraps.dev/cli sms verify-number --list
3

Send a test SMS

Send a test message using the CLI:
npx @wraps.dev/cli sms test --to +14155551234 --message "Hello from Wraps!"
If the message is delivered, you’ll see a success message with the message ID.
4

Install the SDK

Install the @wraps.dev/sms package in your application:
npm install @wraps.dev/sms
5

Send your first SMS

import { WrapsSMS } from '@wraps.dev/sms';

const sms = new WrapsSMS();

const result = await sms.send({
  to: '+14155551234',
  message: 'Your verification code is 123456',
});

console.log('Sent:', result.messageId);
The SDK uses the default AWS credential chain. No extra configuration is needed if your environment already has credentials.

Production readiness

Before sending to real users:
  1. Request production access in the AWS End User Messaging console to exit sandbox mode.
  2. Register your toll-free number (required for production use, takes ~15 days):
    npx @wraps.dev/cli sms register
    
  3. Check SMS status to confirm your number and configuration:
    npx @wraps.dev/cli sms status
    

Next steps

SMS SDK reference

Batch sending, opt-out management, and error handling.

Opt-out management

Check, add, and remove opt-outs programmatically.

CLI SMS reference

Full reference for every wraps sms command and flag.

AWS credentials

Configure credentials for local development and CI/CD.

Build docs developers (and LLMs) love