All URIs are relative to https://api.thesmsworks.co.uk/v1
| Method | HTTP request | Description |
|---|---|---|
| message_schedule_post | POST /message/schedule | |
| message_send_post | POST /message/send | |
| messages_failed_post | POST /messages/failed | |
| messages_inbox_post | POST /messages/inbox | |
| messages_messageid_delete | DELETE /messages/{messageid} | |
| messages_messageid_get | GET /messages/{messageid} | |
| messages_post | POST /messages | |
| messages_schedule_get | GET /messages/schedule | |
| messages_schedule_messageid_delete | DELETE /messages/schedule/{messageid} | |
| send_flash_message | POST /message/flash |
<Array> message_schedule_post(sms_message)
Schedules an SMS message to be sent at the date-time you specify
require 'time'
require 'openapi_client'
# setup authorization
OpenapiClient.configure do |config|
# Configure API key authorization: JWT
config.api_key['JWT'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['JWT'] = 'Bearer'
end
api_instance = OpenapiClient::MessagesApi.new
sms_message = OpenapiClient::Message.new({sender: 'YourCompany', destination: '447777777777', content: 'Your super awesome message'}) # Message | Message properties
begin
result = api_instance.message_schedule_post(sms_message)
p result
rescue OpenapiClient::ApiError => e
puts "Error when calling MessagesApi->message_schedule_post: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(<Array>, Integer, Hash)> message_schedule_post_with_http_info(sms_message)
begin
data, status_code, headers = api_instance.message_schedule_post_with_http_info(sms_message)
p status_code # => 2xx
p headers # => { ... }
p data # => <Array<ScheduledMessageResponse>>
rescue OpenapiClient::ApiError => e
puts "Error when calling MessagesApi->message_schedule_post_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| sms_message | Message | Message properties |
Array<ScheduledMessageResponse>
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
message_send_post(sms_message)
Send an SMS Message
require 'time'
require 'openapi_client'
# setup authorization
OpenapiClient.configure do |config|
# Configure API key authorization: JWT
config.api_key['JWT'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['JWT'] = 'Bearer'
end
api_instance = OpenapiClient::MessagesApi.new
sms_message = OpenapiClient::Message.new({sender: 'YourCompany', destination: '447777777777', content: 'Your super awesome message'}) # Message | Message properties
begin
result = api_instance.message_send_post(sms_message)
p result
rescue OpenapiClient::ApiError => e
puts "Error when calling MessagesApi->message_send_post: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> message_send_post_with_http_info(sms_message)
begin
data, status_code, headers = api_instance.message_send_post_with_http_info(sms_message)
p status_code # => 2xx
p headers # => { ... }
p data # => <SendMessageResponse>
rescue OpenapiClient::ApiError => e
puts "Error when calling MessagesApi->message_send_post_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| sms_message | Message | Message properties |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
<Array> messages_failed_post(query)
Get failed messages matching your search criteria
require 'time'
require 'openapi_client'
# setup authorization
OpenapiClient.configure do |config|
# Configure API key authorization: JWT
config.api_key['JWT'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['JWT'] = 'Bearer'
end
api_instance = OpenapiClient::MessagesApi.new
query = OpenapiClient::Query.new # Query |
begin
result = api_instance.messages_failed_post(query)
p result
rescue OpenapiClient::ApiError => e
puts "Error when calling MessagesApi->messages_failed_post: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(<Array>, Integer, Hash)> messages_failed_post_with_http_info(query)
begin
data, status_code, headers = api_instance.messages_failed_post_with_http_info(query)
p status_code # => 2xx
p headers # => { ... }
p data # => <Array<MessageResponse>>
rescue OpenapiClient::ApiError => e
puts "Error when calling MessagesApi->messages_failed_post_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| query | Query |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
<Array> messages_inbox_post(query)
Get unread uncoming messages matching your search criteria
require 'time'
require 'openapi_client'
# setup authorization
OpenapiClient.configure do |config|
# Configure API key authorization: JWT
config.api_key['JWT'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['JWT'] = 'Bearer'
end
api_instance = OpenapiClient::MessagesApi.new
query = OpenapiClient::Query.new # Query |
begin
result = api_instance.messages_inbox_post(query)
p result
rescue OpenapiClient::ApiError => e
puts "Error when calling MessagesApi->messages_inbox_post: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(<Array>, Integer, Hash)> messages_inbox_post_with_http_info(query)
begin
data, status_code, headers = api_instance.messages_inbox_post_with_http_info(query)
p status_code # => 2xx
p headers # => { ... }
p data # => <Array<MessageResponse>>
rescue OpenapiClient::ApiError => e
puts "Error when calling MessagesApi->messages_inbox_post_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| query | Query |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
messages_messageid_delete(messageid)
Delete the message with the mathcing messageid
require 'time'
require 'openapi_client'
# setup authorization
OpenapiClient.configure do |config|
# Configure API key authorization: JWT
config.api_key['JWT'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['JWT'] = 'Bearer'
end
api_instance = OpenapiClient::MessagesApi.new
messageid = 'messageid_example' # String | The ID of the message you would like returned
begin
result = api_instance.messages_messageid_delete(messageid)
p result
rescue OpenapiClient::ApiError => e
puts "Error when calling MessagesApi->messages_messageid_delete: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> messages_messageid_delete_with_http_info(messageid)
begin
data, status_code, headers = api_instance.messages_messageid_delete_with_http_info(messageid)
p status_code # => 2xx
p headers # => { ... }
p data # => <DeletedMessageResponse>
rescue OpenapiClient::ApiError => e
puts "Error when calling MessagesApi->messages_messageid_delete_with_http_info: #{e}"
end| 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
messages_messageid_get(messageid)
Retrieve a logged message by the message ID
require 'time'
require 'openapi_client'
# setup authorization
OpenapiClient.configure do |config|
# Configure API key authorization: JWT
config.api_key['JWT'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['JWT'] = 'Bearer'
end
api_instance = OpenapiClient::MessagesApi.new
messageid = 'messageid_example' # String | The ID of the message you would like returned
begin
result = api_instance.messages_messageid_get(messageid)
p result
rescue OpenapiClient::ApiError => e
puts "Error when calling MessagesApi->messages_messageid_get: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> messages_messageid_get_with_http_info(messageid)
begin
data, status_code, headers = api_instance.messages_messageid_get_with_http_info(messageid)
p status_code # => 2xx
p headers # => { ... }
p data # => <MessageResponse>
rescue OpenapiClient::ApiError => e
puts "Error when calling MessagesApi->messages_messageid_get_with_http_info: #{e}"
end| 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
<Array> messages_post(query)
Retrieve up to 1000 messages matching your search criteria
require 'time'
require 'openapi_client'
# setup authorization
OpenapiClient.configure do |config|
# Configure API key authorization: JWT
config.api_key['JWT'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['JWT'] = 'Bearer'
end
api_instance = OpenapiClient::MessagesApi.new
query = OpenapiClient::Query.new # Query |
begin
result = api_instance.messages_post(query)
p result
rescue OpenapiClient::ApiError => e
puts "Error when calling MessagesApi->messages_post: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(<Array>, Integer, Hash)> messages_post_with_http_info(query)
begin
data, status_code, headers = api_instance.messages_post_with_http_info(query)
p status_code # => 2xx
p headers # => { ... }
p data # => <Array<MessageResponse>>
rescue OpenapiClient::ApiError => e
puts "Error when calling MessagesApi->messages_post_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| query | Query |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
messages_schedule_get
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
require 'time'
require 'openapi_client'
# setup authorization
OpenapiClient.configure do |config|
# Configure API key authorization: JWT
config.api_key['JWT'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['JWT'] = 'Bearer'
end
api_instance = OpenapiClient::MessagesApi.new
begin
result = api_instance.messages_schedule_get
p result
rescue OpenapiClient::ApiError => e
puts "Error when calling MessagesApi->messages_schedule_get: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> messages_schedule_get_with_http_info
begin
data, status_code, headers = api_instance.messages_schedule_get_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => <ScheduledMessagesResponse>
rescue OpenapiClient::ApiError => e
puts "Error when calling MessagesApi->messages_schedule_get_with_http_info: #{e}"
endThis endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json;charset=UTF-8
messages_schedule_messageid_delete(messageid)
Cancels a scheduled SMS message
require 'time'
require 'openapi_client'
# setup authorization
OpenapiClient.configure do |config|
# Configure API key authorization: JWT
config.api_key['JWT'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['JWT'] = 'Bearer'
end
api_instance = OpenapiClient::MessagesApi.new
messageid = 'messageid_example' # String | The ID of the message you would like returned
begin
result = api_instance.messages_schedule_messageid_delete(messageid)
p result
rescue OpenapiClient::ApiError => e
puts "Error when calling MessagesApi->messages_schedule_messageid_delete: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> messages_schedule_messageid_delete_with_http_info(messageid)
begin
data, status_code, headers = api_instance.messages_schedule_messageid_delete_with_http_info(messageid)
p status_code # => 2xx
p headers # => { ... }
p data # => <CancelledMessageResponse>
rescue OpenapiClient::ApiError => e
puts "Error when calling MessagesApi->messages_schedule_messageid_delete_with_http_info: #{e}"
end| 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
send_flash_message(sms_message)
Sends an SMS flash message, which appears on the recipients lock screen
require 'time'
require 'openapi_client'
# setup authorization
OpenapiClient.configure do |config|
# Configure API key authorization: JWT
config.api_key['JWT'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['JWT'] = 'Bearer'
end
api_instance = OpenapiClient::MessagesApi.new
sms_message = OpenapiClient::Message.new({sender: 'YourCompany', destination: '447777777777', content: 'Your super awesome message'}) # Message | Message properties
begin
result = api_instance.send_flash_message(sms_message)
p result
rescue OpenapiClient::ApiError => e
puts "Error when calling MessagesApi->send_flash_message: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> send_flash_message_with_http_info(sms_message)
begin
data, status_code, headers = api_instance.send_flash_message_with_http_info(sms_message)
p status_code # => 2xx
p headers # => { ... }
p data # => <SendMessageResponse>
rescue OpenapiClient::ApiError => e
puts "Error when calling MessagesApi->send_flash_message_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| sms_message | Message | Message properties |
- Content-Type: application/json
- Accept: application/json;charset=UTF-8