RestClient
The RestClient is the entry point for all SignalWire REST API operations.
It authenticates with your project credentials and exposes every API namespace
as a property, giving you typed access to phone numbers, fabric resources,
call control, video rooms, datasphere documents, logs, and more.
Constructor Parameters
project
SignalWire project ID. Falls back to the SIGNALWIRE_PROJECT_ID environment variable
when not provided.
token
API token for authentication. Falls back to the SIGNALWIRE_API_TOKEN environment
variable when not provided.
host
SignalWire space hostname (e.g., your-space.signalwire.com). Falls back to the
SIGNALWIRE_SPACE environment variable when not provided.
All three parameters are required. If any is missing from both the constructor
arguments and environment variables, an Error is thrown.
Namespace Properties
fabric
AI agents, SWML scripts, subscribers, call flows, SIP gateways, and tokens.
See Fabric.
calling
REST-based call control with 37+ commands dispatched via POST.
See Calling.
phoneNumbers
Search, purchase, and manage phone numbers.
See Phone Numbers.
addresses
Manage regulatory addresses.
See Addresses.
queues
Manage call queues and queue members.
See Queues.
recordings
List, retrieve, and delete call recordings.
See Recordings.
numberGroups
Manage number groups and their memberships.
See Number Groups.
verifiedCallers
Manage and verify caller IDs.
See Verified Callers.
sipProfile
Get and update the project SIP profile.
See SIP Profile.
lookup
Phone number carrier and CNAM lookup.
See Lookup.
shortCodes
Manage short codes.
See Short Codes.
importedNumbers
Import externally-hosted phone numbers.
See Imported Numbers.
mfa
Multi-factor authentication via SMS and voice.
See MFA.
registry
10DLC brand and campaign registration.
See Registry.
datasphere
Document management and semantic search.
See Datasphere.
video
Video rooms, conferences, sessions, recordings, and streams.
See Video.
logs
Message, voice, fax, and conference log queries.
See Logs.
project
Project-level API token management.
See Project.
pubsub
PubSub token generation.
See PubSub.
chat
Chat token generation.
See Chat.
compat
Twilio-compatible LAML API for migration.
See Compatibility.