QuickstartSend your first SMS
Send your first SMS
in 60 seconds
Get up and running with Dial in four simple steps. No account required. No API keys to manage. Just your wallet and a few lines of code.
01
Step 01
Install the SDK
Add the Dial SDK to your project. Works with any JavaScript runtime.
bashnpm install
1npm install @dial/api @x402/fetch23# Or with yarn4yarn add @dial/api @x402/fetch56# Or with pnpm7pnpm add @dial/api @x402/fetch02
Step 02
Configure your client
Set up the Dial client with your x402 payment wrapper. No API key needed — your wallet is your credential.
typescriptdial-client.ts
1import { DialClient } from "@dial/api";2import { wrapFetchWithPayment } from "@x402/fetch";3import { x402Client } from "@x402/core/client";4import { ExactEvmScheme } from "@x402/evm/exact/client";5import { toClientEvmSigner } from "@x402/evm";67// Create your x402 payment wrapper8const signer = toClientEvmSigner(walletClient);9const client = new x402Client();10client.register("eip155:*", new ExactEvmScheme(signer));11const paidFetch = wrapFetchWithPayment(fetch, client);1213// Initialize Dial14const dial = new DialClient({15 baseUrl: "https://x402.dial.wtf",16 x402Fetch: paidFetch,17});03
Step 03
Buy a phone line
Purchase a dedicated US or international phone number. $100 activation. Your wallet owns it.
typescriptbuy-line.ts
1// Buy a US phone line ($100 activation)2const { number } = await dial.numbers.buyUs({3 country: "US",4});56console.log("Your new number:", number);7// → +1 (555) 123-456789// Or buy an international line10const { number: intlNumber } = await dial.numbers.buyIntl({11 country: "GB",12});04
Step 04
Send your first SMS
Send a message from your new number. $0.05 per SMS. Track delivery status in real-time.
typescriptsend-sms.ts
1// Send an SMS from your number2const message = await dial.messages.send({3 to: "+1234567890",4 from: number,5 body: "Hello from Dial! 👋",6});78console.log("Message ID:", message.id);9console.log("Status:", message.status);10// → queued1112// Check delivery status13const status = await dial.messages.get(message.id);14console.log("Delivery:", status.deliveryState);15// → deliveredThe Magic Moment
Watch your message deliver
Real-time delivery tracking from queue to inbox.
Queued
Sent
Delivered
jsonDelivery webhook payload
1{2 "messageId": "msg_2vPqN9LkX3wR8sT",3 "status": "delivered",4 "to": "+1234567890",5 "from": "+15551234567",6 "body": "Hello from Dial! 👋",7 "deliveredAt": "2024-01-15T09:23:17.000Z",8 "carrier": "T-Mobile",9 "networkCode": "310260"10}What's next?
Explore more of what Dial can do.