• 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

Contact Groups API

  • September 2, 2022
  • AmpenetSolutions
  • 0

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."
} 
  • Previous SMS API
  • Next Contacts 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