# SMS CLI Commands

Source: https://wraps.dev/docs/cli-reference/sms

CLI Reference / SMS

# SMS Commands

Deploy AWS End User Messaging SMS infrastructure for transactional and marketing messages.

**Pricing:** Free to use. You pay AWS directly for phone numbers ($1-2/mo) and per-message costs (~$0.0075/segment US). Registration fees apply for toll-free and 10DLC numbers.

## wraps sms init

Deploy SMS infrastructure to your AWS account. Sets up phone numbers, configuration sets, event tracking, and IAM roles.

Usage

terminal.sh

```
npx @wraps.dev/cli sms init [options]
```

Options

`-p, --provider <provider>`

Hosting provider: vercel, aws, railway, or other

`-r, --region <region>`

AWS region to deploy infrastructure (default: us-east-1)

`--preset <preset>`

Configuration preset: starter, production, or enterprise

`-y, --yes`

Skip confirmation prompts

Phone Number Types

-   **Simulator** ($1/mo) - Testing only, 100 msg/day, no registration required
-   **Toll-free** ($2/mo) - Production ready, 3 MPS, requires registration (~15 days)
-   **10DLC** ($2/mo + fees) - High volume, up to 75 MPS, requires brand + campaign registration

What It Does

-   Creates an IAM role for your application
-   Provisions a phone number (simulator, toll-free, or 10DLC based on selection)
-   Sets up an opt-out list for compliance
-   Configures event tracking via SNS + SQS
-   Deploys Lambda function for event processing (if event tracking enabled)
-   Creates DynamoDB table for message history (if enabled)
-   Configures fraud protection

## wraps sms status

Display the current status of your SMS infrastructure, including phone number, configuration, and enabled features.

Usage

terminal.sh

```
npx @wraps.dev/cli sms status [options]
```

Options

`--json`

Output status as JSON

What It Displays

-   Phone numbers and type
-   Opt-out list configuration
-   Region and configuration preset
-   Event tracking status
-   All deployed resources

## wraps sms test

Send a test SMS message to verify your setup is working. Supports AWS simulator numbers for sandbox testing.

Usage

terminal.sh

```
npx @wraps.dev/cli sms test [options]
```

Options

`--to <phone>`

Destination phone number in E.164 format (e.g., +14155551234)

`--message <text>`

Message content to send

`--json`

Output result as JSON

What It Does

-   Sends a test SMS to the specified number
-   Shows delivery status and segment count
-   Supports AWS simulator numbers for sandbox testing

Examples

Interactive mode (prompts for destination):

terminal.sh

```
npx @wraps.dev/cli sms test
```

Send to a specific number:

terminal.sh

```
npx @wraps.dev/cli sms test --to +14155551234 --message "Hello from Wraps!"
```

## wraps sms verify-number

Verify a destination phone number for sandbox testing. In sandbox mode, numbers must be verified before they can receive test messages.

Usage

terminal.sh

```
npx @wraps.dev/cli sms verify-number [options]
```

Options

`--phone-number <phone>`

Phone number to verify in E.164 format

`--code <code>`

Verification code received via SMS

`--resend`

Resend verification code to a pending number

`--list`

List all verified destination numbers

`--delete`

Remove a number from the verified list

Examples

Start verification for a number:

terminal.sh

```
npx @wraps.dev/cli sms verify-number --phone-number +14155551234
```

Complete verification with code:

terminal.sh

```
npx @wraps.dev/cli sms verify-number --phone-number +14155551234 --code 123456
```

List verified numbers:

terminal.sh

```
npx @wraps.dev/cli sms verify-number --list
```

## wraps sms register

Submit a toll-free verification request to AWS for production sending. Required before toll-free numbers can send messages at scale.

Usage

terminal.sh

```
npx @wraps.dev/cli sms register [options]
```

Options

`-r, --region <region>`

AWS region where SMS is deployed

Registration Requirements

-   Business name and address
-   Use case description (what messages you're sending)
-   Sample messages (2-3 examples)
-   How users opt-in to receive messages
-   Expected monthly message volume

**Timeline:** Registration typically takes 1-15 business days.

## wraps sms upgrade

Enhance your SMS infrastructure with additional features or upgrade to a higher-tier phone number.

Usage

terminal.sh

```
npx @wraps.dev/cli sms upgrade [options]
```

Options

`--preset <name>`

Target preset: starter, production, or enterprise

`-r, --region <region>`

AWS region where SMS is deployed

`-y, --yes`

Skip confirmation prompts

Upgrade Options

-   Upgrade phone number type (simulator → toll-free → 10DLC)
-   Change configuration preset (starter → production → enterprise)
-   Enable/disable event tracking
-   Change message history retention period
-   Enable/disable link click tracking
-   Enable/disable message archiving
-   Configure fraud protection (country allowlist, AIT filtering)

## wraps sms sync

Synchronize your local configuration with deployed infrastructure. Useful after CLI updates or when resources need to be recreated.

Usage

terminal.sh

```
npx @wraps.dev/cli sms sync [options]
```

Options

`-r, --region <region>`

AWS region where SMS is deployed

`-y, --yes`

Skip confirmation prompts

What It Does

-   Updates Lambda function code with latest CLI version
-   Recreates any missing SDK-managed resources (phone pool, event destination)
-   Ensures fraud protection is configured
-   Refreshes infrastructure state

## wraps sms destroy

Remove all SMS infrastructure from your AWS account. This is a destructive operation.

Usage

terminal.sh

```
npx @wraps.dev/cli sms destroy [options]
```

Options

`-f, --force`

Skip confirmation prompt (use with caution)

`--preview`

Preview what would be destroyed without making changes

What It Removes

-   Phone number (released back to AWS pool)
-   Configuration set and event destination
-   SNS topic, SQS queue, and DLQ
-   Lambda functions
-   DynamoDB table (if event tracking was enabled)
-   IAM role and policies
-   Protect configuration
-   Local metadata and Pulumi state

## Programmatic Usage

After deploying infrastructure with the CLI, use the SDK to send SMS messages from your application.

Example: Send SMS from Node.js

send-sms.ts

```
import { WrapsSMS } from '@wraps.dev/sms';const sms = new WrapsSMS();// Send a transactional SMSconst result = await sms.send({  to: '+14155551234',  message: 'Your verification code is 123456',});console.log('SMS sent:', result.messageId);
```

[CDN Commands](https://wraps.dev/docs/cli-reference/cdn)[Back to CLI Reference](https://wraps.dev/docs/cli-reference)
