openapi: 3.0.3
info:
title: 'REST API Documentation for GHA Technologies SMS Platform'
description: 'Start (and never finish) front-end projects with this API.'
version: 1.0.0
servers:
-
url: 'https://sms.ghatechnologies.info'
tags:
-
name: 'Account Management'
description: "\nAPIs for managing API User accounts"
-
name: 'Contact Group Management'
description: "\nAPIs for managing contact groups for API User accounts"
-
name: 'Contact Management'
description: "\nAPIs for managing contacts for API User accounts"
-
name: 'Credit Management'
description: "\nAPIs for managing credits for API User accounts"
-
name: Endpoints
description: ''
-
name: 'Group SMS Management'
description: "\nAPIs for managing the sending of group messages (BulkSMS, TwoWaySMS, PremiumSMS) for API User accounts"
-
name: 'Report Management'
description: "\nAPIs for managing reports for all offerings (BulkSMS, TwoWaySMS, PremiumSMS) for API User accounts"
-
name: 'SMS Management'
description: "\nAPIs for managing the sending of contact messages (BulkSMS, TwoWaySMS, PremiumSMS) for API User accounts"
-
name: 'SMS Message Template'
description: "\nAPIs for managing message templates (BulkSMS, TwoWaySMS, PremiumSMS) for API User accounts"
-
name: 'Schedule SMS Management'
description: "\nAPIs for managing the scheduling of messages (BulkSMS, TwoWaySMS, PremiumSMS) for API User accounts"
paths:
/api/v1/account:
post:
summary: 'Read user account'
operationId: readUserAccount
description: "This endpoint allows you to read the profile of API user.\n\n"
parameters: []
responses:
200:
description: success
content:
text/plain:
schema:
type: string
example: '{"code": "200", "status": "success", "count": 10, "account": { "fullName": "Jane Doe"}'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'Account Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- response
security: []
/api/v1/account/password:
post:
summary: 'Change user password'
operationId: changeUserPassword
description: "This endpoint allows you to change the password of API user.\n\n"
parameters: []
responses:
200:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
msg: 'Password changed successfully.'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
msg:
type: string
example: 'Password changed successfully.'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'Account Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
newpassword:
type: string
description: 'The password of API user.'
example: consequatur
nullable: false
confirmpassword:
type: string
description: 'The password of API user.'
example: consequatur
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- newpassword
- confirmpassword
- response
security: []
/api/v1/account/status:
post:
summary: 'Read user account status'
operationId: readUserAccountStatus
description: "This endpoint allows you to read the account status of API user.\n\n"
parameters: []
responses:
200:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
count: 15
account:
credits: '1'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
count:
type: integer
example: 15
account:
type: object
properties:
credits:
type: string
example: '1'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'Account Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- response
security: []
/api/v1/account/history:
post:
summary: 'Read user credit history'
operationId: readUserCreditHistory
description: "This endpoint allows you to read the credit history of API user.\n\n"
parameters: []
responses:
200:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
count: 15
historyList:
-
history:
uuId: '123456789'
type: credit
balance: '3'
amount: '999'
timestamp: '2023-05-27 11:08:15'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
count:
type: integer
example: 15
historyList:
type: array
example:
-
history:
uuId: '123456789'
type: credit
balance: '3'
amount: '999'
timestamp: '2023-05-27 11:08:15'
items:
type: object
properties:
history:
type: object
properties:
uuId:
type: string
example: '123456789'
type:
type: string
example: credit
balance:
type: string
example: '3'
amount:
type: string
example: '999'
timestamp:
type: string
example: '2023-05-27 11:08:15'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'Account Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- response
security: []
/api/v1/groups:
post:
summary: 'Read contact groups'
operationId: readContactGroups
description: "This endpoint allows you to read all saved contact groups for an API user.\n\n"
parameters: []
responses:
201:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
message: 'Contact deleted successfully.'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
message:
type: string
example: 'Contact deleted successfully.'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'Contact Group Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- response
security: []
/api/v1/groups/create:
post:
summary: 'Create a contact group'
operationId: createAContactGroup
description: "This endpoint allows you to create a new contact group for an API user.\n\n"
parameters: []
responses:
201:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
message: 'Contact created successfully.'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
message:
type: string
example: 'Contact created successfully.'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'Contact Group Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
groupname:
type: string
description: 'The contact groupname.'
example: addressBookXYZ
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- groupname
- response
security: []
/api/v1/groups/update:
post:
summary: 'Update a contact group'
operationId: updateAContactGroup
description: "This endpoint allows you to update a contact group for an API user.\n\n"
parameters: []
responses:
201:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
message: 'Contact created successfully.'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
message:
type: string
example: 'Contact created successfully.'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'Contact Group Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
groupname:
type: string
description: 'The contact groupname.'
example: addressBookXYZ
nullable: false
id:
type: string
description: 'The uuid of the conatc group.'
example: 9010a52e-b470-45a0-bf2e-5e0b2420fd5c
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- groupname
- id
- response
security: []
/api/v1/groups/delete:
post:
summary: 'Delete a contact group'
operationId: deleteAContactGroup
description: "This endpoint allows you to hard delete a contact group for an API user.\n\n"
parameters: []
responses:
201:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
message: 'Contact removed successfully.'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
message:
type: string
example: 'Contact removed successfully.'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'Contact Group Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
id:
type: string
description: 'The uuid of the conatc group.'
example: '12345678'
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- id
- response
security: []
/api/v1/contacts:
post:
summary: 'Read contacts'
operationId: readContacts
description: "This endpoint allows you to read any saved contacts for an API user.\n\n"
parameters: []
responses:
200:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
count: 15
message: 'Credits withdrew successfully.'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
count:
type: integer
example: 15
message:
type: string
example: 'Credits withdrew successfully.'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'Contact Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: JungleGrill
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- response
security: []
/api/v1/contacts/create:
post:
summary: 'Create a contact'
operationId: createAContact
description: "This endpoint allows you to create a new contact for an API user.\n\n"
parameters: []
responses:
201:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
message: 'Contact created successfully.'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
message:
type: string
example: 'Contact created successfully.'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'Contact Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
groupname:
type: string
description: 'The name og the contact group.'
example: addressBook1337
nullable: false
contactname:
type: string
description: 'The name of contact.'
example: Caroline
nullable: false
mobile:
type: string
description: 'The mobile number of the contact.'
example: '254722100100'
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- groupname
- contactname
- mobile
- response
security: []
/api/v1/contacts/update:
post:
summary: 'Update a contact'
operationId: updateAContact
description: "This endpoint allows you to update a contact for an API user.\n\n"
parameters: []
responses:
201:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
message: 'Contact updated successfully.'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
message:
type: string
example: 'Contact updated successfully.'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'Contact Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
groupname:
type: string
description: 'The name og the contact group.'
example: addressBook1337
nullable: false
contactname:
type: string
description: 'The name of contact.'
example: Caroline
nullable: false
mobile:
type: string
description: 'The mobile number of the contact.'
example: '254722100100'
nullable: false
id:
type: string
description: 'The uuid of the contact.'
example: 9010a52e-b470-45a0-bf2e-5e0b2420fd5c
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- groupname
- contactname
- mobile
- id
- response
security: []
/api/v1/contacts/delete:
post:
summary: 'Delete a contact'
operationId: deleteAContact
description: "This endpoint allows you to hard delete a contact for an API user.\n\n"
parameters: []
responses:
201:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
message: 'Contact deleted successfully.'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
message:
type: string
example: 'Contact deleted successfully.'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'Contact Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
id:
type: string
description: 'The uuid of the contact.'
example: '12345678'
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- id
- response
security: []
/api/v1/credits/add:
get:
summary: 'Add user credit'
operationId: addUserCredit
description: "This endpoint allows you to add credits for an API user.\n\n"
parameters: []
responses:
200:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
count: 15
message: 'Credits added successfully.'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
count:
type: integer
example: 15
message:
type: string
example: 'Credits added successfully.'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'Credit Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: MYDAWA
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
customer:
type: string
description: 'The username of API user.'
example: mydawa
nullable: false
smscredits:
type: string
description: 'The credits to add.'
example: '120'
nullable: false
mpesaid:
type: string
description: 'The transaction id of LIPA NA MPESA transaction.'
example: REQ4GADVUO
nullable: false
offering:
type: string
description: 'The product you are adding credits for.'
example: 'SMS,Voice,USSD,2WaySMS,PremiumSMS'
nullable: false
type:
type: string
description: 'The type of action.'
example: 'purchases,adjustments'
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- customer
- smscredits
- mpesaid
- offering
- type
- response
security: []
/api/v1/credits/remove:
get:
summary: 'Remove user credit'
operationId: removeUserCredit
description: "This endpoint allows you to withdrawal credits for an API user.\n\n"
parameters: []
responses:
200:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
count: 15
message: 'Credits withdrew successfully.'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
count:
type: integer
example: 15
message:
type: string
example: 'Credits withdrew successfully.'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'Credit Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: JungleGrill
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
customer:
type: string
description: 'The username of API user.'
example: junglegrill
nullable: false
smscredits:
type: string
description: 'The credits to add.'
example: '120'
nullable: false
mpesaid:
type: string
description: 'The transaction id of LIPA NA MPESA transaction.'
example: REQ4GADVUO
nullable: false
offering:
type: string
description: 'The product you are removing credits for.'
example: 'SMS,Voice,USSD,2WaySMS,PremiumSMS'
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- customer
- smscredits
- mpesaid
- offering
- response
security: []
/api/healthcheck:
get:
summary: Healthcheck
operationId: healthcheck
description: "Check that the service is up. If everything is okay, you'll get a 200 OK response.\n\nOtherwise, the request will fail with a 400 error, and a response listing the failed services."
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
status: up
services:
database: up
redis: up
properties:
status:
type: string
example: up
description: 'The status of this API (`up` or `down`).'
enum: []
services:
type: object
properties:
database:
type: string
example: up
redis:
type: string
example: up
description: 'Map of each downstream service and their status (`up` or `down`).'
400:
description: 'Service is unhealthy'
content:
application/json:
schema:
type: object
example:
status: down
services:
database: up
redis: down
properties:
status:
type: string
example: down
description: 'The status of this API (`up` or `down`).'
enum: []
services:
type: object
properties:
database:
type: string
example: up
redis:
type: string
example: down
description: 'Map of each downstream service and their status (`up` or `down`).'
tags:
- Endpoints
security: []
/api/v1/group/send:
post:
summary: 'Send quick sms to a group'
operationId: sendQuickSmsToAGroup
description: "This endpoint allows you to send an sms (BulkSMS, TwoWaySMS, PremiumSMS) for an API user.\n\nDuplicates are not allowed.\n\n"
parameters: []
responses:
200:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
message: 'Group SMS sent successfully.'
transaction_id: 44542c3d-2da9-4499-ad1c-fd8496c515cf
datetime: '2023-05-27 11:08:15'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
message:
type: string
example: 'Group SMS sent successfully.'
transaction_id:
type: string
example: 44542c3d-2da9-4499-ad1c-fd8496c515cf
datetime:
type: string
example: '2023-05-27 11:08:15'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'Group SMS Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
groupname:
type: string
description: ''
example: consequatur
nullable: false
senderid:
type: string
description: ''
example: consequatur
nullable: false
message:
type: string
description: 'The message to send.'
example: "Dear Customer, Happy Mother's Day!"
nullable: false
type:
type: string
description: 'The type of the message.'
example: unicode|text|link
nullable: false
schedule:
type: string
description: 'The timestamp to send this text message in format YYYY-MM-DD HH:MM:SS. Example 2022-02-28 12:34:23'
example: consequatur
nullable: true
test:
type: boolean
description: 'Enable this to test sending a message without delivering it to the recipient. Example `true`'
example: false
nullable: true
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
mobile:
type: string
description: 'The mobile number of your contact.'
example: '256712389009'
nullable: false
required:
- username
- password
- groupname
- senderid
- message
- type
- response
- mobile
security: []
/api/v1/group/schedule:
post:
summary: 'Send scheduled sms to a contact group'
operationId: sendScheduledSmsToAContactGroup
description: "This endpoint allows you to send a scheduled sms (BulkSMS, TwoWaySMS, PremiumSMS) for an API user.\n\nDuplicates are not allowed.\n\n"
parameters: []
responses:
200:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
message: 'Group Scheduled SMS created successfully.'
transaction_id: 44542c3d-2da9-4499-ad1c-fd8496c515cf
datetime: '2023-05-27 11:08:15'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
message:
type: string
example: 'Group Scheduled SMS created successfully.'
transaction_id:
type: string
example: 44542c3d-2da9-4499-ad1c-fd8496c515cf
datetime:
type: string
example: '2023-05-27 11:08:15'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'Group SMS Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
senderid:
type: string
description: 'The sender id of API user.'
example: senderIdXYZ
nullable: false
mobile:
type: string
description: 'The mobile number of your contact.'
example: '256712389009'
nullable: false
message:
type: string
description: 'The message to send.'
example: "Dear Customer, Happy Mother's Day! We have an offer for all sales over $2000. Thank you."
nullable: false
schedule:
type: string
description: 'The timestamp to send this text message in format YYYY-MM-DD HH:MM:SS. Example 2022-02-28 12:34:23'
example: consequatur
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- senderid
- mobile
- message
- response
security: []
/api/v1/group/smartlink:
post:
summary: 'Send smartlink sms to a contact group'
operationId: sendSmartlinkSmsToAContactGroup
description: "This endpoint allows you to send a contact group, a full smartlink url, in an sms (BulkSMS, TwoWaySMS, PremiumSMS) for an API user.\n\nDuplicates are not allowed.\n\n"
parameters: []
responses:
200:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
message: 'Group Smartlink SMS sent successfully.'
transaction_id: 44542c3d-2da9-4499-ad1c-fd8496c515cf
datetime: '2023-05-27 11:08:15'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
message:
type: string
example: 'Group Smartlink SMS sent successfully.'
transaction_id:
type: string
example: 44542c3d-2da9-4499-ad1c-fd8496c515cf
datetime:
type: string
example: '2023-05-27 11:08:15'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'Group SMS Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
senderid:
type: string
description: 'The sender id of API user.'
example: senderIdXYZ
nullable: false
mobile:
type: string
description: 'The mobile number of your contact.'
example: '256712389009'
nullable: false
smartlinktitle:
type: string
description: 'The title of smartlink url.'
example: "Mother's Day Special"
nullable: false
message:
type: string
description: 'The message to send.'
example: "Dear Customer, Happy Mother's Day! We have an offer for all sales over $2000. Thank you."
nullable: false
smartlink:
type: string
description: 'The smartlink of the message.'
example: bit.ly/1O7QxvX
nullable: false
type:
type: string
description: 'The type of the message.'
example: unicode|text|link
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- senderid
- mobile
- smartlinktitle
- message
- smartlink
- type
- response
security: []
/api/v1/reports/sms/summary:
post:
summary: 'Read sms summary from database'
operationId: readSmsSummaryFromDatabase
description: 'This endpoint allows you to read sms summary from database for an API user.'
parameters: []
responses: { }
tags:
- 'Report Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
from:
type: string
description: 'The minimum date range. The date format should be YYYY-MM-DD.'
example: consequatur
nullable: false
to:
type: string
description: 'The maximum date range. The date format should be YYYY-MM-DD.'
example: consequatur
nullable: false
sortBy:
type: required
description: 'Sort by "senderid" or "date" or "summary".'
example: consequatur
nullable: false
sender_name:
type: string
description: 'optional Filter by specific sender name.'
example: consequatur
nullable: true
status:
type: string
description: 'optional Filter by message status.'
example: consequatur
nullable: true
recipient:
type: string
description: 'optional Filter by recipient number.'
example: consequatur
nullable: true
transaction_id:
type: string
description: 'optional Filter by transaction ID.'
example: consequatur
nullable: true
date_field:
type: string
description: 'optional Date field to filter by (submitted_at|delivered_at). Default: submitted_at'
example: consequatur
nullable: true
per_page:
type: integer
description: 'optional Records per page (10|100|200|ALL). Default: 10'
example: 17
nullable: true
page:
type: integer
description: 'optional Page number for pagination. Default: 1'
example: 17
nullable: true
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- from
- to
- response
security: []
/api/v1/reports/sms/status:
post:
summary: 'Read message status'
operationId: readMessageStatus
description: 'This endpoint allows you to read message status for an API user.'
parameters: []
responses: { }
tags:
- 'Report Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
uuid:
type: string
description: 'The message UUID to check.'
example: 66529e01-d113-3473-8d6f-9e11e09332ea
nullable: false
from:
type: string
description: 'The minimum date range. The date format should be YYYY-MM-DD.'
example: consequatur
nullable: false
to:
type: string
description: 'The maximum date range. The date format should be YYYY-MM-DD.'
example: consequatur
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- uuid
- from
- to
- response
security: []
/api/v1/quick/send:
post:
summary: 'Send a quick sms'
operationId: sendAQuickSms
description: "This endpoint allows you to send an sms (BulkSMS, TwoWaySMS, PremiumSMS) for an API user.\n\n"
parameters: []
responses:
200:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
message: 'SMS sent successfully.'
transaction_id: 44542c3d-2da9-4499-ad1c-fd8496c515cf
datetime: '2023-05-27 11:08:15'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
message:
type: string
example: 'SMS sent successfully.'
transaction_id:
type: string
example: 44542c3d-2da9-4499-ad1c-fd8496c515cf
datetime:
type: string
example: '2023-05-27 11:08:15'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'SMS Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
message:
type: string
description: 'The message to send.'
example: "Dear Customer, Happy Mother's Day!"
nullable: false
senderid:
type: string
description: 'The sender id of API user.'
example: senderIdXYZ
nullable: false
type:
type: string
description: 'The type of the message.'
example: unicode|text|link
nullable: false
schedule:
type: string
description: 'The timestamp to send this text message in format YYYY-MM-DD HH:MM:SS. Example 2022-02-28 12:34:23'
example: consequatur
nullable: true
test:
type: boolean
description: 'Enable this to test sending a message without delivering it to the recipient. Example `true`'
example: false
nullable: true
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
mobile:
type: string
description: 'The mobile number of your contact.'
example: '256712389009'
nullable: false
required:
- username
- password
- message
- senderid
- type
- response
- mobile
security: []
/api/v1/quick/schedule:
post:
summary: 'Send scheduled sms'
operationId: sendScheduledSms
description: "This endpoint allows you to send a scheduled sms (BulkSMS, TwoWaySMS, PremiumSMS) for an API user.\n\nDuplicates are not allowed.\n\n"
parameters: []
responses:
200:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
message: 'Smartlink SMS sent successfully.'
transaction_id: 44542c3d-2da9-4499-ad1c-fd8496c515cf
datetime: '2023-05-27 11:08:15'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
message:
type: string
example: 'Smartlink SMS sent successfully.'
transaction_id:
type: string
example: 44542c3d-2da9-4499-ad1c-fd8496c515cf
datetime:
type: string
example: '2023-05-27 11:08:15'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'SMS Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
senderid:
type: string
description: 'The sender id of API user.'
example: senderIdXYZ
nullable: false
mobile:
type: string
description: 'The mobile number of your contact.'
example: '256712389009'
nullable: false
message:
type: string
description: 'The message to send.'
example: "Dear Customer, Happy Mother's Day! We have an offer for all sales over $2000. Thank you."
nullable: false
schedule:
type: string
description: ''
example: consequatur
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- senderid
- mobile
- message
- schedule
- response
security: []
/api/v1/quick/smartlink:
post:
summary: 'Send smartlink sms'
operationId: sendSmartlinkSms
description: "This endpoint allows you to send a full smartlink url in an sms (BulkSMS, TwoWaySMS, PremiumSMS) for an API user.\n\nDuplicates are not allowed.\n\n"
parameters: []
responses:
200:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
message: 'Smartlink SMS sent successfully.'
transaction_id: 44542c3d-2da9-4499-ad1c-fd8496c515cf
datetime: '2023-05-27 11:08:15'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
message:
type: string
example: 'Smartlink SMS sent successfully.'
transaction_id:
type: string
example: 44542c3d-2da9-4499-ad1c-fd8496c515cf
datetime:
type: string
example: '2023-05-27 11:08:15'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'SMS Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
senderid:
type: string
description: 'The sender id of API user.'
example: senderIdXYZ
nullable: false
mobile:
type: string
description: 'The mobile number of your contact.'
example: '256712389009'
nullable: false
smartlinktitle:
type: string
description: 'The title of smartlink url.'
example: "Mother's Day Special"
nullable: false
message:
type: string
description: 'The message to send.'
example: "Dear Customer, Happy Mother's Day! We have an offer for all sales over $2000. Thank you."
nullable: false
smartlink:
type: string
description: 'The smartlink of the message.'
example: bit.ly/1O7QxvX
nullable: false
type:
type: string
description: 'The type of the message.'
example: unicode|text|link
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- senderid
- mobile
- smartlinktitle
- message
- smartlink
- type
- response
security: []
/api/v1/templates:
post:
summary: 'Read message templates'
operationId: readMessageTemplates
description: "This endpoint allows you to read message templates for an API user.\n\n"
parameters: []
responses:
201:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
count: 100
templates: []
datetime: '2021-09-14 13:11:41'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
count:
type: integer
example: 100
templates:
type: array
example: []
datetime:
type: string
example: '2021-09-14 13:11:41'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
401:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 401, "type": "invalid_request_error", "error": [ "Unauthorised" ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'SMS Message Template'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
senderid:
type: string
description: ''
example: consequatur
nullable: false
trashed:
type: boolean
description: 'The flag to include deleted templates in query results.'
example: true
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- senderid
- trashed
- response
security: []
/api/v1/templates/create:
post:
summary: 'Create a message template'
operationId: createAMessageTemplate
description: "This endpoint allows you to create a new message templates for an API user.\n\n"
parameters: []
responses:
201:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
template: 'Message Templated created successfully.'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
template:
type: string
example: 'Message Templated created successfully.'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
401:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 401, "type": "invalid_request_error", "error": [ "Unauthorised" ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'SMS Message Template'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
senderid:
type: string
description: ''
example: consequatur
nullable: false
externaluid:
type: string
description: 'External Unique Identifier from your own application.'
example: fastapi_restapi_sms_template001.
nullable: false
template:
type: string
description: 'The message.'
example: 'Invoice No. 00123 sent.'
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- senderid
- externaluid
- template
- response
security: []
/api/v1/templates/update:
post:
summary: 'Update a message template'
operationId: updateAMessageTemplate
description: "This endpoint allows you to update an existing message templates for an API user.\n\n"
parameters: []
responses:
200:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
message: 'Message Templated created successfully.'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
message:
type: string
example: 'Message Templated created successfully.'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
401:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 401, "type": "invalid_request_error", "error": [ "Unauthorised" ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'SMS Message Template'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
senderid:
type: string
description: ''
example: consequatur
nullable: false
externaluid:
type: string
description: 'External Unique Identifier from your own application.'
example: fastapi_restapi_sms_template001.
nullable: false
template:
type: string
description: 'The message.'
example: 'Invoice No. 00123 sent.'
nullable: false
status:
type: string
description: ''
example: consequatur
nullable: true
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- senderid
- externaluid
- template
- response
security: []
/api/v1/templates/delete:
post:
summary: 'Delete a message template'
operationId: deleteAMessageTemplate
description: "This endpoint allows you to hard delete an existing message templates for an API user.\n\n"
parameters: []
responses:
200:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
template: 'Message Template with externaluid nestjs_api_message192 has been deleted successfully.'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
template:
type: string
example: 'Message Template with externaluid nestjs_api_message192 has been deleted successfully.'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
401:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 401, "type": "invalid_request_error", "error": [ "Unauthorised" ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'SMS Message Template'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
senderid:
type: string
description: ''
example: consequatur
nullable: false
externaluid:
type: string
description: 'External Unique Identifier from your own application.'
example: fastapi_restapi_sms_template001.
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
template:
type: string
description: 'The message.'
example: 'Invoice No. 00123 sent.'
nullable: false
required:
- username
- password
- senderid
- externaluid
- response
- template
security: []
/api/v1/templates/restore:
post:
summary: 'Restore a Deleted message template'
operationId: restoreADeletedMessageTemplate
description: "This endpoint allows you to recover a deleted message templates for an API user.\n\n"
parameters: []
responses:
200:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
template: 'Message Template with externaluid nestjs_api_message192 has been deleted successfully.'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
template:
type: string
example: 'Message Template with externaluid nestjs_api_message192 has been deleted successfully.'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
401:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 401, "type": "invalid_request_error", "error": [ "Unauthorised" ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'SMS Message Template'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
senderid:
type: string
description: ''
example: consequatur
nullable: false
externaluid:
type: string
description: 'External Unique Identifier from your own application.'
example: fastapi_restapi_sms_template001.
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
template:
type: string
description: 'The message.'
example: 'Invoice No. 00123 sent.'
nullable: false
required:
- username
- password
- senderid
- externaluid
- response
- template
security: []
/api/v1/scheduled:
post:
summary: 'Read all scheduled smses'
operationId: readAllScheduledSmses
description: "This endpoint allows you to read scheduled sms (BulkSMS, TwoWaySMS, PremiumSMS) for an API user.\n\n"
parameters: []
responses:
200:
description: success
content:
application/json:
schema:
type: object
example:
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'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
count:
type: integer
example: 100
scheduledsms:
type: array
example:
-
schedule:
uuid: '1234567'
status: pending
total: '1'
datetime: '2023-05-27 11:08:15'
scheduled_at: '2023-05-28 12:48:00'
items:
type: object
properties:
schedule:
type: object
properties:
uuid:
type: string
example: '1234567'
status:
type: string
example: pending
total:
type: string
example: '1'
datetime:
type: string
example: '2023-05-27 11:08:15'
scheduled_at:
type: string
example: '2023-05-28 12:48:00'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'Schedule SMS Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
from:
type: string
description: 'The minimum date range. The date format should be YYYY-MM-DD.'
example: consequatur
nullable: false
to:
type: string
description: 'The maximum date range. The date format should be YYYY-MM-DD.'
example: consequatur
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- from
- to
- response
security: []
/api/v1/scheduled/update:
post:
summary: 'Update a scheduled sms'
operationId: updateAScheduledSms
description: "This endpoint allows you to update scheduled sms (BulkSMS, TwoWaySMS, PremiumSMS) for an API user.\n\n"
parameters: []
responses:
200:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
message: 'Scheduled SMS updated successfully.'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
message:
type: string
example: 'Scheduled SMS updated successfully.'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'Schedule SMS Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
schedule:
type: string
description: 'The schedule datetime id. You should use the format YYYY-MM-DD HH:MM:SS.'
example: '2023-05-27 11:08:15'
nullable: false
id:
type: string
description: 'The scheduled sms id.'
example: 9010a52e-b470-45a0-bf2e-5e0b2420fd5c
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- schedule
- id
- response
security: []
/api/v1/scheduled/delete:
post:
summary: 'Delete a scheduled sms'
operationId: deleteAScheduledSms
description: "This endpoint allows you to delete a scheduled sms (BulkSMS, TwoWaySMS, PremiumSMS) for an API user.\n\n"
parameters: []
responses:
200:
description: success
content:
application/json:
schema:
type: object
example:
code: '200'
status: success
message: 'Scheduled SMS deleted successfully.'
properties:
code:
type: string
example: '200'
status:
type: string
example: success
message:
type: string
example: 'Scheduled SMS deleted successfully.'
400:
description: invalid_request_error
content:
text/plain:
schema:
type: string
example: '{ "code": 400, "type": "invalid_request_error", "error": [ "The response field is required." ], "datetime": "2023-05-27 11:08:15" } }'
500:
description: api_error
content:
text/plain:
schema:
type: string
example: '{ "code": 500, "type": "api_error", "error": "Something went wrong on GHATeam''s end." , "datetime": "2023-05-27 11:08:15" } }'
tags:
- 'Schedule SMS Management'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
description: 'The username of API user.'
example: apiUsername
nullable: false
password:
type: string
description: 'The password of API user.'
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
id:
type: string
description: 'The scheduled sms id.'
example: 9010a52e-b470-45a0-bf2e-5e0b2420fd5c
nullable: false
response:
type: string
description: 'The response type you expect on your end.'
example: json|xml|csv
nullable: false
required:
- username
- password
- id
- response
security: []