@@ -58,6 +58,7 @@ def send_sms(
5858 message : str ,
5959 sender : str ,
6060 hirvalidation : bool = True ,
61+ sandbox : bool = False ,
6162 ) -> "SMSQuickSendResponse" :
6263 """
6364 Send an SMS message using the quick-send API.
@@ -67,6 +68,7 @@ def send_sms(
6768 message: The SMS message content
6869 sender: The sender phone number or sender ID
6970 hirvalidation: Enable HIR validation (default: True)
71+ sandbox: Use sandbox environment for testing (default: False)
7072
7173 Returns:
7274 SMSQuickSendResponse: The sent message details including ID and status
@@ -102,7 +104,7 @@ def send_sms(
102104 )
103105
104106 # Send request to the exact API endpoint
105- response = self .client .post ("user-api/sms/quick-send" , json = request_data .dict ())
107+ response = self .client .post ("user-api/sms/quick-send" , json = request_data .dict (), sandbox = sandbox )
106108
107109 # Parse response according to API spec
108110 from ..models .sms import SMSQuickSendResponse
@@ -112,10 +114,13 @@ def send_sms(
112114
113115 return result
114116
115- def get_senders (self ) -> "SendersListResponse" :
117+ def get_senders (self , sandbox : bool = False ) -> "SendersListResponse" :
116118 """
117119 Retrieve the list of available senders for the account.
118120
121+ Args:
122+ sandbox: Use sandbox environment for testing (default: False)
123+
119124 Returns:
120125 SendersListResponse: List of available senders with their details
121126
@@ -131,7 +136,7 @@ def get_senders(self) -> "SendersListResponse":
131136 logger .info ("Fetching available senders" )
132137
133138 # Send request to the exact API endpoint
134- response = self .client .get ("user-api/me/senders" )
139+ response = self .client .get ("user-api/me/senders" , sandbox = sandbox )
135140
136141 # Parse response according to API spec
137142 from ..models .sms import SendersListResponse
@@ -151,6 +156,7 @@ def buy_number(
151156 is_longcode : bool = True ,
152157 agreement_last_sent_date : Optional [datetime ] = None ,
153158 is_automated_enabled : bool = True ,
159+ sandbox : bool = False ,
154160 ) -> "NumberPurchaseResponse" :
155161 """
156162 Purchase a phone number.
@@ -164,6 +170,7 @@ def buy_number(
164170 is_longcode: Whether this is a long code number (default: True)
165171 agreement_last_sent_date: Last date agreement was sent (optional)
166172 is_automated_enabled: Whether automated messages are enabled (default: True)
173+ sandbox: Use sandbox environment for testing (default: False)
167174
168175 Returns:
169176 NumberPurchaseResponse: Details of the purchased number including features
@@ -227,6 +234,7 @@ def get_available_numbers(
227234 type : Optional [str ] = None ,
228235 prefix : Optional [str ] = None ,
229236 region : str = "US" ,
237+ sandbox : bool = False ,
230238 ) -> "AvailableNumbersResponse" :
231239 """
232240 Get available phone numbers for purchase.
@@ -238,6 +246,7 @@ def get_available_numbers(
238246 type: Filter by type (optional)
239247 prefix: Filter by prefix (optional)
240248 region: Filter by region (Country ISO Code), default: "US"
249+ sandbox: Use sandbox environment for testing (default: False)
241250
242251 Returns:
243252 AvailableNumbersResponse: List of available numbers with their features
@@ -292,14 +301,17 @@ def get_available_numbers(
292301 return result
293302
294303 # Legacy methods for backward compatibility
295- def send (self , to : str , body : str , from_ : Optional [str ] = None , ** kwargs ) -> "SMSQuickSendResponse" :
304+ def send (
305+ self , to : str , body : str , from_ : Optional [str ] = None , sandbox : bool = False , ** kwargs
306+ ) -> "SMSQuickSendResponse" :
296307 """
297308 Legacy method for sending SMS (backward compatibility).
298309
299310 Args:
300311 to: The recipient's phone number in E.164 format
301312 body: The message body text
302313 from_: The sender's phone number (optional)
314+ sandbox: Use sandbox environment for testing (default: False)
303315 **kwargs: Additional parameters (ignored for compatibility)
304316
305317 Returns:
0 commit comments