• Home
  • About Us
  • IT & Digital Solutions
    • Website Design & Development
    • Web & Mobile Applications
    • ICT Consultancy
    • Bulk SMS
  • Weighing Systems & Software
  • SiriTrack
  • SYSTEM LOGIN
    • GPS Tracking System
    • Video Telematics System
    • Bulk SMS Application
Ampenet Solutions
    • Home
    • About Us
    • IT & Digital Solutions
      • Website Design & Development
      • Web & Mobile Applications
      • ICT Consultancy
      • Bulk SMS
    • Weighing Systems & Software
    • SiriTrack
    • SYSTEM LOGIN
      • GPS Tracking System
      • Video Telematics System
      • Bulk SMS Application
  • info@ampenet.com
  • +255 710 867 157
Ampenet Solutions
Ampenet Solutions
  • Home
  • About Us
  • IT & Digital Solutions
    • Website Design & Development
    • Web & Mobile Applications
    • ICT Consultancy
    • Bulk SMS
  • Weighing Systems & Software
  • SiriTrack
  • SYSTEM LOGIN
    • GPS Tracking System
    • Video Telematics System
    • Bulk SMS Application

SMS API

  • September 2, 2022
  • AmpenetSolutions
  • 0
Through a REST API, our SMS API allows you to send and receive SMS messages to and from any country in the world. Each message is assigned a unique random ID, allowing users to always check the status of a message using the provided API.

API Endpoint

https://sms.ampenet.com/api/v3/sms/send 

Parameters

PARAMETERREQUIREDDESCRIPTION
AuthorizationWhen calling our API, send your api token with the authentication type set as Bearer (Example: Authorization: Bearer {api_token})
AcceptSet to application/json

Send An Outbound SMS

The Programmable SMS API from Ampenet SMS allows you to send SMS messages from your web application programmatically. You must first build a new message object. With each request, Ampenet SMS returns the produced message object.

Use this example request to send your first SMS message.

API Endpoint

https://sms.ampenet.com/api/v3/sms/send 

Parameters

PARAMETERREQUIREDTYPEDESCRIPTION
recipientstringNumber to send message. Use a comma (,) to send multiple numbers. Ex. 255712345678,255712876543
sender_idstringThe sender of the message. This can be a telephone number (including country code) or an alphanumeric string. In the case of an alphanumeric string, the maximum length is 11 characters.
typestringThe type of the message. For text messages, you have to insert plain as sms type.
messagestringThe body of the SMS message.
schedule_timedatetimeThe scheduled date and time of the message in RFC3339 format (Y-m-d H:i)

Example Request for a Single Number (PHP)

curl -X POST https://sms.ampenet.com/api/v3/sms/send \
-H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' \
-d "recipient=255712345678" \
-d "sender_id=YourName" \
-d "type=plain" \
-d "schedule_time=2021-12-20 07:00" \
-d "message=This is a test message" 

Example Request for Multiple Numbers (PHP)

curl -X POST https://sms.ampenet.com/api/v3/sms/send \
-H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' \
-d "recipient=254712345678,254712876543" \
-d "sender_id=YourName" \
-d "type=plain" \
-d "schedule_time=2021-12-20 07:00" \
-d "message=This is a test message" 

Returns (JSON)

Returns a contact object if the request was successful.

{
    "status": "success",
    "data": "sms reports with all details",
} 

If the request failed, an error object will be returned.

{
    "status": "error",
    "message" : "A human-readable description of the error."
} 

View An SMS

Our SMS API can be used to get information from an existing inbound or outgoing SMS message. You simply need to provide the unique message id that was returned when the message was created or received.

API Endpoint

https://sms.ampenet.com/api/v3/sms/{uid} 

Parameters

PARAMETERREQUIREDTYPEDESCRIPTION
uidstringA unique random uid which is created on the Ampenet SMS platform and is returned upon creation of the object.

Example Request (PHP)

curl -X POST https://sms.ampenet.com/api/v3/contacts/6065ecdc9184a/show \
-H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' 

Returns (JSON)

Returns a contact object if the request was successful.

{
    "status": "success",
    "data": "group data with all details",
} 

If the request failed, an error object will be returned.

{
    "status": "error",
    "message" : "A human-readable description of the error."
} 

View All Messages

View all messages.

API Endpoint

https://sms.ampenet.com/api/v3/sms/ 

Example Request (PHP)

curl -X GET https://sms.ampenet.com/api/v3/sms \
-H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' 

Returns (JSON)

Returns a contact object if the request was successful.

{
    "status": "success",
    "data": "sms reports with pagination",
} 

If the request failed, an error object will be returned.

{
    "status": "error",
    "message" : "A human-readable description of the error."
} 
  • Previous Profile API
  • Next Contact Groups API
Ampenet Solutions

Subscribe to our newsletter

About Us

Your success is our success and that is why we put emphasis in solution implimentations that are optimized to deliver you the most returns on investment and sustain your business in the long-term.

Kenya

   PCEA Flats, Block B, B1,
Jabavu Road, Hurlingham,
Nairobi, Kenya

   (254) 740 855 082

   info@ampenet.com

   tracking@ampenet.com

Tanzania

   1st Floor, 397 Capial Plaza, Mwai Kibaki Rd, Mbezi Beach, Dar es Salaam.

   (255) 710 867 157

   info@ampenet.com

   tracking@ampenet.com

Useful Links

  •    About Us
  •    GPS Tracking & Fleet Management
  •    Web & Digital Solutions
  •    Bulk SMS Solutions
  •    ICT Consultancy

© 2023 | Ampenet Solutions