MESSAGES

This set of endpoints allows you send messages, campaigns, statistics and status.

SEND MESSAGES

This endpoint allows you to curate and send messages.

POST https://squadbygtco.com:8080/service/message

Request Body

Name
Type
Description

is_campaign*

Boolean

Set True if message is a campaign

reference

String

Optional reference but necessary to group campaigns

use_bucket*

Boolean

Set True if making use of a Bucket

recipients*

Integer

if use_bucket is true, use bucketID, else use recipient phone number

use_template*

Boolean

Set True if Template is to be used

body*

String

if use_template is true, use templateID, else use message in text box

sender*

String

is optional. You can get from route sender/:client_ID

Sample Request

{
    "is_campaign": true, 
    "reference": "abc_123",
    "use_bucket": true,
    "recipients": "1", 
    "use_template": true,
    "body": "1", 
    "sender": "GTBank"
}

GET ALL CAMPAIGNS

This endpoint allows you to retrieve all campaigns

GET https://squadbygtco.com:8080/service/template/by-client/2?page=1&count=10

GET CAMPAIGN MESSAGES

This endpoint allows you retrieve the campaign messages themselves.

GET https://squadbygtco.com:8080/service/message/campaign/messages/by-campaign/1?page=1&count=10

GET ALL CAMPAIGN STATISTICS

This endpoint allows you to retrieve statistics for all sent campaigns

GET https://squadbygtco.com:8080/service/message/statistics/by-client/1?page=1&count=10

GET CAMPAIGN STATISTICS

This endpoint allows you to retrieve statistics for a single campaign

GET https://squadbygtco.com:8080/service/message/statistics/by-campaign/2?page=1&count=10

Sample Response

GET MESSAGES BY PHONE NUMBER

This endpoint allows you to retrieve messages using a phone number

GET https://squadbygtco.com:8080/service/message/by-phone/0701234?page=1&count=20

GET MESSAGE STATUS BY BATCH_ID

This endpoint allows you to retrieve the status of a single message using the batch_id

GET https://squadbygtco.com:8080/service/message/by-params?batch_id=61AF806F8AE8

The Status response can be any of the following: Submitted: Request Received Pending: Request submitted to Telco

Delivered: Customer has received sms

Delivery Failed: Telco attempted to send sms but failed

GET HOURLY STATISTICS

This endpoint allows you to get statistics by the hour of sent campaigns

GET https://squadbygtco.com:8080/service/message.summary/hourly-statistics/by-client/2?date=2024-03-12

Last updated

Was this helpful?