Skip to main content
Phone numbers are required to send SMS and WhatsApp messages. Zavu lets you search for available numbers and purchase them directly through the API or dashboard.

Free US Phone Number

Every new team gets their first US phone number free. This is a great way to get started with messaging without any upfront cost.
The free phone number offer applies to the first US phone number purchased by a team. Monthly fees still apply after the first month.

Searching for Available Numbers

Before purchasing, search for available numbers in your target country:
const result = await zavu.phoneNumbers.searchAvailable({
  countryCode: "US",
  type: "local",
  limit: 10,
});

for (const number of result.items) {
  console.log(number.phoneNumber, number.locality, number.region);
  console.log("Monthly price:", number.pricing.monthlyPrice);
  console.log("Free eligible:", number.pricing.isFreeEligible);
}

Search Parameters

ParameterTypeRequiredDescription
countryCodestringYesTwo-letter ISO country code (e.g., “US”, “GB”)
typestringNoNumber type: local, mobile, or tollFree (default: local)
containsstringNoSearch for numbers containing this pattern (e.g., “555”)
limitintegerNoMax results to return (default: 10, max: 50)

Response

{
  "items": [
    {
      "phoneNumber": "+14155551234",
      "friendlyName": "(415) 555-1234",
      "locality": "San Francisco",
      "region": "CA",
      "capabilities": {
        "sms": true,
        "voice": true,
        "mms": true
      },
      "pricing": {
        "monthlyPrice": 1.25,
        "upfrontPrice": 1.00,
        "isFreeEligible": true
      }
    }
  ]
}

Regulatory Requirements

Some countries require additional documentation before phone numbers can be activated. Check the Regulatory Requirements guide for details on:
  • Which countries require documentation
  • How to create and verify addresses
  • How to upload identity documents
  • Including requirements in your purchase request
US and Canada phone numbers typically don’t require additional documentation.

Purchasing a Phone Number

Once you’ve found a number you want, purchase it:
const phoneNumber = await zavu.phoneNumbers.purchase({
  phoneNumber: "+14155551234",
  name: "Customer Support",
});

console.log("Purchased:", phoneNumber.phoneNumber);
console.log("ID:", phoneNumber.id);

Purchase Parameters

ParameterTypeRequiredDescription
phoneNumberstringYesPhone number in E.164 format
namestringNoCustom name for the phone number (max 100 characters)

Response

{
  "phoneNumber": {
    "id": "pn_abc123",
    "phoneNumber": "+14155551234",
    "name": "Customer Support",
    "capabilities": ["sms", "voice"],
    "status": "active",
    "pricing": {
      "monthlyPrice": 1.25,
      "upfrontCost": 100,
      "monthlyCost": 125,
      "isFreeNumber": true
    },
    "nextRenewalDate": "2025-02-15T00:00:00.000Z",
    "createdAt": "2025-01-15T10:30:00.000Z"
  }
}
Purchasing a phone number deducts the upfront cost from your account balance. Ensure you have sufficient funds before purchasing.

Listing Your Phone Numbers

View all phone numbers owned by your project:
const result = await zavu.phoneNumbers.list();

for (const number of result.items) {
  console.log(number.id, number.phoneNumber, number.name);
  console.log("Status:", number.status);
}

// Filter by status
const activeNumbers = await zavu.phoneNumbers.list({
  status: "active",
});

Getting Phone Number Details

Retrieve details for a specific phone number:
const number = await zavu.phoneNumbers.retrieve("pn_abc123");

console.log(number.phoneNumber);
console.log("Assigned to sender:", number.senderId);
console.log("Next renewal:", number.nextRenewalDate);

Updating a Phone Number

Update the name of a phone number:
const number = await zavu.phoneNumbers.update("pn_abc123", {
  name: "Marketing Line",
});

Assigning to a Sender

Connect a phone number to a sender profile for use in messaging:
const number = await zavu.phoneNumbers.update("pn_abc123", {
  senderId: "snd_xyz789",
});
To unassign a phone number from a sender:
const number = await zavu.phoneNumbers.update("pn_abc123", {
  senderId: null,
});

Releasing a Phone Number

Release a phone number you no longer need:
await zavu.phoneNumbers.release("pn_abc123");
You cannot release a phone number that is assigned to a sender. Unassign it first by setting senderId to null.

Phone Number Statuses

StatusDescription
activeReady to use for messaging
pendingPurchase in progress
suspendedTemporarily disabled (e.g., for payment issues)

Using Phone Numbers with Channels

Phone numbers can be used with different messaging channels:

SMS

Phone numbers are directly used as the sender ID for SMS messages. Simply assign the phone number to a sender and start sending.

WhatsApp

For WhatsApp, you need to register your phone number with WhatsApp Business API. The phone number is used to receive the verification code during WhatsApp Business Account setup.
WhatsApp Business registration requires a phone number that can receive SMS. Your Zavu phone number works perfectly for this.

Pricing

Phone number pricing varies by country and type:
ComponentDescription
upfrontPriceOne-time purchase cost
monthlyPriceRecurring monthly fee
isFreeEligibleWhether this qualifies for the free first US number
Prices are displayed in USD. Monthly fees are automatically charged from your account balance.

Best Practices

Name Your Numbers

Give descriptive names to phone numbers so you can easily identify their purpose.

Monitor Status

Regularly check the status of your phone numbers to ensure they’re active.

Plan Capacity

Purchase numbers based on your messaging volume and geographic needs.

Use Local Numbers

Local numbers often have higher delivery rates than toll-free numbers for certain use cases.

Next Steps