Authorise an email address for sending Email to SMS


We created a new viewing experience for our SMS API documentation. It's now all in one central location. Click here to check it out!


Parameter

Description

Required

emailEmail address to register. You may also register a wild-card email which allows any user on the same domain to use Email to SMS.

Wild-card format: *@example.com
YES
max_smsThe maximum number of SMS messages to send from one email message sent from this email address.

Possible values:
1 - up to 160 characters (default)
2 - up to 306 characters
3 - up to 459 characters
4 - up to 612 characters
NO
numberOptional dedicated virtual number virtual numberNO


Example

curl https://api.transmitsms.com/add-email.json \
  -u 2e24c1cbdd987221e165d543f34b84bf:secret \
  -d 'email=email@client.com'
  -d max_sms=2


JSON Response

{
  success: true
}

XML Response

<?xmlversion="1.0"encoding="UTF-8"?>
<response>
  <success>true</success>
</response>


PHP Examples


<?php
 include '../../APIClient2.php';

 $api = new transmitsmsAPI('API_KEY', 'API_SECRET');
 $result = $api->addEmail('email@client.com', 1);

 if ($result->error->code == 'SUCCESS') {
     echo 'Email added';

 } else {
     echo 'Error: {$result->error->description}';
 }