SMS
SMS_Send
Send an SMS message to a customer.
Required Input
- ToNumber As String – the 10-digit number to which to send an SMS message.
- Message As String – the message to be sent to To_Number. Must be between 1 and 160 characters.
Optional/Conditional Input
- CustomerID As Integer – optionally will associate the outgoing SMS with this customer.
- Profile
- SmsProfileID As Integer – optionally instruct the API to use a specific SMS Profile. Cannot be used with FromNumber.
- FromNumber As String – optionally instruct the API to use a specific SMS Profile by searching for it by FromNumber. Cannot be used with SmsProfileID.
Output
- Profile
- SmsProfileID As Integer – identifies the SMS Profile that was used to send the message. If an SmsProfileID was not specified on the request, it will contain the automatically determined SMS Profile that was used.
- FromNumber As String – identifies the From Number of the SMS Profile that was used to send the message. If an SmsProfileID was not specified on the request, it will contain the automatically determined SMS Profile that was used.
- ID As Integer – the ID of the SMS Message that was created as a result of this request.
Examples
<SMS_Send xmlns="http://api.myh2o.com/">
<Request>
<Session>
<SessionKey>xyzabc123</SessionKey>
</Session>
<ToNumber>8504700000</ToNumber>
<Message>Test Message from Rev.io</Message>
</Request>
</SMS_Send>
<SMS_SendResult>
<Header>
<Success>true</Success>
<SessionKey>xyzabc123</SessionKey>
</Header>
<ID>3939323</ID>
<Profile>
<SmsProfileID>1000</SmsProfileID>
<FromNumber>67312</FromNumber>
</Profile>
</SMS_SendResult>
SMS_Opt_Out_Create
This API accepts a list of TNs to be place in an Opt Out list. TNs in the Opt Out list will be excluded from SMS being sent due to the SMS Events created by users with the role of Rev.io.
Input Field
Field | Type | Notes | Required? |
---|---|---|---|
TNs | List of Strings | Must be non null or empty string | Required |
Output Fields
NA
Example Requests
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<SMSOptOut_Create xmlns="http://api.myh2o.com/v20">
<Request>
<Credentials>
<Username>[Rev.io user]</Username>
<Password>[Rev.io password]</Password>
<Client>[Rev.io Client Code]</Client>
</Credentials>
<TNs>
<TN>6788651234</TN>
</TNs>
</Request>
</SMSOptOut_Create>
</soap:Body>
</soap:Envelope>
Example Responses
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<SMSOptOut_CreateResponse xmlns="http://api.myh2o.com/v20">
<SMSOptOut_CreateResult>
<Header>
<Success>true</Success>
<SessionKey>ASGJDHAGS%&^%&@!</SessionKey>
<Impersonated>false</Impersonated>
</Header>
</SMSOptOut_CreateResult>
</SMSOptOut_CreateResponse>
</soap:Body>
</soap:Envelope>
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<SMSOptOut_CreateResponse xmlns="http://api.myh2o.com/v20">
<SMSOptOut_CreateResult>
<Header>
<Success>false</Success>
<Message>'' is an invalid TN.</Message>
<Impersonated xsi:nil="true" />
<Error_Code>S2010</Error_Code>
<Error_Description>Invalid input received.</Error_Description>
</Header>
</SMSOptOut_CreateResult>
</SMSOptOut_CreateResponse>
</soap:Body>
</soap:Envelope>
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<SMSOptOut_CreateResponse xmlns="http://api.myh2o.com/v20">
<SMSOptOut_CreateResult>
<Header>
<Success>false</Success>
<Message>', ' are invalid TNs.</Message>
<Impersonated xsi:nil="true" />
<Error_Code>S2010</Error_Code>
<Error_Description>Invalid input received.</Error_Description>
</Header>
</SMSOptOut_CreateResult>
</SMSOptOut_CreateResponse>
</soap:Body>
</soap:Envelope>
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<SMSOptOut_CreateResponse xmlns="http://api.myh2o.com/v20">
<SMSOptOut_CreateResult>
<Header>
<Success>false</Success>
<Message>'1234567890' is already in the opt-out list.</Message>
<Impersonated xsi:nil="true" />
<Error_Code>S2010</Error_Code>
<Error_Description>Invalid input received.</Error_Description>
</Header>
</SMSOptOut_CreateResult>
</SMSOptOut_CreateResponse>
</soap:Body>
</soap:Envelope>
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<SMSOptOut_CreateResponse xmlns="http://api.myh2o.com/v20">
<SMSOptOut_CreateResult>
<Header>
<Success>false</Success>
<Message>'1234567890, 1234567891' are already in the opt-out list.</Message>
<Impersonated xsi:nil="true" />
<Error_Code>S2010</Error_Code>
<Error_Description>Invalid input received.</Error_Description>
</Header>
</SMSOptOut_CreateResult>
</SMSOptOut_CreateResponse>
</soap:Body>
</soap:Envelope>
SMS_Opt_Out_Delete
This API accepts a list of TNs to be removed from an Opt Out list. This will remove the TN from the exclusion list when SMS are being sent due to the SMS Event created by a user with role Rev.io
Input Field
Field | Type | Notes | Required? |
---|---|---|---|
TNs | List of Strings | Must be non null or empty string | Required |
Output Fields
NA
Example Requests
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<SMSOptOut_Delete xmlns="http://api.myh2o.com/v20">
<Request>
<Credentials>
<Username>[Rev.io user]</Username>
<Password>[Rev.io password]</Password>
<Client>[Rev.io Client Code]</Client>
</Credentials>
<TNs>
<TN>1234567890</TN>
</TNs>
</Request>
</SMSOptOut_Delete>
</soap:Body>
</soap:Envelope>
Example Responses
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<SMSOptOut_DeleteResponse xmlns="http://api.myh2o.com/v20">
<SMSOptOut_DeleteResult>
<Header>
<Success>true</Success>
<SessionKey>asdjlas^*&^*&@KJHASD</SessionKey>
<Impersonated>false</Impersonated>
</Header>
</SMSOptOut_DeleteResult>
</SMSOptOut_DeleteResponse>
</soap:Body>
</soap:Envelope>
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<SMSOptOut_DeleteResponse xmlns="http://api.myh2o.com/v20">
<SMSOptOut_DeleteResult>
<Header>
<Success>false</Success>
<Message>'' is an invalid TN.</Message>
<Impersonated xsi:nil="true" />
<Error_Code>S2010</Error_Code>
<Error_Description>Invalid input received.</Error_Description>
</Header>
</SMSOptOut_DeleteResult>
</SMSOptOut_DeleteResponse>
</soap:Body>
</soap:Envelope>
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<SMSOptOut_DeleteResponse xmlns="http://api.myh2o.com/v20">
<SMSOptOut_DeleteResult>
<Header>
<Success>false</Success>
<Message>', ' are invalid TNs.</Message>
<Impersonated xsi:nil="true" />
<Error_Code>S2010</Error_Code>
<Error_Description>Invalid input received.</Error_Description>
</Header>
</SMSOptOut_DeleteResult>
</SMSOptOut_DeleteResponse>
</soap:Body>
</soap:Envelope>
Updated about 6 years ago