• 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 Documentation

Ampenet Solutions > SMS API Documentation

Get Started With SMS

Utilize a single SMS API integration to deliver scalable messaging to your audience.

Send a straightforward SMS text by specifying the recipient and message text, or try out a variety of extras, such as bulk sending. Use Ampenet's SMS API to swiftly, dependably, and securely provide scale messaging from your systems.

Let's Get Started
  • Contacts API
  • Contact Groups API
  • SMS API
  • Profile API

The Ampenet SMS Contacts API allows you to manage contacts identifiable by a unique random ID. You can use this ID to create, view, update, or remove contacts. This API functions as a database of customer-specific contacts, allowing you to organize them and provide custom values that you may then utilize when sending SMS template messages.

The Contacts API employs HTTP verbs and a RESTful endpoint structure, as well as an access key for API authorization. The payloads of requests and responses are represented as JSON with UTF-8 encoding and URL encoded values.

API Endpoint

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

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

Create a Contact

This method creates a new contact object. With each request, Ampenet SMS returns the newly created contact object.

API Endpoint

https://sms.ampenet.com/api/v3/contacts/{group_id}/store 

Parameters

PARAMETERREQUIREDTYPEDESCRIPTION
group_idstringContact groups uid
phonenumberThe phone number of the contact.
first_nameNostringThe first name of the contact.
last_nameNostringThe last name of the contact.

Example Request (PHP)

curl -X POST https://sms.ampenet.com/api/v3/contacts/6065ecdc9184a/store \
-H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' \
-d "phone=31612345678" 

Returns (JSON)

Returns a contact object if the request was successful.

{
    "status": "success",
    "data": "contacts 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 a Contact

Returns the contact details for an existing contact. You simply need to supply the unique contact uid and group uid that was returned when the contact or group was created or received.

API Endpoint

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

Parameters

PARAMETERREQUIREDTYPEDESCRIPTION
group_idstringContact groups uid
uidstringContact uid

Example Request (PHP)

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

Returns (JSON)

Returns a contact object if the request was successful.

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

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

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

Update a Contact

Updates an existing contact. You simply need to supply the unique contact uid and contact group uid that was returned when the contact was created.

API Endpoint

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

Parameters

PARAMETERREQUIREDTYPEDESCRIPTION
group_idstringContact groups uid
uidstringContact uid
phonenumberThe phone number of the contact.
first_nameNostringThe first name of the contact.
last_nameNostringThe last name of the contact.

Example Request (PHP)

curl -X PATCH https://sms.ampenet.com/api/v3/contacts/6065ecdc9184a/update/606732aec8705 \
-H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' \
-d "phone=31612345678" 

Returns (JSON)

Returns a contact object if the request was successful.

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

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

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

Delete a Contact

Deletes an existing contact. You only need to supply the unique contact uid and group uid that was returned upon creation.

API Endpoint

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

Parameters

PARAMETERREQUIREDTYPEDESCRIPTION
group_idstringContact groups uid
uidstringContact uid

Example Request (PHP)

curl -X DELETE https://sms.ampenet.com/api/v3/contacts/6065ecdc9184a/delete/606732aec8705 \
-H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' 

Returns (JSON)

Returns a contact object if the request was successful.

{
    "status": "success",
    "data": "contacts 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 Contacts in a Group

Lists all contacts in a group.

API Endpoint

https://sms.ampenet.com/api/v3/contacts/{group_id}/all 

Parameters

PARAMETERREQUIREDTYPEDESCRIPTION
group_idstringContact groups uid

Example Request (PHP)

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

Returns (JSON)

Returns a contact object if the request was successful.

{
    "status": "success",
    "data": "contacts data with pagination",
} 

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

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

You can use the Ampenet SMS Contact Groups API to handle contact groups that are identified by a unique random ID. This ID is used to create, view, update, and delete groups.

API Endpoint

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

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

Create a Group

Creates a new group object. With each request, Ampenet SMS returns the created group object.

API Endpoint

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

Parameters

PARAMETERREQUIREDTYPEDESCRIPTION
namestringThe name of the group.

Example Request (PHP)

curl -X POST https://sms.ampenet.com/api/v3/contacts \
-H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' \
-d "name=ampenet" 

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 a Group

Returns information about an existing group. You simply need to provide the unique group ID that was returned when the group was created or received.

API Endpoint

https://sms.ampenet.com/api/v3/contacts/{group_id}/show/ 

Parameters

PARAMETERREQUIREDTYPEDESCRIPTION
group_idstringContact groups uid

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."
} 

Update a Group

An existing group is updated. You simply need to provide the unique ID that was returned during the creation process.

API Endpoint

https://sms.ampenet.com/api/v3/contacts/{group_id} 

Parameters

PARAMETERREQUIREDTYPEDESCRIPTION
group_idstringContact groups uid
namestringNew group name

Example Request (PHP)

curl -X PATCH https://sms.ampenet.com/api/v3/contacts/6065ecdc9184a \
-H 'Authorization: Bearer 7|xs6pv2dspHJq8sWLhrpNFH5YLilMRQcVxLwSw2Sd' \
-d "name=ampenet new" 

Returns (JSON)

Returns a contact object if the request was successful.

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

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

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

Delete a Group

Deletes an existing group. You simply need to enter the unique id that was returned when the object was created.

API Endpoint

https://sms.ampenet.com/api/v3/contacts/{group_id} 

Parameters

PARAMETERREQUIREDTYPEDESCRIPTION
group_idstringContact groups uid

Example Request (PHP)

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

Returns (JSON)

Returns a contact object if the request was successful.

{
    "status": "success",
    "data": "null",
} 

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

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

View All Groups

Lists all groups.

API Endpoint

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

Example Request (PHP)

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

Returns (JSON)

Returns a contact object if the request was successful.

{
    "status": "success",
    "data": "group data with pagination",
} 

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

{
    "status": "error",
    "message" : "A human-readable description of the error."
} 
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."
} 
You can use the Ampenet SMS Profile API to access your total remaining SMS units, utilized SMS units, and profile information.

API Endpoint

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

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

View SMS Units

Viewing the SMS units information.

API Endpoint

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

Example Request (PHP)

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

Returns (JSON)

Returns a contact object if the request was successful.

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

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

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

View Profile

View profile information.

API Endpoint

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

Example Request (PHP)

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

Returns (JSON)

Returns a contact object if the request was successful.

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

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

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

Our Partners & Suppliers

Great collaborations result in great outcomes! In order to deliver on our commitment to you of excellent service, we have partnered with these fantastic brands.

Captels

Principal

RYZE

Principal

Safaricom

Principal

Airtel

Principal

Escort

Assistant Director

Halotel

Professor

Teltonika

Professor

Pod Group

Principal

Vodacom

Professor

Wialon

Vice Principal
  • Kenya
  • Tanzania

Let's Get You Started

Please fill in the form with your details and we will get you started ASAP!

SMS Volume Price Per SMS (KSH)
1 - 250000 0.50
250001 - 500000 0.45
500001+ 0.40
Network Price Per Sender ID (KSH)
Safaricom* 7000
Airtel* 7000
Telkom* 7000
*Sender ID is subject to approval by the network

Account Request Form

For us to better serve you, please tell us more about you or your company. After submission, a member of our team will contact you as soon as they can.

    Let's Get You Started

    Please fill in the form with your details and we will get you started ASAP!

    SMS Volume Price Per SMS (TSH)
    1 - 5000 25
    5001 - 25000 24
    25001 - 50000 23
    50001 - 100000 22
    100001 - 250000 20
    250001 - 500000 19
    500001+ 17
    Network Price Per Sender ID (TSH)
    All mobile networks* 0
    *Sender ID is subject to approval by the networks

    Account Request Form

    For us to better serve you, please tell us more about you or your company. After submission, a member of our team will contact you as soon as they can.

      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