WinSMS

Credits

getCreditBalance

Get your current WinSMS credit balance

Get the current remaining credit balance for the account. Note - The credit balance is expressed as a value with a single decimal place.


/credits/balance

Usage and SDK Samples

curl -X GET -H "AUTHORIZATION: [[apiKey]]" "https://www.winsms.co.za/api/rest/v1/credits/balance"
import d.*;
import d.auth.*;
import d.model.*;
import d.api.CreditsApi;

import java.io.File;
import java.util.*;

public class CreditsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        CreditsApi apiInstance = new CreditsApi();
        try {
            apiInstance.getCreditBalance();
        } catch (ApiException e) {
            System.err.println("Exception when calling CreditsApi#getCreditBalance");
            e.printStackTrace();
        }
    }
}
import d.api.CreditsApi;

public class CreditsApiExample {

    public static void main(String[] args) {
        CreditsApi apiInstance = new CreditsApi();
        try {
            apiInstance.getCreditBalance();
        } catch (ApiException e) {
            System.err.println("Exception when calling CreditsApi#getCreditBalance");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"AUTHORIZATION"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"AUTHORIZATION"];


CreditsApi *apiInstance = [[CreditsApi alloc] init];

// Get your current WinSMS credit balance
[apiInstance getCreditBalanceWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WinSms = require('win_sms');
var defaultClient = WinSms.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['AUTHORIZATION'] = "Token"

var api = new WinSms.CreditsApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getCreditBalance(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCreditBalanceExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("AUTHORIZATION", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("AUTHORIZATION", "Bearer");

            var apiInstance = new CreditsApi();

            try
            {
                // Get your current WinSMS credit balance
                apiInstance.getCreditBalance();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CreditsApi.getCreditBalance: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('AUTHORIZATION', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('AUTHORIZATION', 'Bearer');

$api_instance = new Swagger\Client\Api\CreditsApi();

try {
    $api_instance->getCreditBalance();
} catch (Exception $e) {
    echo 'Exception when calling CreditsApi->getCreditBalance: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CreditsApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'AUTHORIZATION'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'AUTHORIZATION'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CreditsApi->new();

eval { 
    $api_instance->getCreditBalance();
};
if ($@) {
    warn "Exception when calling CreditsApi->getCreditBalance: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['AUTHORIZATION'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['AUTHORIZATION'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CreditsApi()

try: 
    # Get your current WinSMS credit balance
    api_instance.get_credit_balance()
except ApiException as e:
    print("Exception when calling CreditsApi->getCreditBalance: %s\n" % e)

Parameters

Responses

Status: 200 - OK

Status: 401 - Unauthorized

{timeStamp=20170120152253514, version=1.0, statusCode=401, errorMessage=The 'AUTHORIZATION' header was not found. Set the 'AUTHORIZATION' request header to your WinSMS API Key}

Status: 404 - Not found

{timeStamp=20170120152253514, version=1.0, statusCode=404, errorMessage=The resource requested does not exist. Please verify the path, spelling, and capitalisation}

Status: 405 - Method Not Allowed

{timeStamp=20170120152253514, version=1.0, statusCode=405, errorMessage=Request method should be set to 'GET', not 'PUT'.}

Status: 500 - Internal Server Error

{timeStamp=20170120152253514, version=1.0, statusCode=500, errorMessage=An unknown error has occurred - authorising API Key}

transferCredits

Transfer credits between main and sub accounts.

Transfer credits between accounts.<br> * From Main account to Sub account. * From Sub account to Main account. * From Sub account to another Sub account.


/credits/transfer

Usage and SDK Samples

curl -X POST -H "AUTHORIZATION: [[apiKey]]" "https://www.winsms.co.za/api/rest/v1/credits/transfer"
import d.*;
import d.auth.*;
import d.model.*;
import d.api.CreditsApi;

import java.io.File;
import java.util.*;

public class CreditsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        CreditsApi apiInstance = new CreditsApi();
        CreditTransferRequest creditTransferDetails = ; // CreditTransferRequest | The details of the credit transfer. Sender account number, recipient account number, and number of credits to transfer.

Your WinSMS account number and sub account number/s can be obtained by logging in to the WinSMS Client Zone (www.winsms.co.za/cz) with the main account's credentials. The main account number is on the home tab and the sub account numbers are under the sub accounts tab.
Account numbers should be submitted as integers. Do not add the 'W' prefix. try { apiInstance.transferCredits(creditTransferDetails); } catch (ApiException e) { System.err.println("Exception when calling CreditsApi#transferCredits"); e.printStackTrace(); } } }
import d.api.CreditsApi;

public class CreditsApiExample {

    public static void main(String[] args) {
        CreditsApi apiInstance = new CreditsApi();
        CreditTransferRequest creditTransferDetails = ; // CreditTransferRequest | The details of the credit transfer. Sender account number, recipient account number, and number of credits to transfer.

Your WinSMS account number and sub account number/s can be obtained by logging in to the WinSMS Client Zone (www.winsms.co.za/cz) with the main account's credentials. The main account number is on the home tab and the sub account numbers are under the sub accounts tab.
Account numbers should be submitted as integers. Do not add the 'W' prefix. try { apiInstance.transferCredits(creditTransferDetails); } catch (ApiException e) { System.err.println("Exception when calling CreditsApi#transferCredits"); e.printStackTrace(); } } }
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"AUTHORIZATION"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"AUTHORIZATION"];

CreditTransferRequest *creditTransferDetails = ; // The details of the credit transfer. Sender account number, recipient account number, and number of credits to transfer.

Your WinSMS account number and sub account number/s can be obtained by logging in to the WinSMS Client Zone (www.winsms.co.za/cz) with the main account's credentials. The main account number is on the home tab and the sub account numbers are under the sub accounts tab.
Account numbers should be submitted as integers. Do not add the 'W' prefix. CreditsApi *apiInstance = [[CreditsApi alloc] init]; // Transfer credits between main and sub accounts. [apiInstance transferCreditsWith:creditTransferDetails completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error: %@", error); } }];
var WinSms = require('win_sms');
var defaultClient = WinSms.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['AUTHORIZATION'] = "Token"

var api = new WinSms.CreditsApi()

var creditTransferDetails = ; // {CreditTransferRequest} The details of the credit transfer. Sender account number, recipient account number, and number of credits to transfer.

Your WinSMS account number and sub account number/s can be obtained by logging in to the WinSMS Client Zone (www.winsms.co.za/cz) with the main account's credentials. The main account number is on the home tab and the sub account numbers are under the sub accounts tab.
Account numbers should be submitted as integers. Do not add the 'W' prefix. var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; api.transferCredits(creditTransferDetails, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class transferCreditsExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("AUTHORIZATION", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("AUTHORIZATION", "Bearer");

            var apiInstance = new CreditsApi();
            var creditTransferDetails = new CreditTransferRequest(); // CreditTransferRequest | The details of the credit transfer. Sender account number, recipient account number, and number of credits to transfer.

Your WinSMS account number and sub account number/s can be obtained by logging in to the WinSMS Client Zone (www.winsms.co.za/cz) with the main account's credentials. The main account number is on the home tab and the sub account numbers are under the sub accounts tab.
Account numbers should be submitted as integers. Do not add the 'W' prefix. try { // Transfer credits between main and sub accounts. apiInstance.transferCredits(creditTransferDetails); } catch (Exception e) { Debug.Print("Exception when calling CreditsApi.transferCredits: " + e.Message ); } } } }
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('AUTHORIZATION', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('AUTHORIZATION', 'Bearer');

$api_instance = new Swagger\Client\Api\CreditsApi();
$creditTransferDetails = ; // CreditTransferRequest | The details of the credit transfer. Sender account number, recipient account number, and number of credits to transfer.

Your WinSMS account number and sub account number/s can be obtained by logging in to the WinSMS Client Zone (www.winsms.co.za/cz) with the main account's credentials. The main account number is on the home tab and the sub account numbers are under the sub accounts tab.
Account numbers should be submitted as integers. Do not add the 'W' prefix. try { $api_instance->transferCredits($creditTransferDetails); } catch (Exception $e) { echo 'Exception when calling CreditsApi->transferCredits: ', $e->getMessage(), PHP_EOL; } ?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CreditsApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'AUTHORIZATION'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'AUTHORIZATION'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CreditsApi->new();
my $creditTransferDetails = WWW::SwaggerClient::Object::CreditTransferRequest->new(); # CreditTransferRequest | The details of the credit transfer. Sender account number, recipient account number, and number of credits to transfer.

Your WinSMS account number and sub account number/s can be obtained by logging in to the WinSMS Client Zone (www.winsms.co.za/cz) with the main account's credentials. The main account number is on the home tab and the sub account numbers are under the sub accounts tab.
Account numbers should be submitted as integers. Do not add the 'W' prefix. eval { $api_instance->transferCredits(creditTransferDetails => $creditTransferDetails); }; if ($@) { warn "Exception when calling CreditsApi->transferCredits: $@\n"; }
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['AUTHORIZATION'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['AUTHORIZATION'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CreditsApi()
creditTransferDetails =  # CreditTransferRequest | The details of the credit transfer. Sender account number, recipient account number, and number of credits to transfer.

Your WinSMS account number and sub account number/s can be obtained by logging in to the WinSMS Client Zone (www.winsms.co.za/cz) with the main account's credentials. The main account number is on the home tab and the sub account numbers are under the sub accounts tab.
Account numbers should be submitted as integers. Do not add the 'W' prefix. try: # Transfer credits between main and sub accounts. api_instance.transfer_credits(creditTransferDetails) except ApiException as e: print("Exception when calling CreditsApi->transferCredits: %s\n" % e)

Parameters

Body parameters
Name Description
creditTransferDetails *

Responses

Status: 200 - OK

Status: 400 - Bad Request

{timeStamp=20170120152253514, version=1.0, statusCode=400, errorMessage=Invalid JSON payload received}

Status: 401 - Unauthorized

{timeStamp=20170120152253514, version=1.0, statusCode=401, errorMessage=The 'AUTHORIZATION' header was not found. Set the 'AUTHORIZATION' request header to your WinSMS API Key}

Status: 404 - Not found

{timeStamp=20170120152253514, version=1.0, statusCode=404, errorMessage=The resource requested does not exist. Please verify the path, spelling, and capitalisation}

Status: 405 - Method Not Allowed

{timeStamp=20170120152253514, version=1.0, statusCode=405, errorMessage=Request method should be set to 'POST', not 'GET'.}

Status: 413 - Payload Too Large

{timeStamp=20170120152253514, version=1.0, statusCode=413, errorMessage=Request POST data is: 205kb. The maximum POST size allowed is 200kb.}

Status: 415 - Unsupported Media Type

{timeStamp=20170120152253514, version=1.0, statusCode=415, errorMessage=Request content-type should be set to 'application/json', not 'text/plain'.}

Status: 422 - Unprocessable Entity

{timeStamp=20170120152253514, version=1.0, statusCode=422, errorMessage=There is an error in the 'recipients' array.}

Status: 500 - Internal Server Error

{timeStamp=20170120152253514, version=1.0, statusCode=500, errorMessage=An unknown error has occurred - authorising API Key}

Shortcode

getShortCodeMessages

Get a list of incoming short/long code messages

Get a list of all incoming short/long code messages received by the account.<br>


/shortcode/incoming

Usage and SDK Samples

curl -X GET -H "AUTHORIZATION: [[apiKey]]" "https://www.winsms.co.za/api/rest/v1/shortcode/incoming?offset=&limit="
import d.*;
import d.auth.*;
import d.model.*;
import d.api.ShortcodeApi;

import java.io.File;
import java.util.*;

public class ShortcodeApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        ShortcodeApi apiInstance = new ShortcodeApi();
        Integer offset = 56; // Integer | Optional - The number of items to skip before starting to return results. Default 0. Minimum 0.
        Integer limit = 56; // Integer | Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000.
        try {
            apiInstance.getShortCodeMessages(offset, limit);
        } catch (ApiException e) {
            System.err.println("Exception when calling ShortcodeApi#getShortCodeMessages");
            e.printStackTrace();
        }
    }
}
import d.api.ShortcodeApi;

public class ShortcodeApiExample {

    public static void main(String[] args) {
        ShortcodeApi apiInstance = new ShortcodeApi();
        Integer offset = 56; // Integer | Optional - The number of items to skip before starting to return results. Default 0. Minimum 0.
        Integer limit = 56; // Integer | Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000.
        try {
            apiInstance.getShortCodeMessages(offset, limit);
        } catch (ApiException e) {
            System.err.println("Exception when calling ShortcodeApi#getShortCodeMessages");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"AUTHORIZATION"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"AUTHORIZATION"];

Integer *offset = 56; // Optional - The number of items to skip before starting to return results. Default 0. Minimum 0. (optional) (default to 0)
Integer *limit = 56; // Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000. (optional) (default to 100)

ShortcodeApi *apiInstance = [[ShortcodeApi alloc] init];

// Get a list of incoming short/long code messages
[apiInstance getShortCodeMessagesWith:offset
    limit:limit
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WinSms = require('win_sms');
var defaultClient = WinSms.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['AUTHORIZATION'] = "Token"

var api = new WinSms.ShortcodeApi()

var opts = { 
  'offset': 56, // {Integer} Optional - The number of items to skip before starting to return results. Default 0. Minimum 0.
  'limit': 56 // {Integer} Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getShortCodeMessages(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getShortCodeMessagesExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("AUTHORIZATION", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("AUTHORIZATION", "Bearer");

            var apiInstance = new ShortcodeApi();
            var offset = 56;  // Integer | Optional - The number of items to skip before starting to return results. Default 0. Minimum 0. (optional)  (default to 0)
            var limit = 56;  // Integer | Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000. (optional)  (default to 100)

            try
            {
                // Get a list of incoming short/long code messages
                apiInstance.getShortCodeMessages(offset, limit);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ShortcodeApi.getShortCodeMessages: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('AUTHORIZATION', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('AUTHORIZATION', 'Bearer');

$api_instance = new Swagger\Client\Api\ShortcodeApi();
$offset = 56; // Integer | Optional - The number of items to skip before starting to return results. Default 0. Minimum 0.
$limit = 56; // Integer | Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000.

try {
    $api_instance->getShortCodeMessages($offset, $limit);
} catch (Exception $e) {
    echo 'Exception when calling ShortcodeApi->getShortCodeMessages: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ShortcodeApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'AUTHORIZATION'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'AUTHORIZATION'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ShortcodeApi->new();
my $offset = 56; # Integer | Optional - The number of items to skip before starting to return results. Default 0. Minimum 0.
my $limit = 56; # Integer | Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000.

eval { 
    $api_instance->getShortCodeMessages(offset => $offset, limit => $limit);
};
if ($@) {
    warn "Exception when calling ShortcodeApi->getShortCodeMessages: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['AUTHORIZATION'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['AUTHORIZATION'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ShortcodeApi()
offset = 56 # Integer | Optional - The number of items to skip before starting to return results. Default 0. Minimum 0. (optional) (default to 0)
limit = 56 # Integer | Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000. (optional) (default to 100)

try: 
    # Get a list of incoming short/long code messages
    api_instance.get_short_code_messages(offset=offset, limit=limit)
except ApiException as e:
    print("Exception when calling ShortcodeApi->getShortCodeMessages: %s\n" % e)

Parameters

Query parameters
Name Description
offset
Integer
Optional - The number of items to skip before starting to return results. Default 0. Minimum 0.
limit
Integer
Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

{timeStamp=20170120152253514, version=1.0, statusCode=401, errorMessage=The 'AUTHORIZATION' header was not found. Set the 'AUTHORIZATION' request header to your WinSMS API Key}

Status: 404 - Not found

{timeStamp=20170120152253514, version=1.0, statusCode=404, errorMessage=The resource requested does not exist. Please verify the path, spelling, and capitalisation}

Status: 405 - Method Not Allowed

{timeStamp=20170120152253514, version=1.0, statusCode=405, errorMessage=Request method should be set to 'GET', not 'PUT'.}

Status: 422 - Unprocessable Entity

{timeStamp=20170120152253514, version=1.0, statusCode=422, errorMessage=The offset parameter must be a number greater than or equal to 0.}

Status: 500 - Internal Server Error

{timeStamp=20170120152253514, version=1.0, statusCode=500, errorMessage=An unknown error has occurred - authorising API Key}

Sms

deleteScheduledMessages

Delete scheduled SMS messages and refund credits

Delete a list of previously scheduled SMS messages that have not yet been sent.<br> Credits originally deducted for each SMS message will be refunded to your account upon successful deletion.


/sms/scheduled/delete

Usage and SDK Samples

curl -X POST -H "AUTHORIZATION: [[apiKey]]" "https://www.winsms.co.za/api/rest/v1/sms/scheduled/delete"
import d.*;
import d.auth.*;
import d.model.*;
import d.api.SmsApi;

import java.io.File;
import java.util.*;

public class SmsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        SmsApi apiInstance = new SmsApi();
        array[Integer] apiIds = ; // array[Integer] | An array of WinSMS API Ids received after submitting scheduled messages to the `/sms/outgoing/send` endpoint.
A maximum of 1000 API Ids can be supplied. try { deleteScheduledResponse result = apiInstance.deleteScheduledMessages(apiIds); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling SmsApi#deleteScheduledMessages"); e.printStackTrace(); } } }
import d.api.SmsApi;

public class SmsApiExample {

    public static void main(String[] args) {
        SmsApi apiInstance = new SmsApi();
        array[Integer] apiIds = ; // array[Integer] | An array of WinSMS API Ids received after submitting scheduled messages to the `/sms/outgoing/send` endpoint.
A maximum of 1000 API Ids can be supplied. try { deleteScheduledResponse result = apiInstance.deleteScheduledMessages(apiIds); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling SmsApi#deleteScheduledMessages"); e.printStackTrace(); } } }
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"AUTHORIZATION"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"AUTHORIZATION"];

array[Integer] *apiIds = ; // An array of WinSMS API Ids received after submitting scheduled messages to the `/sms/outgoing/send` endpoint.
A maximum of 1000 API Ids can be supplied. SmsApi *apiInstance = [[SmsApi alloc] init]; // Delete scheduled SMS messages and refund credits [apiInstance deleteScheduledMessagesWith:apiIds completionHandler: ^(deleteScheduledResponse output, NSError* error) { if (output) { NSLog(@"%@", output); } if (error) { NSLog(@"Error: %@", error); } }];
var WinSms = require('win_sms');
var defaultClient = WinSms.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['AUTHORIZATION'] = "Token"

var api = new WinSms.SmsApi()

var apiIds = ; // {array[Integer]} An array of WinSMS API Ids received after submitting scheduled messages to the `/sms/outgoing/send` endpoint.
A maximum of 1000 API Ids can be supplied. var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; api.deleteScheduledMessages(apiIds, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteScheduledMessagesExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("AUTHORIZATION", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("AUTHORIZATION", "Bearer");

            var apiInstance = new SmsApi();
            var apiIds = new array[Integer](); // array[Integer] | An array of WinSMS API Ids received after submitting scheduled messages to the `/sms/outgoing/send` endpoint.
A maximum of 1000 API Ids can be supplied. try { // Delete scheduled SMS messages and refund credits deleteScheduledResponse result = apiInstance.deleteScheduledMessages(apiIds); Debug.WriteLine(result); } catch (Exception e) { Debug.Print("Exception when calling SmsApi.deleteScheduledMessages: " + e.Message ); } } } }
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('AUTHORIZATION', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('AUTHORIZATION', 'Bearer');

$api_instance = new Swagger\Client\Api\SmsApi();
$apiIds = ; // array[Integer] | An array of WinSMS API Ids received after submitting scheduled messages to the `/sms/outgoing/send` endpoint.
A maximum of 1000 API Ids can be supplied. try { $result = $api_instance->deleteScheduledMessages($apiIds); print_r($result); } catch (Exception $e) { echo 'Exception when calling SmsApi->deleteScheduledMessages: ', $e->getMessage(), PHP_EOL; } ?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SmsApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'AUTHORIZATION'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'AUTHORIZATION'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SmsApi->new();
my $apiIds = [WWW::SwaggerClient::Object::array[Integer]->new()]; # array[Integer] | An array of WinSMS API Ids received after submitting scheduled messages to the `/sms/outgoing/send` endpoint.
A maximum of 1000 API Ids can be supplied. eval { my $result = $api_instance->deleteScheduledMessages(apiIds => $apiIds); print Dumper($result); }; if ($@) { warn "Exception when calling SmsApi->deleteScheduledMessages: $@\n"; }
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['AUTHORIZATION'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['AUTHORIZATION'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SmsApi()
apiIds =  # array[Integer] | An array of WinSMS API Ids received after submitting scheduled messages to the `/sms/outgoing/send` endpoint.
A maximum of 1000 API Ids can be supplied. try: # Delete scheduled SMS messages and refund credits api_response = api_instance.delete_scheduled_messages(apiIds) pprint(api_response) except ApiException as e: print("Exception when calling SmsApi->deleteScheduledMessages: %s\n" % e)

Parameters

Body parameters
Name Description
apiIds *

Responses

Status: 200 - OK

Status: 400 - Bad Request

{timeStamp=20170120152253514, version=1.0, statusCode=400, errorMessage=Invalid JSON payload received}

Status: 401 - Unauthorized

{timeStamp=20170120152253514, version=1.0, statusCode=401, errorMessage=The 'AUTHORIZATION' header was not found. Set the 'AUTHORIZATION' request header to your WinSMS API Key}

Status: 404 - Not found

{timeStamp=20170120152253514, version=1.0, statusCode=404, errorMessage=The resource requested does not exist. Please verify the path, spelling, and capitalisation}

Status: 405 - Method Not Allowed

{timeStamp=20170120152253514, version=1.0, statusCode=405, errorMessage=Request method should be set to 'POST', not 'GET'.}

Status: 413 - Payload Too Large

{timeStamp=20170120152253514, version=1.0, statusCode=413, errorMessage=Request POST data is: 205kb. The maximum POST size allowed is 200kb.}

Status: 415 - Unsupported Media Type

{timeStamp=20170120152253514, version=1.0, statusCode=415, errorMessage=Request content-type should be set to 'application/json', not 'text/plain'.}

Status: 422 - Unprocessable Entity

{timeStamp=20170120152253514, version=1.0, statusCode=422, errorMessage=At least one non-numeric api Id was supplied in the apiIds array.}

Status: 500 - Internal Server Error

{timeStamp=20170120152253514, version=1.0, statusCode=500, errorMessage=An unknown error has occurred - authorising API Key}

getIncomingMessages

Get a list of incoming SMS messages

Get a list of all incoming SMS messages received by the account.<br>


/sms/incoming

Usage and SDK Samples

curl -X GET -H "AUTHORIZATION: [[apiKey]]" "https://www.winsms.co.za/api/rest/v1/sms/incoming?offset=&limit="
import d.*;
import d.auth.*;
import d.model.*;
import d.api.SmsApi;

import java.io.File;
import java.util.*;

public class SmsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        SmsApi apiInstance = new SmsApi();
        Integer offset = 56; // Integer | Optional - The number of items to skip before starting to return results. Default 0. Minimum 0.
        Integer limit = 56; // Integer | Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000.
        try {
            apiInstance.getIncomingMessages(offset, limit);
        } catch (ApiException e) {
            System.err.println("Exception when calling SmsApi#getIncomingMessages");
            e.printStackTrace();
        }
    }
}
import d.api.SmsApi;

public class SmsApiExample {

    public static void main(String[] args) {
        SmsApi apiInstance = new SmsApi();
        Integer offset = 56; // Integer | Optional - The number of items to skip before starting to return results. Default 0. Minimum 0.
        Integer limit = 56; // Integer | Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000.
        try {
            apiInstance.getIncomingMessages(offset, limit);
        } catch (ApiException e) {
            System.err.println("Exception when calling SmsApi#getIncomingMessages");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"AUTHORIZATION"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"AUTHORIZATION"];

Integer *offset = 56; // Optional - The number of items to skip before starting to return results. Default 0. Minimum 0. (optional) (default to 0)
Integer *limit = 56; // Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000. (optional) (default to 100)

SmsApi *apiInstance = [[SmsApi alloc] init];

// Get a list of incoming SMS messages
[apiInstance getIncomingMessagesWith:offset
    limit:limit
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WinSms = require('win_sms');
var defaultClient = WinSms.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['AUTHORIZATION'] = "Token"

var api = new WinSms.SmsApi()

var opts = { 
  'offset': 56, // {Integer} Optional - The number of items to skip before starting to return results. Default 0. Minimum 0.
  'limit': 56 // {Integer} Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getIncomingMessages(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getIncomingMessagesExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("AUTHORIZATION", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("AUTHORIZATION", "Bearer");

            var apiInstance = new SmsApi();
            var offset = 56;  // Integer | Optional - The number of items to skip before starting to return results. Default 0. Minimum 0. (optional)  (default to 0)
            var limit = 56;  // Integer | Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000. (optional)  (default to 100)

            try
            {
                // Get a list of incoming SMS messages
                apiInstance.getIncomingMessages(offset, limit);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SmsApi.getIncomingMessages: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('AUTHORIZATION', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('AUTHORIZATION', 'Bearer');

$api_instance = new Swagger\Client\Api\SmsApi();
$offset = 56; // Integer | Optional - The number of items to skip before starting to return results. Default 0. Minimum 0.
$limit = 56; // Integer | Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000.

try {
    $api_instance->getIncomingMessages($offset, $limit);
} catch (Exception $e) {
    echo 'Exception when calling SmsApi->getIncomingMessages: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SmsApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'AUTHORIZATION'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'AUTHORIZATION'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SmsApi->new();
my $offset = 56; # Integer | Optional - The number of items to skip before starting to return results. Default 0. Minimum 0.
my $limit = 56; # Integer | Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000.

eval { 
    $api_instance->getIncomingMessages(offset => $offset, limit => $limit);
};
if ($@) {
    warn "Exception when calling SmsApi->getIncomingMessages: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['AUTHORIZATION'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['AUTHORIZATION'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SmsApi()
offset = 56 # Integer | Optional - The number of items to skip before starting to return results. Default 0. Minimum 0. (optional) (default to 0)
limit = 56 # Integer | Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000. (optional) (default to 100)

try: 
    # Get a list of incoming SMS messages
    api_instance.get_incoming_messages(offset=offset, limit=limit)
except ApiException as e:
    print("Exception when calling SmsApi->getIncomingMessages: %s\n" % e)

Parameters

Query parameters
Name Description
offset
Integer
Optional - The number of items to skip before starting to return results. Default 0. Minimum 0.
limit
Integer
Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

{timeStamp=20170120152253514, version=1.0, statusCode=401, errorMessage=The 'AUTHORIZATION' header was not found. Set the 'AUTHORIZATION' request header to your WinSMS API Key}

Status: 404 - Not found

{timeStamp=20170120152253514, version=1.0, statusCode=404, errorMessage=The resource requested does not exist. Please verify the path, spelling, and capitalisation}

Status: 405 - Method Not Allowed

{timeStamp=20170120152253514, version=1.0, statusCode=405, errorMessage=Request method should be set to 'GET', not 'PUT'.}

Status: 422 - Unprocessable Entity

{timeStamp=20170120152253514, version=1.0, statusCode=422, errorMessage=The offset parameter must be a number greater than or equal to 0.}

Status: 500 - Internal Server Error

{timeStamp=20170120152253514, version=1.0, statusCode=500, errorMessage=An unknown error has occurred - authorising API Key}

getIncomingOptoutMessages

Get a list of incoming opt-out SMS messages

Get a list of all opt-out SMS messages received by the account, as well as all manually added opt-out numbers.<br>


/sms/incoming/optout

Usage and SDK Samples

curl -X GET -H "AUTHORIZATION: [[apiKey]]" "https://www.winsms.co.za/api/rest/v1/sms/incoming/optout"
import d.*;
import d.auth.*;
import d.model.*;
import d.api.SmsApi;

import java.io.File;
import java.util.*;

public class SmsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        SmsApi apiInstance = new SmsApi();
        try {
            apiInstance.getIncomingOptoutMessages();
        } catch (ApiException e) {
            System.err.println("Exception when calling SmsApi#getIncomingOptoutMessages");
            e.printStackTrace();
        }
    }
}
import d.api.SmsApi;

public class SmsApiExample {

    public static void main(String[] args) {
        SmsApi apiInstance = new SmsApi();
        try {
            apiInstance.getIncomingOptoutMessages();
        } catch (ApiException e) {
            System.err.println("Exception when calling SmsApi#getIncomingOptoutMessages");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"AUTHORIZATION"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"AUTHORIZATION"];


SmsApi *apiInstance = [[SmsApi alloc] init];

// Get a list of incoming opt-out SMS messages
[apiInstance getIncomingOptoutMessagesWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WinSms = require('win_sms');
var defaultClient = WinSms.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['AUTHORIZATION'] = "Token"

var api = new WinSms.SmsApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getIncomingOptoutMessages(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getIncomingOptoutMessagesExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("AUTHORIZATION", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("AUTHORIZATION", "Bearer");

            var apiInstance = new SmsApi();

            try
            {
                // Get a list of incoming opt-out SMS messages
                apiInstance.getIncomingOptoutMessages();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SmsApi.getIncomingOptoutMessages: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('AUTHORIZATION', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('AUTHORIZATION', 'Bearer');

$api_instance = new Swagger\Client\Api\SmsApi();

try {
    $api_instance->getIncomingOptoutMessages();
} catch (Exception $e) {
    echo 'Exception when calling SmsApi->getIncomingOptoutMessages: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SmsApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'AUTHORIZATION'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'AUTHORIZATION'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SmsApi->new();

eval { 
    $api_instance->getIncomingOptoutMessages();
};
if ($@) {
    warn "Exception when calling SmsApi->getIncomingOptoutMessages: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['AUTHORIZATION'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['AUTHORIZATION'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SmsApi()

try: 
    # Get a list of incoming opt-out SMS messages
    api_instance.get_incoming_optout_messages()
except ApiException as e:
    print("Exception when calling SmsApi->getIncomingOptoutMessages: %s\n" % e)

Parameters

Responses

Status: 200 - OK

Status: 401 - Unauthorized

{timeStamp=20170120152253514, version=1.0, statusCode=401, errorMessage=The 'AUTHORIZATION' header was not found. Set the 'AUTHORIZATION' request header to your WinSMS API Key}

Status: 404 - Not found

{timeStamp=20170120152253514, version=1.0, statusCode=404, errorMessage=The resource requested does not exist. Please verify the path, spelling, and capitalisation}

Status: 405 - Method Not Allowed

{timeStamp=20170120152253514, version=1.0, statusCode=405, errorMessage=Request method should be set to 'GET', not 'PUT'.}

Status: 500 - Internal Server Error

{timeStamp=20170120152253514, version=1.0, statusCode=500, errorMessage=An unknown error has occurred - authorising API Key}

getScheduledMessages

Get a list of scheduled SMS messages

Get a list of all scheduled SMS messages that have not yet been sent.


/sms/scheduled

Usage and SDK Samples

curl -X GET -H "AUTHORIZATION: [[apiKey]]" "https://www.winsms.co.za/api/rest/v1/sms/scheduled?offset=&limit="
import d.*;
import d.auth.*;
import d.model.*;
import d.api.SmsApi;

import java.io.File;
import java.util.*;

public class SmsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        SmsApi apiInstance = new SmsApi();
        Integer offset = 56; // Integer | Optional - The number of items to skip before starting to return results. Default 0. Minimum 0.
        Integer limit = 56; // Integer | Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000.
        try {
            apiInstance.getScheduledMessages(offset, limit);
        } catch (ApiException e) {
            System.err.println("Exception when calling SmsApi#getScheduledMessages");
            e.printStackTrace();
        }
    }
}
import d.api.SmsApi;

public class SmsApiExample {

    public static void main(String[] args) {
        SmsApi apiInstance = new SmsApi();
        Integer offset = 56; // Integer | Optional - The number of items to skip before starting to return results. Default 0. Minimum 0.
        Integer limit = 56; // Integer | Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000.
        try {
            apiInstance.getScheduledMessages(offset, limit);
        } catch (ApiException e) {
            System.err.println("Exception when calling SmsApi#getScheduledMessages");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"AUTHORIZATION"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"AUTHORIZATION"];

Integer *offset = 56; // Optional - The number of items to skip before starting to return results. Default 0. Minimum 0. (optional) (default to 0)
Integer *limit = 56; // Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000. (optional) (default to 100)

SmsApi *apiInstance = [[SmsApi alloc] init];

// Get a list of scheduled SMS messages
[apiInstance getScheduledMessagesWith:offset
    limit:limit
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WinSms = require('win_sms');
var defaultClient = WinSms.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['AUTHORIZATION'] = "Token"

var api = new WinSms.SmsApi()

var opts = { 
  'offset': 56, // {Integer} Optional - The number of items to skip before starting to return results. Default 0. Minimum 0.
  'limit': 56 // {Integer} Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getScheduledMessages(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getScheduledMessagesExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("AUTHORIZATION", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("AUTHORIZATION", "Bearer");

            var apiInstance = new SmsApi();
            var offset = 56;  // Integer | Optional - The number of items to skip before starting to return results. Default 0. Minimum 0. (optional)  (default to 0)
            var limit = 56;  // Integer | Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000. (optional)  (default to 100)

            try
            {
                // Get a list of scheduled SMS messages
                apiInstance.getScheduledMessages(offset, limit);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SmsApi.getScheduledMessages: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('AUTHORIZATION', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('AUTHORIZATION', 'Bearer');

$api_instance = new Swagger\Client\Api\SmsApi();
$offset = 56; // Integer | Optional - The number of items to skip before starting to return results. Default 0. Minimum 0.
$limit = 56; // Integer | Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000.

try {
    $api_instance->getScheduledMessages($offset, $limit);
} catch (Exception $e) {
    echo 'Exception when calling SmsApi->getScheduledMessages: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SmsApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'AUTHORIZATION'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'AUTHORIZATION'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SmsApi->new();
my $offset = 56; # Integer | Optional - The number of items to skip before starting to return results. Default 0. Minimum 0.
my $limit = 56; # Integer | Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000.

eval { 
    $api_instance->getScheduledMessages(offset => $offset, limit => $limit);
};
if ($@) {
    warn "Exception when calling SmsApi->getScheduledMessages: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['AUTHORIZATION'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['AUTHORIZATION'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SmsApi()
offset = 56 # Integer | Optional - The number of items to skip before starting to return results. Default 0. Minimum 0. (optional) (default to 0)
limit = 56 # Integer | Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000. (optional) (default to 100)

try: 
    # Get a list of scheduled SMS messages
    api_instance.get_scheduled_messages(offset=offset, limit=limit)
except ApiException as e:
    print("Exception when calling SmsApi->getScheduledMessages: %s\n" % e)

Parameters

Query parameters
Name Description
offset
Integer
Optional - The number of items to skip before starting to return results. Default 0. Minimum 0.
limit
Integer
Optional - The number of items to return. Default 100. Minimum 1. Maximum 1000.

Responses

Status: 200 - OK

Status: 401 - Unauthorized

{timeStamp=20170120152253514, version=1.0, statusCode=401, errorMessage=The 'AUTHORIZATION' header was not found. Set the 'AUTHORIZATION' request header to your WinSMS API Key}

Status: 404 - Not found

{timeStamp=20170120152253514, version=1.0, statusCode=404, errorMessage=The resource requested does not exist. Please verify the path, spelling, and capitalisation}

Status: 405 - Method Not Allowed

{timeStamp=20170120152253514, version=1.0, statusCode=405, errorMessage=Request method should be set to 'GET', not 'PUT'.}

Status: 422 - Unprocessable Entity

{timeStamp=20170120152253514, version=1.0, statusCode=422, errorMessage=The offset parameter must be a number greater than or equal to 0.}

Status: 500 - Internal Server Error

{timeStamp=20170120152253514, version=1.0, statusCode=500, errorMessage=An unknown error has occurred - authorising API Key}

smsOutgoingSend

Send SMS messages

Submit 1 or more SMS messages to be sent by WinSMS. Maximum 1000 recipients per call.


/sms/outgoing/send

Usage and SDK Samples

curl -X POST -H "AUTHORIZATION: [[apiKey]]" "https://www.winsms.co.za/api/rest/v1/sms/outgoing/send"
import d.*;
import d.auth.*;
import d.model.*;
import d.api.SmsApi;

import java.io.File;
import java.util.*;

public class SmsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        SmsApi apiInstance = new SmsApi();
        SendMessageRequest newMessageDetails = ; // SendMessageRequest | The message, recipients and delivery options of an SMS message to be sent.
        try {
            apiInstance.smsOutgoingSend(newMessageDetails);
        } catch (ApiException e) {
            System.err.println("Exception when calling SmsApi#smsOutgoingSend");
            e.printStackTrace();
        }
    }
}
import d.api.SmsApi;

public class SmsApiExample {

    public static void main(String[] args) {
        SmsApi apiInstance = new SmsApi();
        SendMessageRequest newMessageDetails = ; // SendMessageRequest | The message, recipients and delivery options of an SMS message to be sent.
        try {
            apiInstance.smsOutgoingSend(newMessageDetails);
        } catch (ApiException e) {
            System.err.println("Exception when calling SmsApi#smsOutgoingSend");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"AUTHORIZATION"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"AUTHORIZATION"];

SendMessageRequest *newMessageDetails = ; // The message, recipients and delivery options of an SMS message to be sent.

SmsApi *apiInstance = [[SmsApi alloc] init];

// Send SMS messages
[apiInstance smsOutgoingSendWith:newMessageDetails
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WinSms = require('win_sms');
var defaultClient = WinSms.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['AUTHORIZATION'] = "Token"

var api = new WinSms.SmsApi()

var newMessageDetails = ; // {SendMessageRequest} The message, recipients and delivery options of an SMS message to be sent.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.smsOutgoingSend(newMessageDetails, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class smsOutgoingSendExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("AUTHORIZATION", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("AUTHORIZATION", "Bearer");

            var apiInstance = new SmsApi();
            var newMessageDetails = new SendMessageRequest(); // SendMessageRequest | The message, recipients and delivery options of an SMS message to be sent.

            try
            {
                // Send SMS messages
                apiInstance.smsOutgoingSend(newMessageDetails);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SmsApi.smsOutgoingSend: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('AUTHORIZATION', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('AUTHORIZATION', 'Bearer');

$api_instance = new Swagger\Client\Api\SmsApi();
$newMessageDetails = ; // SendMessageRequest | The message, recipients and delivery options of an SMS message to be sent.

try {
    $api_instance->smsOutgoingSend($newMessageDetails);
} catch (Exception $e) {
    echo 'Exception when calling SmsApi->smsOutgoingSend: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SmsApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'AUTHORIZATION'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'AUTHORIZATION'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SmsApi->new();
my $newMessageDetails = WWW::SwaggerClient::Object::SendMessageRequest->new(); # SendMessageRequest | The message, recipients and delivery options of an SMS message to be sent.

eval { 
    $api_instance->smsOutgoingSend(newMessageDetails => $newMessageDetails);
};
if ($@) {
    warn "Exception when calling SmsApi->smsOutgoingSend: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['AUTHORIZATION'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['AUTHORIZATION'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SmsApi()
newMessageDetails =  # SendMessageRequest | The message, recipients and delivery options of an SMS message to be sent.

try: 
    # Send SMS messages
    api_instance.sms_outgoing_send(newMessageDetails)
except ApiException as e:
    print("Exception when calling SmsApi->smsOutgoingSend: %s\n" % e)

Parameters

Body parameters
Name Description
newMessageDetails *

Responses

Status: 200 - OK

Status: 400 - Bad Request

{timeStamp=20170120152253514, version=1.0, statusCode=400, errorMessage=Invalid JSON payload received}

Status: 401 - Unauthorized

{timeStamp=20170120152253514, version=1.0, statusCode=401, errorMessage=The 'AUTHORIZATION' header was not found. Set the 'AUTHORIZATION' request header to your WinSMS API Key}

Status: 404 - Not found

{timeStamp=20170120152253514, version=1.0, statusCode=404, errorMessage=The resource requested does not exist. Please verify the path, spelling, and capitalisation}

Status: 405 - Method Not Allowed

{timeStamp=20170120152253514, version=1.0, statusCode=405, errorMessage=Request method should be set to 'POST', not 'GET'.}

Status: 413 - Payload Too Large

{timeStamp=20170120152253514, version=1.0, statusCode=413, errorMessage=Request POST data is: 205kb. The maximum POST size allowed is 200kb.}

Status: 415 - Unsupported Media Type

{timeStamp=20170120152253514, version=1.0, statusCode=415, errorMessage=Request content-type should be set to 'application/json', not 'text/plain'.}

Status: 422 - Unprocessable Entity

{timeStamp=20170120152253514, version=1.0, statusCode=422, errorMessage=There is an error in the 'recipients' array.}

Status: 500 - Internal Server Error

{timeStamp=20170120152253514, version=1.0, statusCode=500, errorMessage=An unknown error has occurred - authorising API Key}

smsOutgoingStatus

Get SMS delivery statuses

Get a list of previously submitted SMS message delivery statuses.<br> Post an array of API Message Ids received from the `/sms/outgoing/send` endpoint.


/sms/outgoing/status

Usage and SDK Samples

curl -X POST -H "AUTHORIZATION: [[apiKey]]" "https://www.winsms.co.za/api/rest/v1/sms/outgoing/status"
import d.*;
import d.auth.*;
import d.model.*;
import d.api.SmsApi;

import java.io.File;
import java.util.*;

public class SmsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        SmsApi apiInstance = new SmsApi();
        array[Integer] apiIds = ; // array[Integer] | An array of WinSMS API Ids received after submitting messages to the `/sms/outgoing/send` endpoint.
A maximum of 1000 API Ids can be supplied. try { messageStatusResponse result = apiInstance.smsOutgoingStatus(apiIds); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling SmsApi#smsOutgoingStatus"); e.printStackTrace(); } } }
import d.api.SmsApi;

public class SmsApiExample {

    public static void main(String[] args) {
        SmsApi apiInstance = new SmsApi();
        array[Integer] apiIds = ; // array[Integer] | An array of WinSMS API Ids received after submitting messages to the `/sms/outgoing/send` endpoint.
A maximum of 1000 API Ids can be supplied. try { messageStatusResponse result = apiInstance.smsOutgoingStatus(apiIds); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling SmsApi#smsOutgoingStatus"); e.printStackTrace(); } } }
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"AUTHORIZATION"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"AUTHORIZATION"];

array[Integer] *apiIds = ; // An array of WinSMS API Ids received after submitting messages to the `/sms/outgoing/send` endpoint.
A maximum of 1000 API Ids can be supplied. SmsApi *apiInstance = [[SmsApi alloc] init]; // Get SMS delivery statuses [apiInstance smsOutgoingStatusWith:apiIds completionHandler: ^(messageStatusResponse output, NSError* error) { if (output) { NSLog(@"%@", output); } if (error) { NSLog(@"Error: %@", error); } }];
var WinSms = require('win_sms');
var defaultClient = WinSms.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['AUTHORIZATION'] = "Token"

var api = new WinSms.SmsApi()

var apiIds = ; // {array[Integer]} An array of WinSMS API Ids received after submitting messages to the `/sms/outgoing/send` endpoint.
A maximum of 1000 API Ids can be supplied. var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; api.smsOutgoingStatus(apiIds, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class smsOutgoingStatusExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("AUTHORIZATION", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("AUTHORIZATION", "Bearer");

            var apiInstance = new SmsApi();
            var apiIds = new array[Integer](); // array[Integer] | An array of WinSMS API Ids received after submitting messages to the `/sms/outgoing/send` endpoint.
A maximum of 1000 API Ids can be supplied. try { // Get SMS delivery statuses messageStatusResponse result = apiInstance.smsOutgoingStatus(apiIds); Debug.WriteLine(result); } catch (Exception e) { Debug.Print("Exception when calling SmsApi.smsOutgoingStatus: " + e.Message ); } } } }
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('AUTHORIZATION', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('AUTHORIZATION', 'Bearer');

$api_instance = new Swagger\Client\Api\SmsApi();
$apiIds = ; // array[Integer] | An array of WinSMS API Ids received after submitting messages to the `/sms/outgoing/send` endpoint.
A maximum of 1000 API Ids can be supplied. try { $result = $api_instance->smsOutgoingStatus($apiIds); print_r($result); } catch (Exception $e) { echo 'Exception when calling SmsApi->smsOutgoingStatus: ', $e->getMessage(), PHP_EOL; } ?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SmsApi;

# Configure API key authorization: APIKeyHeader
$WWW::SwaggerClient::Configuration::api_key->{'AUTHORIZATION'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'AUTHORIZATION'} = "Bearer";

my $api_instance = WWW::SwaggerClient::SmsApi->new();
my $apiIds = [WWW::SwaggerClient::Object::array[Integer]->new()]; # array[Integer] | An array of WinSMS API Ids received after submitting messages to the `/sms/outgoing/send` endpoint.
A maximum of 1000 API Ids can be supplied. eval { my $result = $api_instance->smsOutgoingStatus(apiIds => $apiIds); print Dumper($result); }; if ($@) { warn "Exception when calling SmsApi->smsOutgoingStatus: $@\n"; }
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
swagger_client.configuration.api_key['AUTHORIZATION'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['AUTHORIZATION'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.SmsApi()
apiIds =  # array[Integer] | An array of WinSMS API Ids received after submitting messages to the `/sms/outgoing/send` endpoint.
A maximum of 1000 API Ids can be supplied. try: # Get SMS delivery statuses api_response = api_instance.sms_outgoing_status(apiIds) pprint(api_response) except ApiException as e: print("Exception when calling SmsApi->smsOutgoingStatus: %s\n" % e)

Parameters

Body parameters
Name Description
apiIds *

Responses

Status: 200 - OK

Status: 400 - Bad Request

{timeStamp=20170120152253514, version=1.0, statusCode=400, errorMessage=Invalid JSON payload received}

Status: 401 - Unauthorized

{timeStamp=20170120152253514, version=1.0, statusCode=401, errorMessage=The 'AUTHORIZATION' header was not found. Set the 'AUTHORIZATION' request header to your WinSMS API Key}

Status: 404 - Not found

{timeStamp=20170120152253514, version=1.0, statusCode=404, errorMessage=The resource requested does not exist. Please verify the path, spelling, and capitalisation}

Status: 405 - Method Not Allowed

{timeStamp=20170120152253514, version=1.0, statusCode=405, errorMessage=Request method should be set to 'POST', not 'GET'.}

Status: 413 - Payload Too Large

{timeStamp=20170120152253514, version=1.0, statusCode=413, errorMessage=Request POST data is: 205kb. The maximum POST size allowed is 200kb.}

Status: 415 - Unsupported Media Type

{timeStamp=20170120152253514, version=1.0, statusCode=415, errorMessage=Request content-type should be set to 'application/json', not 'text/plain'.}

Status: 422 - Unprocessable Entity

{timeStamp=20170120152253514, version=1.0, statusCode=422, errorMessage=At least one non-numeric api Id was supplied in the apiIds array.}

Status: 500 - Internal Server Error

{timeStamp=20170120152253514, version=1.0, statusCode=500, errorMessage=An unknown error has occurred - authorising API Key}