REST API
Last updated
Last updated
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.
All API endpoints are relative to the base URL:
Authenticate your API requests using API keys. Include your API key in the Authorization
header:
The Unecast SMS Gateway API utilizes GET and POST methods to for the following use cases.
HTTP Method | Use Cases | Description |
---|---|---|
The POST
method is set as the default method for sending messages due to several security-related reasons:
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.
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.
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.
Create an App: Sign in to Unecast and click on Developer to create your first app
.
Select Project Scope: Select REST API to generate an API key
Send an SMS: Use the /sms/send
endpoint to send your first SMS.
Check Status: Use the /sms/status/{message_id}
endpoint to check the delivery status of your message.
Account Balance: Use the /account/balance
endpoint to check the current balance in your account.
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.
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.
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
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.