REST API

Unecast’s REST API allows you to integrate SMS capabilities into your applications with ease. Our RESTful API uses standard HTTP methods and JSON data formats to provide a flexible and developer-friendly interface.

Base URL

All API endpoints are relative to the base URL:

https://api.unecast.com/v1.0/

Authentication

Authenticate your API requests using API keys. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Allowed HTTP Methods

The Unecast SMS Gateway API utilizes GET and POST methods to for the following use cases.

HTTP Method
Use Cases
Description

GET

  • To check account balance

  • To check message statuses

GET method allow users to retrieve information about their account balance and the delivery status of their sent messages.

POST

To send messages

  • SMS

  • WhatsApp

  • POST method enables users to send SMS messages by providing the necessary details such as the sender ID, recipient number(s), and message content.

  • The POST method ensures secure and efficient communication between the user's application and the Unecast service.

The POST method is set as the default method for sending messages due to several security-related reasons:

1. Data Encapsulation in the Body

Unlike the GET method, where data is included in the URL, the POST method sends data in the body of the request. This offers enhanced security because:

  • URL Visibility: Data in the URL can be logged in server logs, browser history, and be visible in the browser's address bar, potentially exposing sensitive information. Using the POST method avoids this issue.

  • Data Length: URLs have length limitations, which can restrict the amount of data sent. POST requests do not have such restrictions, allowing for more extensive and detailed data to be transmitted securely.

2. Handling Sensitive Data

The POST method allows sensitive data such as API keys, user credentials, and SMS content to be included in the request body. This provides several advantages:

  • Encryption: When using HTTPS, the request body is encrypted, ensuring that sensitive data is transmitted securely over the network.

  • Parameter Safety: Sensitive information is less likely to be exposed in the browser history or server logs, as it is not part of the URL.

3. Appropriate for Data Modification

The POST method is designed for operations that create or modify data, such as sending an SMS. This aligns with security practices where:

  • Transaction Safety: Actions that change the state of the server, such as sending a message, should be securely encapsulated to prevent unintended actions. POST is designed for such operations.

  • Explicit Actions: POST requests explicitly indicate an action to be performed, reducing the risk of unintended or accidental data retrieval, as can happen with GET requests when URLs are accidentally clicked or refreshed.


Let's Get Started

  1. Create an App: Sign in to Unecast and click on Developer to create your first app.

  2. Select Project Scope: Select REST API to generate an API key

  3. Send an SMS: Use the /sms/send endpoint to send your first SMS.

  4. Check Status: Use the /sms/status/{message_id} endpoint to check the delivery status of your message.

  5. Account Balance: Use the /account/balance endpoint to check the current balance in your account.


Community and Support

Join our community forums to connect with other developers, ask questions, and share your experiences. Our support team is also available to help you with any technical issues or inquiries.


Technical Support

For service requests, questions, or clarifications, please visit the Unecast Support Center. Our engineers and technical consultants will assist you in resolving your concerns free of charge.

Last updated