| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This documentation outlines the API endpoints for the SMS Gateway application. It details each endpoint's functionality, request/response structure, and example use cases.
The base URL serves as the entry point for all API requests:
{{base_url}}
Example: https://localhost:8080/
This endpoint retrieves all SMS messages stored on the server.
You can optionally include query parameters to filter results:
GET https://localhost:8080/smspm.test("Status code is 200", function () {
pm.response.to.have.status(200);
});This endpoint allows you to send an SMS by providing a recipient's phone number and a message in the request body.
{
"number": "+1234567890",
"message": "Hello, this is a test message!"
}POST https://localhost:8080/sms
Content-Type: application/json
{
"number": "+1234567890",
"message": "Hello, this is a test message!"
}pm.test("Successful POST request", function () {
pm.expect(pm.response.code).to.be.oneOf([200, 201]);
});This endpoint deletes a specific SMS record by its unique identifier (id).
DELETE https://localhost:8080/sms/2pm.test("Successful DELETE request", function () {
pm.expect(pm.response.code).to.be.oneOf([200, 202, 204]);
});These variables allow dynamic usage of the API:
base_url
id
Each endpoint includes a predefined Postman test to verify expected behavior. These tests ensure:
No prerequest scripts are defined in the current configuration.
curl -X GET "{{base_url}}/sms"curl -X POST "{{base_url}}/sms" \
-H "Content-Type: application/json" \
-d '{
"number": "+1234567890",
"message": "Hello, this is a test message!"
}'curl -X DELETE "{{base_url}}/sms/2"For additional questions or support, refer to the development team.
| Back | FazBrowse Home | New Git URL |