All URIs are relative to https://api.thesmsworks.co.uk/v1
Method | HTTP request | Description |
---|---|---|
batchAnyPost | POST /batch/any | |
batchBatchidGet | GET /batch/{batchid} | |
batchSchedulePost | POST /batch/schedule | |
batchSendPost | POST /batch/send | |
batchesScheduleBatchidDelete | DELETE /batches/schedule/{batchid} |
BatchMessageResponse batchAnyPost(messages)
Sends a collection of unique SMS messages. Batches may contain up to 5000 messages at a time.
import TheSmsWorksApi from 'the_sms_works_api';
let defaultClient = TheSmsWorksApi.ApiClient.instance;
// Configure API key authorization: JWT
let JWT = defaultClient.authentications['JWT'];
JWT.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//JWT.apiKeyPrefix = 'Token';
let apiInstance = new TheSmsWorksApi.BatchMessagesApi();
let messages = {key: null}; // Object | An array of messages
apiInstance.batchAnyPost(messages, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
messages | Object | An array of messages |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
[MessageResponse] batchBatchidGet(batchid)
Retrieve all messages in a batch with the given batch ID
import TheSmsWorksApi from 'the_sms_works_api';
let defaultClient = TheSmsWorksApi.ApiClient.instance;
// Configure API key authorization: JWT
let JWT = defaultClient.authentications['JWT'];
JWT.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//JWT.apiKeyPrefix = 'Token';
let apiInstance = new TheSmsWorksApi.BatchMessagesApi();
let batchid = "batchid_example"; // String | The ID of the batch you would like returned
apiInstance.batchBatchidGet(batchid, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
batchid | String | The ID of the batch you would like returned |
- Content-Type: Not defined
- Accept: application/json;charset=UTF-8
ScheduledBatchResponse batchSchedulePost(smsMessage)
Schedules a batch of SMS messages to be sent at the date time you specify
import TheSmsWorksApi from 'the_sms_works_api';
let defaultClient = TheSmsWorksApi.ApiClient.instance;
// Configure API key authorization: JWT
let JWT = defaultClient.authentications['JWT'];
JWT.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//JWT.apiKeyPrefix = 'Token';
let apiInstance = new TheSmsWorksApi.BatchMessagesApi();
let smsMessage = new TheSmsWorksApi.BatchMessage(); // BatchMessage | Message properties
apiInstance.batchSchedulePost(smsMessage, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
smsMessage | BatchMessage | Message properties |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
BatchMessageResponse batchSendPost(smsMessage)
Send a single SMS message to multiple recipients. Batches may contain up to 5000 messages at a time.
import TheSmsWorksApi from 'the_sms_works_api';
let defaultClient = TheSmsWorksApi.ApiClient.instance;
// Configure API key authorization: JWT
let JWT = defaultClient.authentications['JWT'];
JWT.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//JWT.apiKeyPrefix = 'Token';
let apiInstance = new TheSmsWorksApi.BatchMessagesApi();
let smsMessage = new TheSmsWorksApi.BatchMessage(); // BatchMessage | Message properties
apiInstance.batchSendPost(smsMessage, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
smsMessage | BatchMessage | Message properties |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
CancelledMessageResponse batchesScheduleBatchidDelete(batchid)
Cancels a scheduled SMS message
import TheSmsWorksApi from 'the_sms_works_api';
let defaultClient = TheSmsWorksApi.ApiClient.instance;
// Configure API key authorization: JWT
let JWT = defaultClient.authentications['JWT'];
JWT.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//JWT.apiKeyPrefix = 'Token';
let apiInstance = new TheSmsWorksApi.BatchMessagesApi();
let batchid = "batchid_example"; // String | The ID of the batch you would like returned
apiInstance.batchesScheduleBatchidDelete(batchid, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
batchid | String | The ID of the batch you would like returned |
- Content-Type: Not defined
- Accept: application/json;charset=UTF-8