The SMS API provides possibility to send SMS text messages via the system. An end-user must have a valid ticket for the API and be authorized to send SMS to use this API.


Please check External API authorization for instructions how to enable API access to Enduser APIs.


TABLE OF CONTENTS


Create SMS API ticket

  1. Login to Onecloud enduser portal with your own credentials
  2. Choose Home
  3. Choose Tickets
  4. Add Name to the API ticket and choose Send SMS
  5. Click Create ticket
  6. Copy Token from new granted ticket


Send SMS

If you are using Swagger for test, the first step is to authorize yourself with correct token. Instructions for this can be found from External API authorization.

SMS api endpoint can be found from user/sms path.

  1. Insert destination number in to field
    • The the number to send to. This number will be expanded according to the sending user's number plan. For example, if the user's organization has a number plan conversion of 0 -> +468, the user can send to 0890510 and the SMS will be routed to +46890510.   
  2. Change body payload to application/json
  3. Insert following data to payload and click Execute
    {
      "smsText": "Test SMS from Onecloud SMS API."
    }
  4. Screenshot from destination phone

  5. Swagger generated CURL command can also be used for test as below example shows

    • Send SMS
      curl -X POST "https://onecloud.setera.com/api/user/sms/%2B358409403999?t=970.VDo1YTE0ZGFhZjhiM2EwOWM0" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"smsText\":\"Test SMS from Onecloud SMS API.\"}"
    • Response from API
      {"validationResult":""}