MENU navbar-image

Introduction

Start (and never finish) front-end projects with this API.

This documentation aims to provide all the information you need to work with our API.

Authenticating requests

This API is not authenticated.

Account Management

APIs for managing API User accounts

Read user account

This endpoint allows you to read the profile of API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/account" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"\\/$s\\/KvL-52\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/account"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "\/$s\/KvL-52",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


{"code": "200", "status": "success", "count": 10, "account": { "fullName": "Jane Doe"}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/account

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: /$s/KvL-52

response   string   

The response type you expect on your end. Example: json|xml|csv

Change user password

This endpoint allows you to change the password of API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/account/password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"kqFj6D5U}KFOm\",
    \"newpassword\": \"repellendus\",
    \"confirmpassword\": \"nihil\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/account/password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "kqFj6D5U}KFOm",
    "newpassword": "repellendus",
    "confirmpassword": "nihil",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


{
    "code": "200",
    "status": "success",
    "msg": "Password changed successfully."
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/account/password

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: kqFj6D5U}KFOm

newpassword   string   

The password of API user. Example: repellendus

confirmpassword   string   

The password of API user. Example: nihil

response   string   

The response type you expect on your end. Example: json|xml|csv

Read user account status

This endpoint allows you to read the account status of API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/account/status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"=!g}BSkJ(U*da:(R:\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/account/status"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "=!g}BSkJ(U*da:(R:",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


{
    "code": "200",
    "status": "success",
    "count": 15,
    "account": {
        "credits": "1"
    }
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/account/status

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: =!g}BSkJ(U*da:(R:

response   string   

The response type you expect on your end. Example: json|xml|csv

Read user credit history

This endpoint allows you to read the credit history of API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/account/history" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"xz^-raJp2!!K\'(\",
    \"from\": \"facere\",
    \"to\": \"sint\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/account/history"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "xz^-raJp2!!K'(",
    "from": "facere",
    "to": "sint",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


{
    "code": "200",
    "status": "success",
    "count": 15,
    "historyList": [
        {
            "history": {
                "uuId": "123456789",
                "type": "credit",
                "balance": "3",
                "amount": "999",
                "timestamp": "2023-05-27 11:08:15"
            }
        }
    ]
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/account/history

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: xz^-raJp2!!K'(

from   string   

The minimum date range. The date format should be YYYY-MM-DD. Example: facere

to   string   

The maximum date range. The date format should be YYYY-MM-DD. Example: sint

response   string   

The response type you expect on your end. Example: json|xml|csv

Contact Group Management

APIs for managing contact groups for API User accounts

Read contact groups

This endpoint allows you to read all saved contact groups for an API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/groups" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"0F=G^g]+\\\\*Kv3\'p\'{\",
    \"id\": \"12345678\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/groups"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "0F=G^g]+\\*Kv3'p'{",
    "id": "12345678",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201, success):


{
    "code": "200",
    "status": "success",
    "message": "Contact deleted successfully."
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/groups

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: 0F=G^g]+\*Kv3'p'{

id   string   

The uuid of the contact. Example: 12345678

response   string   

The response type you expect on your end. Example: json|xml|csv

Create a contact group

This endpoint allows you to create a new contact group for an API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/groups/create" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"NK&YukO-VE\",
    \"groupname\": \"addressBookXYZ\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/groups/create"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "NK&YukO-VE",
    "groupname": "addressBookXYZ",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201, success):


{
    "code": "200",
    "status": "success",
    "message": "Contact created successfully."
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/groups/create

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: NK&YukO-VE

groupname   string   

The contact groupname. Example: addressBookXYZ

response   string   

The response type you expect on your end. Example: json|xml|csv

Update a contact group

This endpoint allows you to update a contact group for an API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/groups/update" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"BIy#*i\",
    \"groupname\": \"addressBookXYZ\",
    \"id\": \"9010a52e-b470-45a0-bf2e-5e0b2420fd5c\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/groups/update"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "BIy#*i",
    "groupname": "addressBookXYZ",
    "id": "9010a52e-b470-45a0-bf2e-5e0b2420fd5c",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201, success):


{
    "code": "200",
    "status": "success",
    "message": "Contact created successfully."
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/groups/update

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: BIy#*i

groupname   string   

The contact groupname. Example: addressBookXYZ

id   string   

The uuid of the conatc group. Example: 9010a52e-b470-45a0-bf2e-5e0b2420fd5c

response   string   

The response type you expect on your end. Example: json|xml|csv

Delete a contact group

This endpoint allows you to hard delete a contact group for an API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/groups/delete" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"xIE*[E<gb+Z\\\"\",
    \"id\": \"12345678\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/groups/delete"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "xIE*[E<gb+Z\"",
    "id": "12345678",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201, success):


{
    "code": "200",
    "status": "success",
    "message": "Contact removed successfully."
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/groups/delete

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: xIE*[E<gb+Z"

id   string   

The uuid of the conatc group. Example: 12345678

response   string   

The response type you expect on your end. Example: json|xml|csv

Contact Management

APIs for managing contacts for API User accounts

Read contacts

This endpoint allows you to read any saved contacts for an API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/contacts" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"JungleGrill\",
    \"password\": \"`&rYS:dhHCL+%\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/contacts"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "JungleGrill",
    "password": "`&rYS:dhHCL+%",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


{
    "code": "200",
    "status": "success",
    "count": 15,
    "message": "Credits withdrew successfully."
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/contacts

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: JungleGrill

password   string   

The password of API user. Example: `&rYS:dhHCL+%

response   string   

The response type you expect on your end. Example: json|xml|csv

Create a contact

This endpoint allows you to create a new contact for an API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/contacts/create" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"~C`\\\"?ycr=EPZYvt\",
    \"groupname\": \"addressBook1337\",
    \"contactname\": \"Caroline\",
    \"mobile\": \"254722100100\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/contacts/create"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "~C`\"?ycr=EPZYvt",
    "groupname": "addressBook1337",
    "contactname": "Caroline",
    "mobile": "254722100100",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201, success):


{
    "code": "200",
    "status": "success",
    "message": "Contact created successfully."
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/contacts/create

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: ~C"?ycr=EPZYvt`

groupname   string   

The name og the contact group. Example: addressBook1337

contactname   string   

The name of contact. Example: Caroline

mobile   string   

The mobile number of the contact. Example: 254722100100

response   string   

The response type you expect on your end. Example: json|xml|csv

Update a contact

This endpoint allows you to update a contact for an API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/contacts/update" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"Y!NbD>D#lWK#^?;m8:S\",
    \"groupname\": \"addressBook1337\",
    \"contactname\": \"Caroline\",
    \"mobile\": \"254722100100\",
    \"id\": \"9010a52e-b470-45a0-bf2e-5e0b2420fd5c\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/contacts/update"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "Y!NbD>D#lWK#^?;m8:S",
    "groupname": "addressBook1337",
    "contactname": "Caroline",
    "mobile": "254722100100",
    "id": "9010a52e-b470-45a0-bf2e-5e0b2420fd5c",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201, success):


{
    "code": "200",
    "status": "success",
    "message": "Contact updated successfully."
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/contacts/update

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: Y!NbD>D#lWK#^?;m8:S

groupname   string   

The name og the contact group. Example: addressBook1337

contactname   string   

The name of contact. Example: Caroline

mobile   string   

The mobile number of the contact. Example: 254722100100

id   string   

The uuid of the contact. Example: 9010a52e-b470-45a0-bf2e-5e0b2420fd5c

response   string   

The response type you expect on your end. Example: json|xml|csv

Delete a contact

This endpoint allows you to hard delete a contact for an API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/contacts/delete" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"MPPmZX5k\",
    \"id\": \"12345678\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/contacts/delete"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "MPPmZX5k",
    "id": "12345678",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201, success):


{
    "code": "200",
    "status": "success",
    "message": "Contact deleted successfully."
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/contacts/delete

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: MPPmZX5k

id   string   

The uuid of the contact. Example: 12345678

response   string   

The response type you expect on your end. Example: json|xml|csv

Credit Management

APIs for managing credits for API User accounts

Add user credit

This endpoint allows you to add credits for an API user.

Example request:
curl --request GET \
    --get "https://sms.ghatechnologies.info/api/v1/credits/add" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"MYDAWA\",
    \"password\": \"d_\\\"67\\\")28F2E!^\\/CP,Bj\",
    \"customer\": \"mydawa\",
    \"smscredits\": \"120\",
    \"mpesaid\": \"REQ4GADVUO\",
    \"offering\": \"SMS,Voice,USSD,2WaySMS,PremiumSMS\",
    \"type\": \"purchases,adjustments\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/credits/add"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "MYDAWA",
    "password": "d_\"67\")28F2E!^\/CP,Bj",
    "customer": "mydawa",
    "smscredits": "120",
    "mpesaid": "REQ4GADVUO",
    "offering": "SMS,Voice,USSD,2WaySMS,PremiumSMS",
    "type": "purchases,adjustments",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


{
    "code": "200",
    "status": "success",
    "count": 15,
    "message": "Credits added successfully."
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

GET api/v1/credits/add

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: MYDAWA

password   string   

The password of API user. Example: d_"67")28F2E!^/CP,Bj

customer   string   

The username of API user. Example: mydawa

smscredits   string   

The credits to add. Example: 120

mpesaid   string   

The transaction id of LIPA NA MPESA transaction. Example: REQ4GADVUO

offering   string   

The product you are adding credits for. Example: SMS,Voice,USSD,2WaySMS,PremiumSMS

type   string   

The type of action. Example: purchases,adjustments

response   string   

The response type you expect on your end. Example: json|xml|csv

Remove user credit

This endpoint allows you to withdrawal credits for an API user.

Example request:
curl --request GET \
    --get "https://sms.ghatechnologies.info/api/v1/credits/remove" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"JungleGrill\",
    \"password\": \"w`q~1d.\\/6L4X,^^N\",
    \"customer\": \"junglegrill\",
    \"smscredits\": \"120\",
    \"mpesaid\": \"REQ4GADVUO\",
    \"offering\": \"SMS,Voice,USSD,2WaySMS,PremiumSMS\",
    \"type\": \"purchases,adjustments\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/credits/remove"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "JungleGrill",
    "password": "w`q~1d.\/6L4X,^^N",
    "customer": "junglegrill",
    "smscredits": "120",
    "mpesaid": "REQ4GADVUO",
    "offering": "SMS,Voice,USSD,2WaySMS,PremiumSMS",
    "type": "purchases,adjustments",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


{
    "code": "200",
    "status": "success",
    "count": 15,
    "message": "Credits withdrew successfully."
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

GET api/v1/credits/remove

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: JungleGrill

password   string   

The password of API user. Example: wq~1d./6L4X,^^N`

customer   string   

The username of API user. Example: junglegrill

smscredits   string   

The credits to add. Example: 120

mpesaid   string   

The transaction id of LIPA NA MPESA transaction. Example: REQ4GADVUO

offering   string   

The product you are removing credits for. Example: SMS,Voice,USSD,2WaySMS,PremiumSMS

type   string   

The type of action. Example: purchases,adjustments

response   string   

The response type you expect on your end. Example: json|xml|csv

Endpoints

Healthcheck

Check that the service is up. If everything is okay, you'll get a 200 OK response.

Otherwise, the request will fail with a 400 error, and a response listing the failed services.

Example request:
curl --request GET \
    --get "https://sms.ghatechnologies.info/api/healthcheck" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://sms.ghatechnologies.info/api/healthcheck"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
access-control-allow-headers: Origin, Content-Type, Content-Range, Content-Disposition, Content-Description, X-Auth-Token
access-control-expose-headers: *
access-control-allow-credentials: true
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
 

{
    "status": "up",
    "services": {
        "database": "up",
        "redis": "up"
    }
}
 

Example response (400, Service is unhealthy):


{
    "status": "down",
    "services": {
        "database": "up",
        "redis": "down"
    }
}
 

Request      

GET api/healthcheck

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Response

Response Fields

status   string   

The status of this API (up or down).

services   object   

Map of each downstream service and their status (up or down).

Group SMS Management

APIs for managing the sending of group messages (BulkSMS, TwoWaySMS, PremiumSMS) for API User accounts

Send quick sms to a group

This endpoint allows you to send an sms (BulkSMS, TwoWaySMS, PremiumSMS) for an API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/group/send" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"ud\'7.ZAka[w}\'\",
    \"groupname\": \"et\",
    \"senderid\": \"facere\",
    \"message\": \"Dear Customer, Happy Mother\'s Day!\",
    \"type\": \"unicode|text|link\",
    \"response\": \"json|xml|csv\",
    \"mobile\": \"256712389009\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/group/send"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "ud'7.ZAka[w}'",
    "groupname": "et",
    "senderid": "facere",
    "message": "Dear Customer, Happy Mother's Day!",
    "type": "unicode|text|link",
    "response": "json|xml|csv",
    "mobile": "256712389009"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


{
    "code": "200",
    "status": "success",
    "message": "Group SMS sent successfully.",
    "transaction_id": "44542c3d-2da9-4499-ad1c-fd8496c515cf",
    "datetime": "2023-05-27 11:08:15"
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/group/send

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: ud'7.ZAka[w}'

groupname   string   

Example: et

senderid   string   

Example: facere

message   string   

The message to send. Example: Dear Customer, Happy Mother's Day!

type   string   

The type of the message. Example: unicode|text|link

response   string   

The response type you expect on your end. Example: json|xml|csv

mobile   string   

The mobile number of your contact. Example: 256712389009

Send scheduled sms to a contact group

This endpoint allows you to send a scheduled sms (BulkSMS, TwoWaySMS, PremiumSMS) for an API user.

Duplicates are not allowed.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/group/schedule" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"{h\\\\>ec0,1J&c*-K[Gq\",
    \"senderid\": \"senderIdXYZ\",
    \"mobile\": \"256712389009\",
    \"message\": \"Dear Customer, Happy Mother\'s Day! We have an offer for all sales over $2000. Thank you.\",
    \"schedule\": \"fugiat\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/group/schedule"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "{h\\>ec0,1J&c*-K[Gq",
    "senderid": "senderIdXYZ",
    "mobile": "256712389009",
    "message": "Dear Customer, Happy Mother's Day! We have an offer for all sales over $2000. Thank you.",
    "schedule": "fugiat",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


{
    "code": "200",
    "status": "success",
    "message": "Group Scheduled SMS created successfully.",
    "transaction_id": "44542c3d-2da9-4499-ad1c-fd8496c515cf",
    "datetime": "2023-05-27 11:08:15"
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/group/schedule

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: {h\>ec0,1J&c*-K[Gq

senderid   string   

The sender id of API user. Example: senderIdXYZ

mobile   string   

The mobile number of your contact. Example: 256712389009

message   string   

The message to send. Example: Dear Customer, Happy Mother's Day! We have an offer for all sales over $2000. Thank you.

schedule   string   

Example: fugiat

response   string   

The response type you expect on your end. Example: json|xml|csv

This endpoint allows you to send a contact group, a full smartlink url, in an sms (BulkSMS, TwoWaySMS, PremiumSMS) for an API user.

Duplicates are not allowed.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/group/smartlink" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"7[E\\/\\\"V+\\/-!Y@vp\",
    \"senderid\": \"senderIdXYZ\",
    \"mobile\": \"256712389009\",
    \"smartlinktitle\": \"Mother\'s Day Special\",
    \"message\": \"Dear Customer, Happy Mother\'s Day! We have an offer for all sales over $2000. Thank you.\",
    \"smartlink\": \"bit.ly\\/1O7QxvX\",
    \"type\": \"unicode|text|link\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/group/smartlink"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "7[E\/\"V+\/-!Y@vp",
    "senderid": "senderIdXYZ",
    "mobile": "256712389009",
    "smartlinktitle": "Mother's Day Special",
    "message": "Dear Customer, Happy Mother's Day! We have an offer for all sales over $2000. Thank you.",
    "smartlink": "bit.ly\/1O7QxvX",
    "type": "unicode|text|link",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


{
    "code": "200",
    "status": "success",
    "message": "Group Smartlink SMS sent successfully.",
    "transaction_id": "44542c3d-2da9-4499-ad1c-fd8496c515cf",
    "datetime": "2023-05-27 11:08:15"
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Report Management

APIs for managing reports for all offerings (BulkSMS, TwoWaySMS, PremiumSMS) for API User accounts

Read sms summary

This endpoint allows you to read sms summary for an API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/reports/sms/summary" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"z\\\"`hX`\",
    \"from\": \"dolor\",
    \"to\": \"natus\",
    \"sortBy\": \"quas\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/reports/sms/summary"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "z\"`hX`",
    "from": "dolor",
    "to": "natus",
    "sortBy": "quas",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201, success):


{"code": "200", "status": "success", "count": 100, "templates": [{ "summary": { "total": "99", "sent": "10", "delivered": "2", "bounced": "34", "pending": "1" } ]}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/reports/sms/summary

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: z"hX``

from   string   

The minimum date range. The date format should be YYYY-MM-DD. Example: dolor

to   string   

The maximum date range. The date format should be YYYY-MM-DD. Example: natus

sortBy   string   

Example: quas

response   string   

The response type you expect on your end. Example: json|xml|csv

Get Message Status

This endpoint allows you to check status of a text message by UUID for an API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/reports/sms/status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"kg+iTG<F|p\",
    \"uuid\": \"73700fef-9227-3c8d-ab19-99a10cf364d2\",
    \"from\": \"et\",
    \"to\": \"esse\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/reports/sms/status"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "kg+iTG<F|p",
    "uuid": "73700fef-9227-3c8d-ab19-99a10cf364d2",
    "from": "et",
    "to": "esse",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201, success):


{"code": "200", "status": "success", "count": 100, "templates": [{ "summary": { "total": "99", "sent": "10", "delivered": "2", "bounced": "34", "pending": "1" } ]}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/reports/sms/status

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: kg+iTG<F|p

uuid   string   

The password of API user. Example: 73700fef-9227-3c8d-ab19-99a10cf364d2

from   string   

The minimum date range. The date format should be YYYY-MM-DD. Example: et

to   string   

The maximum date range. The date format should be YYYY-MM-DD. Example: esse

response   string   

The response type you expect on your end. Example: json|xml|csv

SMS Management

APIs for managing the sending of contact messages (BulkSMS, TwoWaySMS, PremiumSMS) for API User accounts

Send a quick sms

This endpoint allows you to send an sms (BulkSMS, TwoWaySMS, PremiumSMS) for an API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/quick/send" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"CE~.[GOo%R+F]~\",
    \"message\": \"Dear Customer, Happy Mother\'s Day!\",
    \"senderid\": \"senderIdXYZ\",
    \"type\": \"unicode|text|link\",
    \"response\": \"json|xml|csv\",
    \"mobile\": \"256712389009\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/quick/send"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "CE~.[GOo%R+F]~",
    "message": "Dear Customer, Happy Mother's Day!",
    "senderid": "senderIdXYZ",
    "type": "unicode|text|link",
    "response": "json|xml|csv",
    "mobile": "256712389009"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


{
    "code": "200",
    "status": "success",
    "message": "SMS sent successfully.",
    "transaction_id": "44542c3d-2da9-4499-ad1c-fd8496c515cf",
    "datetime": "2023-05-27 11:08:15"
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/quick/send

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: CE~.[GOo%R+F]~

message   string   

The message to send. Example: Dear Customer, Happy Mother's Day!

senderid   string   

The sender id of API user. Example: senderIdXYZ

type   string   

The type of the message. Example: unicode|text|link

response   string   

The response type you expect on your end. Example: json|xml|csv

mobile   string   

The mobile number of your contact. Example: 256712389009

Send scheduled sms

This endpoint allows you to send a scheduled sms (BulkSMS, TwoWaySMS, PremiumSMS) for an API user.

Duplicates are not allowed.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/quick/schedule" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"6Wxo<TZ6.x:E.hiR\",
    \"senderid\": \"senderIdXYZ\",
    \"mobile\": \"256712389009\",
    \"message\": \"Dear Customer, Happy Mother\'s Day! We have an offer for all sales over $2000. Thank you.\",
    \"schedule\": \"rem\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/quick/schedule"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "6Wxo<TZ6.x:E.hiR",
    "senderid": "senderIdXYZ",
    "mobile": "256712389009",
    "message": "Dear Customer, Happy Mother's Day! We have an offer for all sales over $2000. Thank you.",
    "schedule": "rem",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


{
    "code": "200",
    "status": "success",
    "message": "Smartlink SMS sent successfully.",
    "transaction_id": "44542c3d-2da9-4499-ad1c-fd8496c515cf",
    "datetime": "2023-05-27 11:08:15"
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/quick/schedule

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: 6Wxo<TZ6.x:E.hiR

senderid   string   

The sender id of API user. Example: senderIdXYZ

mobile   string   

The mobile number of your contact. Example: 256712389009

message   string   

The message to send. Example: Dear Customer, Happy Mother's Day! We have an offer for all sales over $2000. Thank you.

schedule   string   

Example: rem

response   string   

The response type you expect on your end. Example: json|xml|csv

This endpoint allows you to send a full smartlink url in an sms (BulkSMS, TwoWaySMS, PremiumSMS) for an API user.

Duplicates are not allowed.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/quick/smartlink" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"lO(nJSzwzG@1\\\"Y)y7)b>\",
    \"senderid\": \"senderIdXYZ\",
    \"mobile\": \"256712389009\",
    \"smartlinktitle\": \"Mother\'s Day Special\",
    \"message\": \"Dear Customer, Happy Mother\'s Day! We have an offer for all sales over $2000. Thank you.\",
    \"smartlink\": \"bit.ly\\/1O7QxvX\",
    \"type\": \"unicode|text|link\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/quick/smartlink"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "lO(nJSzwzG@1\"Y)y7)b>",
    "senderid": "senderIdXYZ",
    "mobile": "256712389009",
    "smartlinktitle": "Mother's Day Special",
    "message": "Dear Customer, Happy Mother's Day! We have an offer for all sales over $2000. Thank you.",
    "smartlink": "bit.ly\/1O7QxvX",
    "type": "unicode|text|link",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


{
    "code": "200",
    "status": "success",
    "message": "Smartlink SMS sent successfully.",
    "transaction_id": "44542c3d-2da9-4499-ad1c-fd8496c515cf",
    "datetime": "2023-05-27 11:08:15"
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

SMS Message Template

APIs for managing message templates (BulkSMS, TwoWaySMS, PremiumSMS) for API User accounts

Read message templates

This endpoint allows you to read message templates for an API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/templates" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"cNDxTFTbT6!J\",
    \"senderid\": \"delectus\",
    \"trashed\": true,
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/templates"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "cNDxTFTbT6!J",
    "senderid": "delectus",
    "trashed": true,
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201, success):


{
    "code": "200",
    "status": "success",
    "count": 100,
    "templates": [],
    "datetime": "2021-09-14 13:11:41"
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (401, invalid_request_error):


{ "code": 401, "type": "invalid_request_error", "error": [ "Unauthorised" ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/templates

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: cNDxTFTbT6!J

senderid   string   

Example: delectus

trashed   boolean   

The flag to include deleted templates in query results. Example: true

response   string   

The response type you expect on your end. Example: json|xml|csv

Create a message template

This endpoint allows you to create a new message templates for an API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/templates/create" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"3$zHzx\",
    \"senderid\": \"quia\",
    \"externaluid\": \"fastapi_restapi_sms_template001.\",
    \"template\": \"Invoice No. 00123 sent.\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/templates/create"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "3$zHzx",
    "senderid": "quia",
    "externaluid": "fastapi_restapi_sms_template001.",
    "template": "Invoice No. 00123 sent.",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201, success):


{
    "code": "200",
    "status": "success",
    "template": "Message Templated created successfully."
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (401, invalid_request_error):


{ "code": 401, "type": "invalid_request_error", "error": [ "Unauthorised" ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/templates/create

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: 3$zHzx

senderid   string   

Example: quia

externaluid   string   

External Unique Identifier from your own application. Example: fastapi_restapi_sms_template001.

template   string   

The message. Example: Invoice No. 00123 sent.

response   string   

The response type you expect on your end. Example: json|xml|csv

Update a message template

This endpoint allows you to update an existing message templates for an API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/templates/update" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"f#;!@FkYh\\\\9@n\",
    \"senderid\": \"voluptatem\",
    \"externaluid\": \"fastapi_restapi_sms_template001.\",
    \"template\": \"Invoice No. 00123 sent.\",
    \"status\": \"fugit\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/templates/update"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "f#;!@FkYh\\9@n",
    "senderid": "voluptatem",
    "externaluid": "fastapi_restapi_sms_template001.",
    "template": "Invoice No. 00123 sent.",
    "status": "fugit",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


{
    "code": "200",
    "status": "success",
    "message": "Message Templated created successfully."
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (401, invalid_request_error):


{ "code": 401, "type": "invalid_request_error", "error": [ "Unauthorised" ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/templates/update

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: f#;!@FkYh\9@n

senderid   string   

Example: voluptatem

externaluid   string   

External Unique Identifier from your own application. Example: fastapi_restapi_sms_template001.

template   string   

The message. Example: Invoice No. 00123 sent.

status   string  optional  

Example: fugit

response   string   

The response type you expect on your end. Example: json|xml|csv

Delete a message template

This endpoint allows you to hard delete an existing message templates for an API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/templates/delete" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \">hK_b\\/NH2\",
    \"senderid\": \"ut\",
    \"externaluid\": \"fastapi_restapi_sms_template001.\",
    \"response\": \"json|xml|csv\",
    \"template\": \"Invoice No. 00123 sent.\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/templates/delete"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": ">hK_b\/NH2",
    "senderid": "ut",
    "externaluid": "fastapi_restapi_sms_template001.",
    "response": "json|xml|csv",
    "template": "Invoice No. 00123 sent."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


{
    "code": "200",
    "status": "success",
    "template": "Message Template with externaluid nestjs_api_message192 has been deleted successfully."
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (401, invalid_request_error):


{ "code": 401, "type": "invalid_request_error", "error": [ "Unauthorised" ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/templates/delete

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: >hK_b/NH2

senderid   string   

Example: ut

externaluid   string   

External Unique Identifier from your own application. Example: fastapi_restapi_sms_template001.

response   string   

The response type you expect on your end. Example: json|xml|csv

template   string   

The message. Example: Invoice No. 00123 sent.

Schedule SMS Management

APIs for managing the scheduling of messages (BulkSMS, TwoWaySMS, PremiumSMS) for API User accounts

Read all scheduled smses

This endpoint allows you to read scheduled sms (BulkSMS, TwoWaySMS, PremiumSMS) for an API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/scheduled" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"U8ACa3\'X^Mdma9$G(K\",
    \"from\": \"commodi\",
    \"to\": \"consequatur\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/scheduled"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "U8ACa3'X^Mdma9$G(K",
    "from": "commodi",
    "to": "consequatur",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


{
    "code": "200",
    "status": "success",
    "count": 100,
    "scheduledsms": [
        {
            "schedule": {
                "uuid": "1234567",
                "status": "pending",
                "total": "1",
                "datetime": "2023-05-27 11:08:15",
                "scheduled_at": "2023-05-28 12:48:00"
            }
        }
    ]
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/scheduled

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: U8ACa3'X^Mdma9$G(K

from   string   

The minimum date range. The date format should be YYYY-MM-DD. Example: commodi

to   string   

The maximum date range. The date format should be YYYY-MM-DD. Example: consequatur

response   string   

The response type you expect on your end. Example: json|xml|csv

Update a scheduled sms

This endpoint allows you to update scheduled sms (BulkSMS, TwoWaySMS, PremiumSMS) for an API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/scheduled/update" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"9mqyM5sAX<o\\\\%ROZE\",
    \"schedule\": \"2023-05-27 11:08:15\",
    \"id\": \"9010a52e-b470-45a0-bf2e-5e0b2420fd5c\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/scheduled/update"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "9mqyM5sAX<o\\%ROZE",
    "schedule": "2023-05-27 11:08:15",
    "id": "9010a52e-b470-45a0-bf2e-5e0b2420fd5c",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


{
    "code": "200",
    "status": "success",
    "message": "Scheduled SMS updated successfully."
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/scheduled/update

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: 9mqyM5sAX<o\%ROZE

schedule   string   

The schedule datetime id. You should use the format YYYY-MM-DD HH:MM:SS. Example: 2023-05-27 11:08:15

id   string   

The scheduled sms id. Example: 9010a52e-b470-45a0-bf2e-5e0b2420fd5c

response   string   

The response type you expect on your end. Example: json|xml|csv

Delete a scheduled sms

This endpoint allows you to delete a scheduled sms (BulkSMS, TwoWaySMS, PremiumSMS) for an API user.

Example request:
curl --request POST \
    "https://sms.ghatechnologies.info/api/v1/scheduled/delete" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"username\": \"apiUsername\",
    \"password\": \"u5l4nl_I.K\\/GK\'d{=\",
    \"id\": \"9010a52e-b470-45a0-bf2e-5e0b2420fd5c\",
    \"response\": \"json|xml|csv\"
}"
const url = new URL(
    "https://sms.ghatechnologies.info/api/v1/scheduled/delete"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "username": "apiUsername",
    "password": "u5l4nl_I.K\/GK'd{=",
    "id": "9010a52e-b470-45a0-bf2e-5e0b2420fd5c",
    "response": "json|xml|csv"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200, success):


{
    "code": "200",
    "status": "success",
    "message": "Scheduled SMS deleted successfully."
}
 

Example response (400, invalid_request_error):


{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }
 

Example response (500, api_error):


{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam's end." , "datetime": "2023-05-27 11:08:15" } }
 

Request      

POST api/v1/scheduled/delete

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

username   string   

The username of API user. Example: apiUsername

password   string   

The password of API user. Example: u5l4nl_I.K/GK'd{=

id   string   

The scheduled sms id. Example: 9010a52e-b470-45a0-bf2e-5e0b2420fd5c

response   string   

The response type you expect on your end. Example: json|xml|csv