Introduction to Viatel's API

Introduction to Viatel's API

By reading this article you should be able to use Viatel’s API in a few minutes.

Get your API credentials in Viatel’s Customer Portal, top menu Admin and Users.

Send a Text Message

Before you start the implementation in your code, we recommend to first try in Postman. This will ease your work trying to understand the Viatel’s API.

Make sure you have the credentials to your API account.

Find the SMS API specification and scroll down to the method Send a new SMS:
https://api.viatel.se/SMS/doc/v1/index.html#tag/SMS/paths/~1v1~1SMS/post

To the right, click POST /v1/SMS and copy the Base URL: https://api.viatel.se/SMS/v2/SMS

image-20260226-100546.png

In Postman, create a new request

Change method to Post, to match the information in the above picture, and paste the Base URL in the Request URL-field.

image-20260226-100656.png

Go to Authorization, select Basic Auth and enter your credentials.

image-20260226-101157.png

 

Click the Body tab and select Raw and JSON in the drop down menus.

image-20260226-101007.png

Enter the parameters you would like to provide in the request, e.g.

{   "to": "4670123456",   "text": "Hello world" }

Send the request and verify the response. The http status response should be 200 to be successful.

image-20260226-101100.png