Phone Numbers

View as MarkdownOpen in Claude

Search for available phone numbers, purchase them, and manage the numbers in your SignalWire project. This resource extends the standard CRUD pattern with a search() method for discovering available numbers and uses PUT for updates.

Access via client.phoneNumbers on a RestClient instance.

1import { RestClient } from "@signalwire/sdk";
2
3const client = new RestClient({
4 project: "your-project-id",
5 token: "your-api-token",
6 host: "your-space.signalwire.com"
7});
8
9const available = await client.phoneNumbers.search({ areacode: "512" });
10for (const number of available.data ?? []) {
11 console.log(number.phoneNumber);
12}

Methods