Build SMS API
The Build SMS API feature allows you to create and integrate an SMS API into your application. By utilizing the provided form fields, you can build a custom SMS API that seamlessly integrates with your application’s functionality.
Username Field:
Automatically logged in username value shown in disabled field.
API Type Field:
The API Type field specifies the type of API operation you want to perform. It offers various options categorized into different groups. Here are the available options:
SMS
Info
- Get API Response Error Code List: Retrieve the list of API response error codes.
- Get Delivery Error Code List: Retrieve the list of delivery error codes.
- Get SMS Length / Cost: Get information about the length and cost of an SMS message.
Reports
- Check MIS by Transaction ID : Check the MIS (Management Information System) for a specific transaction ID.
- Get DLR Summary Report: Retrieve the summary report of the delivery status for sent SMS messages.
- Get File Upload History: Get the history of file uploads for SMS campaigns.
- Get Delivery Report : Retrieve the detailed delivery report for sent SMS messages.
Schedule
- Update Schedule SMS: Update the scheduled time for an SMS message.
- Read Schedule SMS: Retrieve the details of a scheduled SMS message.
- Delete Schedule SMS: Delete a scheduled SMS message.
Send SMS
- Send SMS Batch: Send SMS messages to multiple recipients in a single API call.
- Send SMS Phonebook: Send SMS messages to recipients from the phonebook.
User
Account
- Change Password: Change the password for the account.
- Update Profile: Update the profile information for the account.
- Read Profile: Retrieve the profile information for the account.
- Read Credit History: Get the credit history for the account.
- Read Account Status: Check the account status and related information.
API Key
- Create API Key: Create a new API key.
- Read API Key: Retrieve the details of an existing API key.
- Update API Key: Update the details of an existing API key.
- Delete API Key: Delete an existing API key.
Group
- Create Group: Create a new group for managing contacts.
- Read Group: Retrieve the details of an existing group.
- Update Group: Update the details of an existing group.
- Delete Group: Delete an existing group.
Contact
- Create Contact : Create a new contact in the phonebook.
- Read Contact: Retrieve the details of an existing contact.
- Update Contact: Update the details of an existing contact.
- Delete Contact : Delete an existing contact.
Draft
- Create Draft: Create a new SMS draft.
- Read Draft: Retrieve the details of an existing SMS draft.
- Update Draft: Update the content of an existing SMS draft.
- Delete Draft: Delete an existing SMS draft.
Message Template
- Create Message Template: Create a new message template.
- Read Message Template: Retrieve the details of an existing message template.
- Update Message Template: Update the details of an existing message template.
- Delete Message Template: Delete an existing message template.
Sender ID
- Create Sender ID: Create a new sender ID for sending SMS messages.
- Read Sender ID: Retrieve the details of an existing sender ID.
- Update Sender ID: Update the details of an existing sender ID.
- Delete Sender ID: Delete an existing sender ID.
Webhook
- Create Webhook: Create a new webhook for receiving event notifications.
- Read Webhook: Retrieve the details of an existing webhook.
- Update Webhook: Update the details of an existing webhook.
- Delete Webhook: Delete an existing webhook.
Campaign
- Read Campaign: Retrieve the details of an existing campaign.
- Update Campaign: Update the details of an existing campaign.
- Delete Campaign: Delete an existing campaign.
Smart Link
- Create Smart Link: Create a new smart link for tracking clicks and visits.
- Read Smart Link Campaign: Retrieve the details of an existing smart link campaign.
- Read Smart Link Visitors Report: Get the report of visitors for a smart link campaign.
- Delete Smart Link: Delete an existing smart link.
Reseller
Credit Management
- Read User Credit History: Retrieve the credit history for a user.
- Add User Credit: Add credit to a user’s account.
- Remove User Credit: Remove credit from a user’s account.
User Management
- Create New User: Create a new user account.
- User Update: Update the details of an existing user account.
- Generate User Password: Generate a new password for a user account.
- Reset User Password: Reset the password for a user account.
- Read User Profile: Retrieve the profile information for a user account.
Response Output:
This field allows the user to select the desired format for the API response output. The options available for selection are “JSON,” “XML,” and “Text.” Here’s an explanation of each option:
- JSON:
- JSON (JavaScript Object Notation) is a widely used data interchange format.
- If the user selects “JSON” as the response output option, the API will return the response data in JSON format.
- JSON is often used for structured data representation and is easily readable by both humans and machines. It is commonly used in web APIs.
- XML:
- XML (eXtensible Markup Language) is another popular format for storing and transporting structured data.
- Selecting “XML” as the response output option means that the API will provide the response data in XML format.
- XML is widely used for data interchange, particularly in systems that require a hierarchical structure for their data.
- Text:
- “Text” refers to plain text format.
- Choosing “Text” as the response output option means that the API will return the response data as plain text, without any specific formatting or structure.
- This option is useful when the response does not require any specific data format and can be easily consumed as plain text.
The user can select the appropriate response output format based on their application’s requirements and their preferred method of processing and consuming the API response data.
It’s important to note that the chosen response output format should align with the capabilities of the application that will handle the API response. For example, if the application is designed to consume JSON data, selecting the “JSON” option would be the most suitable choice.
Using Form Fields to Build SMS API
To build your SMS API, you need to utilize the form fields provided. These form fields offer a wide range of options to specify the type of API operation you want to perform. Each option corresponds to a specific functionality or action related to SMS messaging.
By selecting the appropriate API type from the dropdown menu, you can define the desired operation for your SMS API. The available options cover various aspects such as sending SMS messages, managing contacts and groups, retrieving reports, handling account-related tasks, and more.
Integrating the SMS API into your application enables you to leverage the power of SMS messaging functionality, allowing you to send messages, track delivery statuses, manage contacts and groups, schedule messages, retrieve reports, and perform other related tasks.
By following the documentation and utilizing the provided form fields, you can easily create and customize your SMS API to suit your application’s requirements.
Integrating the SMS API into your application enhances its communication capabilities, enabling you to seamlessly send SMS messages, manage contacts, track message deliveries, and perform other SMS-related tasks directly from your application.
Whether you are building a messaging application, customer engagement platform, marketing tool, or any other application that requires SMS functionality, the Build SMS API feature provides you with the necessary tools to integrate SMS capabilities seamlessly.
Feel free to refer to the API type field options documentation provided above to understand the available functionalities and select the appropriate API type for your desired operation.
SMS Sample Code
The SMS Sample Code section provides sample code snippets to send SMS messages using different methods and programming languages. The user can select the desired method and sample code language to generate the appropriate code.
Sure! Here’s the documentation for the given SMS sample code:
Get Sample Code to Send SMS
This code snippet allows you to generate sample code for sending SMS messages using the SMS Gateway Center API. The generated code can be used as a starting point for implementing SMS functionality in your application. The code supports multiple methods and languages.
Select Method
- Send SMS Batch: Use this option to send SMS messages to multiple recipients in a batch.
- Send SMS Phonebook: Use this option to send SMS messages to contacts stored in your phonebook.
- File Upload: Use this option to send SMS messages by uploading a file containing recipient numbers and message content.
- Call Back DLR Script: Use this option to configure a callback URL for receiving delivery reports (DLRs) for your sent messages.
Sample Code Language
- PHP Sample Code: Choose this option to generate sample code in PHP language.
- JAVA Sample Code: Choose this option to generate sample code in Java language.
- JSON API: Choose this option to generate sample code for making JSON API requests.
To generate the sample code, select the desired method and sample code language. Once selected, click the “Build Sample Code” button. The generated code will be displayed in the “Sample Code Result” section.
Sample Request Code
The generated sample code will be displayed in the “Sample Code Result” section. Here is an example of the PHP sample request code:
POST METHOD
Download/Import Postman Collection
To make it easier for developers to interact with the Bulk SMS Services in Kenya Wait For It Internet SMS API, a Postman Collection is provided. Follow the steps below to download and import the collection into your Postman client.
- Go to the following URL: Download Postman SMS Collection
- You will see a form with checkboxes for selecting the required components.
- The available components are:
- Send SMS: Check this option if you want to send an SMS using the API.
- Scheduled SMS: Check this option if you want to send a scheduled SMS.
- Account Related: Check this option for API requests related to account management.
- Reseller Related: Check this option for API requests related to reseller management.
- Select the desired components by checking the corresponding checkboxes.
- Once you have selected the components, click on the “Download SMS API – Postman Collection” button.
- A file with the Postman Collection will be downloaded to your local machine.
- Open Postman and select the workspace where you want to import the collection.
- Click on the “Import” button in Postman.
- Browse and select the downloaded Postman Collection file.
- The collection will be imported into your Postman client, and you will be able to see all the available SMS API endpoints.
- Before using the collection, make sure to modify the necessary values such as PASSWORD, PHONE_NUMBER, GROUP_NAME, etc., in the collection’s environment settings.
- You can now start using the Bulk SMS Services in Kenya Wait For It Internet SMS API by making requests using the imported Postman Collection.
How to Install and Use Postman for API Testing
Postman is an API client that simplifies the process of creating, sharing, testing, and documenting APIs. Follow the steps below to download and install Postman:
- Go to the official Postman website: https://www.postman.com/downloads/
- Choose your desired platform (Mac, Windows, or Linux) and click on the “Download” button.
- Once the download is complete, run the downloaded installer file.
- Follow the installation wizard instructions to install Postman on your machine.
- After the installation is complete, launch Postman.
- If you don’t have a Postman account, you can sign up for one. Creating an account allows you to save your collections and access them across devices.
- Once you have signed up or logged in, you will see the Postman startup screen.
- Postman is now installed and ready to be used for API testing.
Set up the SMS API Postman Collection
To set up the Bulk SMS Services in Kenya Wait For It Internet’s Postman Collection for SMS API, follow these steps:
- Download the customized Postman collection provided by the Bulk SMS Services in Kenya Wait For It Internet.
- Save the downloaded collection to a local folder on your machine.
- Open Postman and select the desired workspace where you want to import the collection.
- Click on the “Import” button in Postman.
- In the import dialog, click on “Upload Files” and browse to the folder where you saved the downloaded collection.
- Select both files from the folder and click “Open“.
- Postman will display the selected files and their descriptions. Click on the “Import” button.
- The collection will be imported into your Postman client, and you will see all the available SMS API endpoints based on your selected components.
- Before using the collection, you need to make a few changes. Click on the “Environment” button in Postman.
- In the environments list, click on the “Globals” environment.
- On the right side of the screen, you will see the current values that can be edited, such as PASSWORD, PHONE_NUMBER, GROUP_NAME, etc.
- Modify the necessary values according to your requirements.
- Once you have made the changes, you can start using the imported collection to test the SMS API.
By following these steps, you will be able to download, import, and set up the Bulk SMS Services in Kenya Wait For It Internet Postman Collection, as well as install and use Postman for API testing.