SMS API
RemoveUnsubscribedNumbers
This method resubscribes one or more phone numbers from a given license key.
Endpoint
POST:https://messaging.esendex.us/Messaging.svc/RemoveUnsubscribedNumbers
Syntax
RemoveUnsubscribedNumbers(LicenseKey, PhoneNumbers)
Request Parameters
Parameter Name | Description | Data Type | Required | Sample Value |
---|---|---|---|---|
LicenseKey | Your license key. | GUID | True | 00000000-0000-0000-0000-000000000000 |
PhoneNumbers | One or more phone numbers to resubscribe. | Array of String values | True | 7575559999 |
Response
Returns: Array of UnsubscribedNumberResult
objects
Code Samples
You can use any programming language you want with our API, as long as it can make a REST or SOAP call. Here are examples for some of the most common platforms.
C#
// https://messaging.esendex.us/Messaging.svc?wsdl was added as a Service Reference and given the name WSDL
using WSDL;
var client = new MessagingClient(MessagingClient.EndpointConfiguration.mms2wsHttpBindingSecure);
var numbers = new string[] { "7575559999" };
var unsubscribedNumbers = await client.RemoveUnsubscribedNumbersAsync(YOUR_LICENSE_KEY, numbers);
foreach (var number in unsubscribedNumbers)
{
Console.WriteLine(
"Phone Number: " + number.PhoneNumber + Environment.NewLine +
"Error: " + number.Error + Environment.NewLine +
"Success: " + number.IsSuccess + Environment.NewLine);
}
JSON Response
[
{
"Error": "String content",
"IsSuccess": true,
"PhoneNumber": "String content"
}
]
XML Response
<ArrayOfUnsubscribedNumberResult xmlns="http://sms2.cdyne.com">
<UnsubscribedNumberResult>
<Error>String content</Error>
<IsSuccess>true</IsSuccess>
<PhoneNumber>String content</PhoneNumber>
</UnsubscribedNumberResult>
<UnsubscribedNumberResult>
<Error>String content</Error>
<IsSuccess>true</IsSuccess>
<PhoneNumber>String content</PhoneNumber>
</UnsubscribedNumberResult>
</ArrayOfUnsubscribedNumberResult>
Let’s start sending, together.