All URIs are relative to https://api.thesmsworks.co.uk/v1
Method | HTTP request | Description |
---|---|---|
messageSchedulePost | POST /message/schedule | |
messageSendPost | POST /message/send | |
messagesFailedPost | POST /messages/failed | |
messagesInboxPost | POST /messages/inbox | |
messagesMessageidDelete | DELETE /messages/{messageid} | |
messagesMessageidGet | GET /messages/{messageid} | |
messagesPost | POST /messages | |
messagesScheduleGet | GET /messages/schedule | |
messagesScheduleMessageidDelete | DELETE /messages/schedule/{messageid} | |
sendFlashMessage | POST /message/flash |
[ScheduledMessageResponse] messageSchedulePost(smsMessage)
Schedules an SMS message 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.MessagesApi();
let smsMessage = new TheSmsWorksApi.Message(); // Message | Message properties
apiInstance.messageSchedulePost(smsMessage, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
smsMessage | Message | Message properties |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
SendMessageResponse messageSendPost(smsMessage)
Send an 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.MessagesApi();
let smsMessage = new TheSmsWorksApi.Message(); // Message | Message properties
apiInstance.messageSendPost(smsMessage, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
smsMessage | Message | Message properties |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
[MessageResponse] messagesFailedPost(query)
Get failed messages matching your search criteria
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.MessagesApi();
let query = new TheSmsWorksApi.Query(); // Query |
apiInstance.messagesFailedPost(query, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
query | Query |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
[MessageResponse] messagesInboxPost(query)
Get unread uncoming messages matching your search criteria
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.MessagesApi();
let query = new TheSmsWorksApi.Query(); // Query |
apiInstance.messagesInboxPost(query, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
query | Query |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
DeletedMessageResponse messagesMessageidDelete(messageid)
Delete the message with the mathcing messageid
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.MessagesApi();
let messageid = "messageid_example"; // String | The ID of the message you would like returned
apiInstance.messagesMessageidDelete(messageid, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
messageid | String | The ID of the message you would like returned |
- Content-Type: Not defined
- Accept: application/json;charset=UTF-8
MessageResponse messagesMessageidGet(messageid)
Retrieve a logged message by the message 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.MessagesApi();
let messageid = "messageid_example"; // String | The ID of the message you would like returned
apiInstance.messagesMessageidGet(messageid, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
messageid | String | The ID of the message you would like returned |
- Content-Type: Not defined
- Accept: application/json;charset=UTF-8
[MessageResponse] messagesPost(query)
Retrieve up to 1000 messages matching your search criteria
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.MessagesApi();
let query = new TheSmsWorksApi.Query(); // Query |
apiInstance.messagesPost(query, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
query | Query |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
ScheduledMessagesResponse messagesScheduleGet()
Returns a list of messages scheduled from your account, comprising any messages scheduled in the last 3 months and any scheduled to send in the future
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.MessagesApi();
apiInstance.messagesScheduleGet((error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json;charset=UTF-8
CancelledMessageResponse messagesScheduleMessageidDelete(messageid)
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.MessagesApi();
let messageid = "messageid_example"; // String | The ID of the message you would like returned
apiInstance.messagesScheduleMessageidDelete(messageid, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
messageid | String | The ID of the message you would like returned |
- Content-Type: Not defined
- Accept: application/json;charset=UTF-8
SendMessageResponse sendFlashMessage(smsMessage)
Sends an SMS flash message, which appears on the recipients lock screen
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.MessagesApi();
let smsMessage = new TheSmsWorksApi.Message(); // Message | Message properties
apiInstance.sendFlashMessage(smsMessage, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
smsMessage | Message | Message properties |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8