REST Client
What Is the REST Client?
The SignalWireClient provides a synchronous Python interface to all SignalWire REST APIs. It organizes the platform’s HTTP endpoints into namespaced resource objects with standard CRUD operations.
When to Use REST vs RELAY vs Agents
Use the REST client for tasks like purchasing phone numbers, managing fabric resources, querying call logs, or any operation that doesn’t require real-time event handling.
Quick Start
Python
TypeScript
Authentication
Constructor Arguments
Environment Variables
All credentials can be provided via environment variables:
Namespaced Resources
The client exposes all SignalWire APIs through typed namespace properties:
CRUD Pattern
Most resources follow a standard CRUD pattern:
Fabric Namespace
Manage SignalWire Fabric resources — AI agents, SWML scripts, subscribers, and call flows:
Phone Numbers
Search, purchase, and manage phone numbers:
Calling Namespace
REST-based call control with 37+ commands. All commands are dispatched via POST:
Video Namespace
Manage video rooms, conferences, sessions, and recordings:
Datasphere Namespace
Manage documents and run semantic search:
Logs Namespace
Query message, voice, fax, and conference logs:
Registry Namespace (10DLC)
Manage 10DLC brands and campaigns for A2P messaging compliance:
Compatibility (LAML) Namespace
Twilio-compatible REST API for migrating existing applications:
Other Resources
Pagination
For endpoints that return paginated results, use PaginatedIterator:
The iterator automatically follows links.next URLs to fetch subsequent pages.
Error Handling
REST errors raise SignalWireRestError: