https://letsads.com/create-text-messages
Enter your registered phone number.
Recovery password code sent to your registered phone number.
Enter the new password and confirm it. Remember it and use to login into our sevice.

SMS API

We offer additional capabilities for you by means of connection to our SMS API service. Now you have an opportunity to become integrated with our platform and entirely automate SMS distribution process.

To activate API on your account you need to send request in your profile for enabling Sms API.

Message sending

Example of a request for message delivery to 4 respondents:
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <request>
  3. <auth>
  4. <login>380501234567</login>
  5. <password>p1a2s3s4</password>
  6. </auth>
  7. <message>
  8. <from>Sender</from>
  9. <text>Test message.</text>
  10. <recipient>380501234567</recipient>
  11. <recipient>380501234568</recipient>
  12. <recipient>380677654323</recipient>
  13. <recipient>380677654324</recipient>
  14. </message>
  15. </request>
If message is queued successfully, this answer will send with the messages id:
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <response>
  3. <name>Complete</name>
  4. <description>4 messages put into queue</description>
  5. <sms_id>633217</sms_id>
  6. <sms_id>633218</sms_id>
  7. <sms_id>633219</sms_id>
  8. <sms_id>633220</sms_id>
  9. </response>
If errors was happen:
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <response>
  3. <name>Error</name>
  4. <description>Error code</description>
  5. </response>
Error codes:
  • NO_DATA (data error : XML wasn’t transmitted)
  • WRONG_DATA_FORMAT (transmitted XML format error)
  • REQUEST_FORMAT (wrong request type)
  • AUTH_DATA (authorization error: non-existent user, the user name or password is incorrect)
  • API_DISABLED (work with API is disabled for user account)
  • USER_NOT_MODERATED (sending Messages without user account verification is forbidden)
  • INCORRECT_FROM (nvalid sender (addresser) name)
  • INVALID_FROM (invalid sender name for this account)
  • MESSAGE_TOO_LONG (Maximum length of the message is exceeded : 402 signs for Cyrillic characters, 459 signs for the Roman characters)
  • NO_MESSAGE (empty message for sending)
  • MAX_MESSAGES_COUNT (maximum number of respondents is exceeded for one request: 50)
  • NOT_ENOUGH_MONEY (Not enough credit for sending a message to respondents in the request)
  • UNKNOWN_ERROR (unknown error)
  • INCORRECT_RECIPIENT_ (will indicate the first incorrect number from the list to be excluded and resend the request; will not send sms to everyone from the list)

Message status receiving

Example of a request for receiving a status of an id message:
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <request>
  3. <auth>
  4. <login>380671234567</login>
  5. <password>p1a2s3s4</password>
  6. </auth>
  7. <sms_id>632647</sms_id>
  8. </request>
If the message is found, an answer specifying its status will be given.
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <response>
  3. <name> Status</name>
  4. <description>Message status</description>
  5. </response>
Possible status:
  • MESSAGE_IS_DELIVERED (message was delivered to a respondent)
  • MESSAGE_IS_SENT (message is sent)
  • MESSAGE_NOT_DELIVERED (message wasn’t delivered)
  • MESSAGE_IN_QUEUE (message is waiting to be sent)
If errors occurred:
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <response>
  3. <name>Error</name>
  4. <description>Error code</description>
  5. </response>
Errors codes:
  • NO_DATA (data error: XML wasn’t transmitted)
  • WRONG_DATA_FORMAT (transmitted XML format error)
  • REQUEST_FORMAT (incorrect request format)
  • AUTH_DATA (authorization error: non-existent user, user name or password is incorrect)
  • API_DISABLED (work with API is disabled for user account)
  • MESSAGE_NOT_EXIST (message with id given is invalid)
  • UNKNOWN_ERROR (unknown error)
For the first time massage status should be checked in 10 minutes, for the second time it should be done in 3 hours.

Receiving user’s balance

Example of a request for user’s balance receiving:
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <request>
  3. <auth>
  4. <login>380671234567</login>
  5. <password>p1a2s3s4</password>
  6. </auth>
  7. <balance />
  8. </request>
Answer:
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <response>
  3. <name>Balance</name>
  4. <description>amount of funds deposited in user account</description>
  5. <currency>user account currency</currency>
  6. </response>
If error is occured:
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <response>
  3. <name>Error</name>
  4. <description>error code</description>
  5. </response>
Error codes:
  • NO_DATA (data error : XML wasn’t transmitted)
  • WRONG_DATA_FORMAT (transmitted XML format error)
  • REQUEST_FORMAT (wrong request type)
  • AUTH_DATA (authorization error: non-existent user, the user name or password is incorrect)
  • API_DISABLED (work with API is disabled for user account)
  • UNKNOWN_ERROR (unknown error)

Code example for sending a request and receiving a reply in XML format in PHP language

<?php
$sUrl  
'https://api.letsads.com';
$sXML  '<?xml version="1.0" encoding="UTF-8"?>
<request>
    <auth>
        <login>380501234567</login>
        <password>p1a2s3s4</password>
    </auth>
    <balance />
</request>'
;

$rCurl curl_init($sUrl);
curl_setopt($rCurlCURLOPT_HEADER0);
curl_setopt($rCurlCURLOPT_POSTFIELDS$sXML);
curl_setopt($rCurlCURLOPT_RETURNTRANSFER1);
curl_setopt($rCurlCURLOPT_POST1);
$sAnswer curl_exec($rCurl);
curl_close($rCurl);