XML API

Send Batch

Description

Submits one or more messages for delivery to one or more recipient mobile numbers

Endpoint

POST https://www.winsms.co.za/api/xmlsendsmsmulti.asp HTTP/1.1

Request

Schema

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:elementname="WinSMS_Multi_Message" type="WinSMS_Multi_MessageType" />
	<xs:complexType name="WinSMS_Multi_MessageType">
		<xs:annotation>
			<xs:appinfoxdb:docElement="WinSMS_Multi_Message" />
		</xs:annotation>
		<xs:sequence>
			<xs:elementname="User" type="xs:string" />
			<xs:elementname="Password" type="xs:string" /> 
			<xs:elementname="Scheduled" type="xs:integer" />
			<xs:elementname="Messages" type="MessagesType" />
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="MessagesType">
		<xs:sequence>
			<xs:elementname="Message" type="MessageType" maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="MessageType">
		<xs:sequence>
			<xs:elementname="MessageText" type="xs:string" />
			<xs:elementname="Numbers" type="NumbersType" />
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="NumbersType">
		<xs:sequence>
		<xs:elementname="Number" type="xs:integer" maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>
</xs:schema>

Example

<WinSMS_Multi_Message>
	<User>hpotter</User>
	<Password>w1Zard</Password>
	<Scheduled>201811141025</Scheduled>
	<Messages>
		<Message>
			<MessageText>What? My - my mom and dad weren't famous, were they?</MessageText>
			<Numbers>
				<Number>27825550101</Number>
				<Number>27835550505</Number>
				<Number>27845550909</Number>
			</Numbers>
		</Message>
		<Message>
			<MessageText>What does it mean, they await my owl?</MessageText>
			<Numbers>
				<Number>27825550101</Number>
				<Number>27835550505</Number>
				<Number>27845550909</Number>
			</Numbers>
		</Message>
	</Messages>
 </WinSMS_Multi_Message>

Notes

  • All MessageText nodes should be URL encoded, with a GSM 7-bit encoded length of no more than 918 characters.

  • To include a carriage return in the MessageText node use the URL encoded
    value for a line feed character: %0A

  • The Scheduled node is optional. If supplied, the date/time must be calculated as GMT+2 and formatted as ccyymmddhhmm.

  • Scheduling a message for delivery prior to the current date/time will result in the message being sent immediately.

  • All number nodes must be specified in international format – e164 format without the "+" sign

Response - Valid Request Submitted

Schema

<?xml version="1.0" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:elementname="XMLGateway_Response" type="XMLGateway_ResponseType" />
	<xs:complexType name="XMLGateway_ResponseType">
		<xs:annotation>
			<xs:appinfoxdb:docElement="XMLGateway_Response" />
		</xs:annotation>
		<xs:sequence>
			<xs:elementname="SendResult" type="SendResultType" maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="SendResultType">
		<xs:sequence>
			<xs:elementname="MessageNumber" type="xs:integer" />
			<xs:elementname="NumberID" type="NumberIDType" maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="NumberIDType">
		<xs:annotation>
			<xs:appinfoxdb:repeated="True" />
		</xs:annotation>
		<xs:sequence>
			<xs:elementname="Number" type="xs:integer" />
			<xs:elementname="ID" type="xs:integer" />
		</xs:sequence>
	</xs:complexType>
</xs:schema>

Example

<XMLGateway_Response>
   <SendResult>
   	<MessageNumber>1</MessageNumber>
   	<NumberID>
   		<Number>27825550101</Number>
   		<ID>374</ID>
   	</NumberID>
   	<NumberID>
   		<Number>27835550505</Number>
   		<ID>375</ID>
   	</NumberID>
   	<NumberID>
   		<Number>27845550909</Number>
   		<ID>376</ID>
   	</NumberID>
   </SendResult>
   <SendResult>
   	<MessageNumber>2</MessageNumber>
   	<NumberID>
   		<Number>27825550101</Number>
   		<ID>377</ID>
   	</NumberID>
   	<NumberID>
   		<Number>27835550505</Number>
   		<ID>378</ID>
   	</NumberID>
   	<NumberID>
   		<Number>27845550909</Number>
   		<ID>NOCREDITS</ID>
   	</NumberID>
   </SendResult>
</XMLGateway_Response>

Notes

  • The NumberID → ID node will contain the unique WinSMS API Message ID assigned to each particular message, or one of the Error Codes listed below

Error Codes

Code Description
FAIL:TRIALNOT2SELF Trial Account Restriction – Message not to own number. More Info
FAIL:TOOLONG The GSM 7-bit encoded message length exceeded 918 characters
FAIL:OPTEDOUT The recipient has opted out from receiving any further messages from the user
NOCREDITS The user has insufficient credits to send the message
ACCOUNTLOCKED The specified account is locked
FAIL:BADDEST An invalid mobile number was supplied, or the recipient has been blacklisted from receiving messages
FAIL:NO MESSAGE The MessageText node was not present or contained a blank string
FAIL:NO NUMBER The Numbers node was not present, or the Numbers node was present but no Number nodes were supplied, or the Number node contained a blank string

Response - Invalid Request Submitted

Schema

<?xml version="1.0" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:elementname="XMLGateway_Response" type="XMLGateway_ResponseType" />
	<xs:complexType name="XMLGateway_ResponseType">
		<xs:annotation>
			<xs:appinfoxdb:docElement="XMLGateway_Response" />
		</xs:annotation>
		<xs:sequence>
			<xs:elementname="Error" type="xs:string" maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>
</xs:schema>

Example

<XMLGateway_Response>
	<Error>Invalid Date</Error>
</XMLGateway_Response>

Possible Error Values

Value Description
Not Valid XML Document The posted document was not in a valid XML format
Invalid Username or Password The login credentials supplied were not valid
Invalid Date The Scheduled node was present and contained a non-blank value, but was not in the format ccyymmddhhmm

Batch Status

Description

Retrieves the delivery status of one or more messages submitted to WinSMS

Instead of polling for delivery statuses, try using WinSMS Event Webhooks for a more elegant approach.

Endpoint

POST https://www.winsms.co.za/api/xmlgetstatus.asp HTTP/1.1

Request

Schema

<?xml version="1.0" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:elementname="WinSMS_StatusRequest" type="WinSMS_StatusRequestType" />
	<xs:complexType name="WinSMS_StatusRequestType">
		<xs:annotation>
			<xs:appinfoxdb:docElement="WinSMS_StatusRequest" />
		</xs:annotation>
		<xs:sequence>
			<xs:elementname="User" type="xs:string" />
			<xs:elementname="Password" type="xs:string" />
			<xs:elementname="MessageIDs" type="MessageIDsType" />
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="MessageIDsType">
		<xs:sequence>
			<xs:elementname="MessageID" type="MessageIDType"  maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="MessageIDType">
		<xs:sequence>
			<xs:elementname="ID" type="xs:integer" />
			<xs:elementname="CLI" type="xs:string" />
		</xs:sequence>
	</xs:complexType>
</xs:schema>

Example

<WinSMS_StatusRequest>
	<User>hpotter</User>
	<Password>w1Zard</Password>
	<MessageIDs>
		<MessageID>
			<ID>375</ID>
			<CLI>27835550505</CLI>
		</MessageID>
		<MessageID>
			<ID>374</ID>
			<CLI>27825550101</CLI>
		</MessageID>
	</MessageIDs>
</WinSMS_StatusRequest>

Notes

  • Message statuses can be retrieved for messages sent up to 90 days previously

  • Batch Status requests must be limited to a maximum batch size of 1000 MessageID’s per call. Status requests for MessageID’s exceeding this limit will be returned with a status code of 108 (SKIPPED), and will need to be re-queried in subsequent calls.

  • The ID node must contain the unique WinSMS API Message ID that was returned by the Send Batch call

  • The CLI node is completely optional. It is for feedback purposes only. It can contain any value. If supplied, that value will be reflected in the response XML

Response - Valid Request Submitted

Schema

<?xml version="1.0" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:elementname="XMLGatewayStatus_Response" type="XMLGatewayStatus_ResponseType" />
	<xs:complexType name="XMLGatewayStatus_ResponseType">
		<xs:annotation>
			<xs:appinfoxdb:docElement="XMLGatewayStatus_Response" />					
		</xs:annotation>
		<xs:sequence>
			<xs:elementname="StatusID" type="StatusIDType" maxOccurs="unbounded" />						
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="StatusIDType">
		<xs:sequence>
			<xs:elementname="MessageID" type="xs:integer" />
			<xs:elementname="CLI" type="xs:string" />
			<xs:elementname="Status" type="xs:string" />
			<xs:elementname="StatusDateTime" type="xs:string" />
			<xs:elementname="StatusCode" type="xs:integer" />							
		</xs:sequence>
	</xs:complexType>
</xs:schema>

Example

<XMLGatewayStatus_Response>
	<StatusID>
		<MessageID>375</MessageID>
		<CLI>27835550505</CLI>
		<Status>NOTFOUND</Status>
		<StatusDateTime>2018/03/18 11:17:11</StatusDateTime>
		<StatusCode>-2</StatusCode>
	</StatusID>
	<StatusID>
		<MessageID>374</MessageID>
		<CLI>27825550101</CLI>
		<Status>DELIVERED</Status>
		<StatusDateTime>2018/03/18 11:15:49</StatusDateTime>
		<StatusCode>0</StatusCode>
	</StatusID>
</XMLGatewayStatus_Response>

Notes

  • The StatusID node will occur once for each MessageID status requested

  • The MessageID node contains the MessageID → ID sent in the request

  • The CLI node contains the value of the CLI node supplied in the request. This node is optional. If it is omitted from the request, it will be an empty node in the response.

  • The Status node contains a text description of the status of the message. See Appendix A for possible values

  • The StatusCode node is an integer value representing the send status. It is used predominantly to determine the SENDINGFAILED reason. See Appendix B for possible values

  • The StatusDateTime node contains the date and time of delivery to the handset using the format: ccyy/mm/dd HH:mm:ss. It calculated as GMT+2.
    For DELIVERED or SENDINGFAILED status, the date and time is when the message was delivered to the handset, or finally failed. For FAIL or NOTFOUND statuses, the current date and time is returned

Response - Invalid Request Submitted

Schema

<?xml version="1.0" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:elementname="XMLGatewayStatus_Response" type="XMLGatewayStatus_ResponseType" />
	<xs:complexType name="XMLGatewayStatus_ResponseType">
		<xs:annotation>
			<xs:appinfoxdb:docElement="XMLGatewayStatus_Response" />				
		</xs:annotation>
		<xs:sequence>
			<xs:elementname="Error" type="xs:string" maxOccurs="1" />
		</xs:sequence>
	</xs:complexType>
</xs:schema>

Example

<XMLGatewayStatus_Response>
	<Error>Not Valid XML Document</Error>
</XMLGatewayStatus_Response>

Possible Error Values

Value Description
Not Valid XML Document Possible causes:
- The posted document was not in a valid XML format
- One of the ID nodes contained a non-numeric character
- One of the ID nodes was blank
Invalid Username or Password The login credentials supplied were not valid

Delete Scheduled

Description

Deletes one or more previously submitted scheduled message/s from the WinSMS queue.
Associated credits are refunded to the user account

Endpoint

POST http://www.winsms.co.za/api/xmldeletescheduled.asp HTTP/1.1

Request

Schema

<?xml version="1.0" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:elementname="WinSMS_DeleteScheduled" type="WinSMS_DeleteScheduledType" />
	<xs:complexType name="WinSMS_DeleteScheduledType">
		<xs:annotation>
			<xs:appinfoxdb:docElement="WinSMS_DeleteScheduled" />				
		</xs:annotation>
		<xs:sequence>
			<xs:elementname="User" type="xs:string" />
			<xs:elementname="Password" type="xs:string" />
			<xs:elementname="MessageIDs" type="MessageIDsType" />				
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="MessageIDsType">
		<xs:sequence>
			<xs:elementname="MessageID" type="MessageIDType"  maxOccurs="unbounded" />				
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="MessageIDType">
		<xs:sequence>
			<xs:elementname="ID" type="xs:integer" />
			<xs:elementname="CLI" type="xs:string" />
		</xs:sequence>
	</xs:complexType>
</xs:schema>

Example

<WinSMS_DeleteScheduled>
	<User>hpotter</User>
	<Password>w1Zard</Password>
	<MessageIDs>
		<MessageID>
			<ID>375</ID>
			<CLI>27835550505</CLI>
		</MessageID>
		<MessageID>
			<ID>374</ID>
			<CLI>27825550101</CLI>
		</MessageID>
	</MessageIDs>
</WinSMS_DeleteScheduled>

Notes

  • The ID node must contain the unique WinSMS API Message ID that was returned by the Send Batch call

  • The CLI node is completely optional. It is for feedback purposes only. It can contain any value. If supplied, that value will be reflected in the response XML

Response - Valid Request Submitted

Schema

<?xml version="1.0" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:elementname="XMLGatewayDeleteScheduled_Response" type="XMLGatewayDeleteScheduled_ResponseType" />
	<xs:complexType name="XMLGatewayDeleteScheduled_ResponseType">
		<xs:annotation>
			<xs:appinfoxdb:docElement="XMLGatewayDeleteScheduled_Response" />
		</xs:annotation>
		<xs:sequence>
			<xs:elementname="DeleteStatus" type="DeleteStatusType" maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="DeleteStatusType">
		<xs:sequence>
			<xs:elementname="MessageID" type="xs:integer" />
			<xs:elementname="CLI" type="xs:string" />
			<xs:elementname="Status" type="xs:string" />				
		</xs:sequence>
	</xs:complexType>
</xs:schema>

Example

<XMLGatewayDeleteScheduled_Response>
	<DeleteStatus>
		<MessageID>375</MessageID>
		<CLI>27835550505</CLI>
		<Status>NOTFOUND</Status>
	</DeleteStatus>
	<DeleteStatus>
		<MessageID>374</MessageID>
		<CLI>27825550101</CLI>
		<Status>DELETED</Status>
	</DeleteStatus>
</XMLGatewayDeleteScheduled_Response>

Notes

  • The DeleteStatus node will occur once for each MessageID node sent in the request

  • The MessageID node contains the MessageID → ID sent in the request

  • The CLI node contains the value of the CLI node supplied in the request. This node is optional. If it is omitted from the request, it will be an empty node in the response.

  • The Status node contains a text description of the result of the delete operation for each message. See Appendix C for possible values

Response - Invalid Request Submitted

Schema

<?xml version="1.0" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:elementname="XMLGatewayDeleteScheduled_Response" type="XMLGatewayDeleteScheduled_ResponseType" />
	<xs:complexType name="XMLGatewayDeleteScheduled_ResponseType">
		<xs:annotation>
			<xs:appinfoxdb:docElement="XMLGatewayDeleteScheduled_Response" />
		</xs:annotation>
		<xs:sequence>
			<xs:elementname="Error" type="xs:string" maxOccurs="1" />				
		</xs:sequence>
	</xs:complexType>
</xs:schema>

Example

<XMLGatewayDeleteScheduled_Response>
	<Error>Not Valid XML Document</Error>
</XMLGatewayDeleteScheduled_Response>

Possible Error Values

Value Description
Not Valid XML Document Possible causes:
- The posted document was not in a valid XML format
- One of the ID nodes contained a non-numeric character
- One of the ID nodes was blank
Invalid Username or Password The login credentials supplied were not valid

Get Replies

Description

Retrieves all replies to SMS messages sent through WinSMS

Instead of polling for replies, try using WinSMS Event Webhooks for a more elegant approach.

Endpoint

POST http://www.winsms.co.za/api/xmlgetreplies.asp HTTP/1.1

Request

Schema

<?xml version="1.0" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:elementname="WinSMS_Replies" type="WinSMS_RepliesType" />
	<xs:complexType name="WinSMS_RepliesType">
		<xs:annotation>
			<xs:appinfoxdb:docElement="WinSMS_Replies" />				
		</xs:annotation>
		<xs:sequence>
			<xs:elementname="User" type="xs:string" MaxOccurs="1" />
			<xs:elementname="Password" type="xs:string" MaxOccurs="1" />				
		</xs:sequence>
	</xs:complexType>
</xs:schema>

Example

<WinSMS_Replies>
	<User>hpotter</User>
	<Password>w1Zard</Password>
</WinSMS_Replies>

Notes

  • No additional parameters are required. All previously unreturned reply messages received in the last 90 days will be returned in the response

Response - Valid Request Submitted

Schema

<?xml version="1.0" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:elementname="XMLGateway_Replies" type="XMLGateway_RepliesType" />
	<xs:complexType name="XMLGateway_RepliesType">
		<xs:annotation>
			<xs:appinfoxdb:docElement="XMLGateway_Replies" />
		</xs:annotation>
		<xs:sequence>
			<xs:elementname="Reply" type="ReplyType" maxOccurs="unbounded" />			
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="ReplyType">
		<xs:sequence>
			<xs:elementname="CLI" type="xs:string" />
			<xs:elementname="DateReceived" type="xs:string" />
			<xs:elementname="Message" type="xs:string" />
			<xs:elementname="SentMessageID" type="xs:integer" />
		</xs:sequence>
	</xs:complexType>
</xs:schema>

Example

<XMLGateway_Replies>
	<Reply>
		<CLI>27825550101</CLI>
		<DateReceived>201811141103</DateReceived>
		<Message>Send one from Diagon Alley</Message>
		<SentMessageID>377</SentMessageID>
	</Reply>
	<Reply>
		<CLI>27835550505</CLI>
		<DateReceived>201811141116</DateReceived>
		<Message>The post office, Harry! About two hundred owls, all sitting on shelves</Message>
		<SentMessageID>378</SentMessageID>
	</Reply>
</XMLGateway_Replies>

Notes

  • The Reply node will occur once for each previously unreturned reply SMS received by WinSMS in the past 90 days.

  • Once a reply has been returned in a response it will never be returned again in subsequent calls to the endpoint

  • The CLI node contains the mobile number of the respondent. It is returned in international format – e164 format without the "+" sign

  • The DateReceived node contains the date and time that the reply was received, calculated as GMT+2 and formatted as ccyymmddhhmm

  • The Message node contains the text of the reply message

  • The SentMessageId node contains the unique WinSMS API Message ID assigned to the most recent
    message sent to the mobile number that responded

Response - Invalid Request

Schema

<?xml version="1.0" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:elementname="XMLGateway_Replies" type="XMLGateway_RepliesType" />
	<xs:complexType name="XMLGateway_RepliesType">
		<xs:annotation>
			<xs:appinfoxdb:docElement="XMLGateway_Replies" />				
		</xs:annotation>
		<xs:sequence>
			<xs:elementname="Error" type="xs:string" maxOccurs="unbounded" />				
		</xs:sequence>
	</xs:complexType>
</xs:schema>

Example

<XMLGateway_Replies>
	<Error>Not Valid XML Document</Error>
</XMLGateway_Replies>

Possible Error Values

Value Description
Not Valid XML Document Possible causes:
- The posted document was not in a valid XML format
Invalid Username or Password The login credentials supplied were not valid

Get Long/Short Code Messages

Description

Only available to users with a WinSMS Short/Long Code.
Retrieves all SMS messages sent to the Short/Long Code (Short Code).

Endpoint

POST http://www.winsms.co.za/api/xmlgetscmessages.asp HTTP/1.1

Request

Schema

<?xml version="1.0" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:elementname="WinSMS_SCmessages" type="WinSMS_SCmessagesType" />
	<xs:complexType name="WinSMS_SCmessagesType">
		<xs:annotation>
			<xs:appinfoxdb:docElement="WinSMS_SCmessages" />
		</xs:annotation>
		<xs:sequence>
			<xs:elementname="User" type="xs:string" MaxOccurs="1" />
			<xs:elementname="Password" type="xs:string" MaxOccurs="1" />
		</xs:sequence>
	</xs:complexType>
</xs:schema>

Example

<WinSMS_SCmessages>
	<User>hpotter</User>
	<Password>w1Zard</Password>
</WinSMS_SCmessages>

Notes

  • No additional parameters are required. All previously unreturned Short Code messages received in the last 90 days will be returned in the response

Response - Valid Request Submitted

Schema

<?xml version="1.0" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:elementname="XMLGateway_SCmessages " type="XMLGateway_SCmessagesType" />
	<xs:complexType name="XMLGateway_SCmessagesType">
		<xs:annotation>
			<xs:appinfoxdb:docElement="XMLGateway_SCmessages" />
		</xs:annotation>
		<xs:sequence>
			<xs:elementname="SCmessage" type="SCmessageType" maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="SCmessageType">
		<xs:sequence>
			<xs:elementname="SC" type="xs:string" />
			<xs:elementname="CLI" type="xs:string" />
			<xs:elementname="DateReceived" type="xs:string" />
			<xs:elementname="Message" type="xs:string" />
		</xs:sequence>
	</xs:complexType>
</xs:schema>

Example

<XMLGateway_SCmessages>
    <SCmessage>
        <SC>12345</SC>
        <CLI>27825550101</CLI>
        <DateReceived>201811141103</DateReceived>
        <Message>Please enroll me at Hogwarts</Message>
    </SCmessage>
    <SCmessage>
        <SC>12345</SC>
        <CLI>27835550505</CLI>
        <DateReceived>201811141116</DateReceived>
        <Message>Add me</Message>
    </SCmessage>
</XMLGateway_SCmessages>

Notes

  • The SCmessage node will occur once for each previously unreturned Short Code SMS received by WinSMS in the past 90 days.

  • Once a Short Code SMS has been returned in a response it will never be returned again in subsequent calls to the endpoint

  • The SC node contains the Short Code that received the SMS message

  • The CLI node contains the mobile number of the sender. It is returned in international format – e164 format without the "+" sign

  • The DateReceived node contains the date and time that the Short Code SMS was received, calculated as GMT+2 and formatted as ccyymmddhhmm

  • The Message node contains the text of the message received

Response - Invalid Request

Schema

<?xml version="1.0" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:elementname="XMLGateway_SCmessages" type="XMLGateway_SCmessagesType" />
	<xs:complexType name="XMLGateway_SCmessagesType">
		<xs:annotation>
			<xs:appinfoxdb:docElement="XMLGateway_SCmessages" />				
		</xs:annotation>
		<xs:sequence>
			<xs:elementname="Error" type="xs:string"maxOccurs="unbounded" />
		</xs:sequence>
	</xs:complexType>
</xs:schema>

Example

<XMLGateway_SCmessages>
	<Error>Not Valid XML Document</Error>
</XMLGateway_SCmessages>

Possible Error Values

Value Description
Not Valid XML Document Possible causes:
- The posted document was not in a valid XML format
Invalid Username or Password The login credentials supplied were not valid

Webhooks

Description

Configure event Webhooks to enable real-time notifications of new Replies and Delivery Reports.
Read the docs

      
        
         
           
            
             
              
           
            
             
                     
        

Appendix A - SMS Delivery Status Values

Value Description
DELIVERED The message was successfully delivered to the recipient
SENT The message has been sent to the recipient, but no delivery report has been received. Additional information can be determined from the StatusCode node
NOTFOUND Possible reasons:
- An incorrect MessageID was sent in the request
- The message is still in the queue waiting to be sent
- The message was sent more than 90 days previously
SENDINGFAILED The message was not delivered to the recipient. Additional information can be determined from the StatusCode node
      
        
         
           
            
             
              
           
            
             
                     
        

Appendix B - SMS Delivery Status Codes

Value Description
-3 Invalid username or password in requesting document
-2 Message not found
-1 Message in queue
0 DELIVERED
100 Sent; no delivery report received
101 Undelivered: expired in transit
102 Undelivered: message was cancelled before being delivered
103 Message could not be delivered
105 Not yet delivered, but accepted for delivery
106 Sent; delivery status not known
107 Undelivered: message was rejected
108 SKIPPED
111 Message could not be sent
201 WinSMS account has insufficient credits
202 WinSMS account is locked
211 Message is too long to send by SMS
212 Recipient has opted out of receiving messages
213 Sending or delivery failed for an unknown reason
214 Number is blacklisted
      
        
         
           
            
             
              
           
            
             
                     
        

Appendix C - Scheduled SMS Deletion Result Values

Value Description
DELETED The scheduled message was successfully deleted and the associated credits refunded to the user account
NOTFOUND Possible reasons:
- An incorrect MessageID was sent in the request
- The scheduled SMS has already been deleted
SENT The scheduled message has already been sent to the recipient, and can not be deleted
      
        
         
           
            
             
              
           
            
             
                     
        

Appendix D - Opt-Out Rules and Trigger Words

WinSMS opt-outs are WASPA compliant (http://www.waspa.org.za).

An opt-out is registered when an account messages a recipient through the WinSMS gateway, using any WinSMS product or service, and the recipient replies with one of the trigger words (not case sensitive):

WinSMS automatically sends a message from the original WinSMS account, confirming the opt-out request, and blocks that WinSMS account from sending any further messages to the opted-out number.

Opt-out numbers can also be added manually from the WinSMS Client Zone. This functionality can be used to prevent an account from sending a message to a particular number that has not specifically responded with a trigger word.

Manually added opt-out numbers do not send an opt-out confirmation SMS message to the opted-out number.

Trigger Words

Entire message is “Stop”
Entire message is “End”
Entire message is “Cancel”
Entire message is “Unsubscribe”
Entire message is “Quit”
Message starts with “Stop send”
Message starts with “Opt out”
Message starts with “Opt*out” where ‘*’ represents any character