mailslurp.api.SmsControllerApi
Load the API package
All URIs are relative to https://api.mailslurp.com
Method | HTTP request | Description |
---|---|---|
deleteSmsMessage | DELETE /sms/{smsId} | Delete SMS message. |
deleteSmsMessages | DELETE /sms | Delete all SMS messages |
getSmsMessage | GET /sms/{smsId} | Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. |
getSmsMessagesPaginated | GET /sms | Get all SMS messages in all phone numbers in paginated form. . |
deleteSmsMessage(smsId)
Delete SMS message.
Delete an SMS message
Example
import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
final api_instance = SmsControllerApi();
final smsId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
try {
api_instance.deleteSmsMessage(smsId);
} catch (e) {
print('Exception when calling SmsControllerApi->deleteSmsMessage: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
smsId | String |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to ]
deleteSmsMessages(phoneNumberId)
Delete all SMS messages
Delete all SMS messages or all messages for a given phone number
Example
import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
final api_instance = SmsControllerApi();
final phoneNumberId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
try {
api_instance.deleteSmsMessages(phoneNumberId);
} catch (e) {
print('Exception when calling SmsControllerApi->deleteSmsMessages: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
phoneNumberId | String | [optional] |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to ]
SmsDto getSmsMessage(smsId)
Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController.
Returns a SMS summary object with content.
Example
import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
final api_instance = SmsControllerApi();
final smsId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
try {
final result = api_instance.getSmsMessage(smsId);
print(result);
} catch (e) {
print('Exception when calling SmsControllerApi->getSmsMessage: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
smsId | String |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
PageSmsProjection getSmsMessagesPaginated(phoneNumber, page, size, sort, unreadOnly, since, before)
Get all SMS messages in all phone numbers in paginated form. .
By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages
Example
import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
final api_instance = SmsControllerApi();
final phoneNumber = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | Optional receiving phone number to filter SMS messages for
final page = 56; // int | Optional page in SMS list pagination
final size = 56; // int | Optional page size in SMS list pagination. Maximum size is 100. Use page and sort to page through larger results
final sort = sort_example; // String | Optional createdAt sort direction ASC or DESC
final unreadOnly = true; // bool | Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly
final since = 2013-10-20T19:20:30+01:00; // DateTime | Optional filter SMSs received after given date time
final before = 2013-10-20T19:20:30+01:00; // DateTime | Optional filter SMSs received before given date time
try {
final result = api_instance.getSmsMessagesPaginated(phoneNumber, page, size, sort, unreadOnly, since, before);
print(result);
} catch (e) {
print('Exception when calling SmsControllerApi->getSmsMessagesPaginated: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
phoneNumber | String | Optional receiving phone number to filter SMS messages for | [optional] |
page | int | Optional page in SMS list pagination | [optional] [default to 0] |
size | int | Optional page size in SMS list pagination. Maximum size is 100. Use page and sort to page through larger results | [optional] [default to 20] |
sort | String | Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] |
unreadOnly | bool | Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly | [optional] [default to false] |
since | DateTime | Optional filter SMSs received after given date time | [optional] |
before | DateTime | Optional filter SMSs received before given date time | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]