Quickstart

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.

Step 01

Install the SDK

Add the Dial SDK to your project. Works with any JavaScript runtime.

bashnpm install
npm install @dial/api @x402/fetch
# Or with yarn
yarn add @dial/api @x402/fetch
# Or with pnpm
pnpm add @dial/api @x402/fetch
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
import { DialClient } from "@dial/api";
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { toClientEvmSigner } from "@x402/evm";
// Create your x402 payment wrapper
const signer = toClientEvmSigner(walletClient);
const client = new x402Client();
client.register("eip155:*", new ExactEvmScheme(signer));
const paidFetch = wrapFetchWithPayment(fetch, client);
// Initialize Dial
const dial = new DialClient({
baseUrl: "https://x402.dial.wtf",
x402Fetch: paidFetch,
});
Step 03

Buy a phone line

Purchase a dedicated US or international phone number. $100 activation. Your wallet owns it.

typescriptbuy-line.ts
// Buy a US phone line ($100 activation)
const { number } = await dial.numbers.buyUs({
country: "US",
});
console.log("Your new number:", number);
// → +1 (555) 123-4567
// Or buy an international line
const { number: intlNumber } = await dial.numbers.buyIntl({
country: "GB",
});
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
// Send an SMS from your number
const message = await dial.messages.send({
to: "+1234567890",
from: number,
body: "Hello from Dial! 👋",
});
console.log("Message ID:", message.id);
console.log("Status:", message.status);
// → queued
// Check delivery status
const status = await dial.messages.get(message.id);
console.log("Delivery:", status.deliveryState);
// → delivered
The Magic Moment

Watch your message deliver

Real-time delivery tracking from queue to inbox.

Queued
Sent
Delivered
jsonDelivery webhook payload
{
"messageId": "msg_2vPqN9LkX3wR8sT",
"status": "delivered",
"to": "+1234567890",
"from": "+15551234567",
"body": "Hello from Dial! 👋",
"deliveredAt": "2024-01-15T09:23:17.000Z",
"carrier": "T-Mobile",
"networkCode": "310260"
}