Skip to main content

Send All Channel

This API is used to send messages from the client system to the end user through various supported channels ( SMS, Email, Line, Telegram, Facebook Messenger and WhatsApp )

Endpoint

URL : {Base URL Send}/json/send/cgw
Method : POST


In addition to using a single channel, Sandeza also has a feature that allows you to send messages to all the channels available in Sandeza at once. This section describes the request parameters and provides JSON request examples for send a message using a single channel on Sandeza.

Description Parameter Request
FIELDTYPE ALLOWEDMANDATORYDESCRIPTION
signatureSHA 256 HashYESEncrypted (Username+Password+Time), time refers to time field
timeString
(Unix timestamp)
YESCurrent Request Time (Unix Timestamp)
Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063”
typeN (Numeric)YES1 (Send Primary Backup), 2 (Single channel / Send All)
usernameAN (Alpha Numeric)YESUsername Division
ref_idAN (Alpha Numeric) (≤50)YESUnique Id generated by client (lowercase)
subjectANS (Alpha Numeric Space) (< 100)YESSending Message Subject
sender_idANS (Alpha Numeric Space)YESSender Name (provided by sprint)
budget_codeANS (Alpha Numeric Space)NOAdditional information, maximum 180 character
channelJSON ObjectYESDescribe the channels used for sending messages
Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp
smsJSON ObjectYESDescribes the message content and delivery configuration for the SMS channel
messageTextYESMessage to be sent
Sample:
YTH. Bapak/Ibu……
msisdnN (Numeric), Plus (+)YESMobile phone number, with 0, 62 or +
backup_onAN (Alpha Numeric)NOFormat: status1;status2
Mapping:
1 – Unsent
2 – Undelivered
3 – Pending
4 – Failed
Sample:
1;3
backup_expAN (Alpha Numeric)NOExpire in minutes.
Except pending, set 0.
Format: expire1;expire2
Sample:
0;10
use_backup_senderBooleanNOUsed to back up messages via SMS with credit deduction
default “false” → Message backup is not enabled
true → Message backup is active
telegramJSON ObjectYESDescribes the message content and delivery configuration for the Telegram channel
messageTextYESBody (non-HTML format)
chat_idAN (Alpha Numeric)YESSocial id / metadata id
attachmentTextNOPath Format: https://Path/filename
Note: https protocol is a must
File Extension:
Line: jpg, png
Telegram: jpg, png, pdf, mp4
Facebook: jpg, png, xls, xlsx, pdf, ppt, pptx,
doc, docx, wav, mp4, txt
Max File Size: 5MB/file
Separator: “;”
Sample:
https://www.domain.com/test.pdf; https://www.domain.com/test2.pdf
backup_onAN (Alpha Numeric)NOFormat: status1; status2
Mapping:
1 – Unsent
3 – Pending
4 – Failed
Sample:
1;4
backup_expAN (Alpha Numeric)NOExpire in minutes.
Except pending, set 0.
Format: expire1; expire2
Sample:
0;0
EmailJSON ObjectYESDescribes the message content and delivery configuration for the Email channel
messageTextNOIf not using a template, you can write free text.
Static with template: This value can empty
Dynamic with template: Dynamic Values
Separator: “:” dan “;"
Sample:
nama:Sprint;alamat:Jl. Fatmawati
emailValid Email FormatYESMust be a valid email format
attachmentTextNOPath Format: https://Path/filename
Note: https protocol is a must
File Extension:
Email: jpg, png, xls, xlsx, pdf, ppt, pptx, doc, docx, wav, mp4, txt
Max Size: 5MB/file
Separator: “;”
Sample:
https://www.domain.com/test.pdf; https://www.domain.com/test2.pdf
template_idAN (Alpha Numeric)NOId template generated from sandeza web
Template_id mandatory, If the email is sent using a template
Then param message follows dynamic parameters
backup_onAN (Alpha Numeric)NOFormat: status1; status2
Mapping:
1 – Unsent
2 – Undelivered
3 – Pending
5 – Spam
6 – Bounced
7 – Blacklist
Sample:
1;3
backup_expAN (Alpha Numeric)NOExpire in minutes.
Except pending, set 0.
Format: expire1; expire2
Sample:
0;5
lineJSON ObjectYESDescribes the message content and delivery configuration for the Line channel
messageTextYESBody (non-HTML format)
chat_idAN (Alpha Numeric)YESSocial id / metadata id
attachmentTextNOPath Format: https://Path/filename
Note: https protocol is a must
File Extension:
Line: jpg, png
Telegram: jpg, png, pdf, mp4
Facebook: jpg, png, xls, xlsx, pdf, ppt, pptx,
doc, docx, wav, mp4, txt
Max File Size: 5MB/file
Separator: “;”
Sample:
https://www.domain.com/test.pdf; https://www.domain.com/test2.pdf
backup_onAN (Alpha Numeric)NOFormat: status1; status2
Mapping:
1 – Unsent
3 – Pending
4 – Failed
Sample:
1;4
backup_expAN (Alpha Numeric)NOExpire in minutes.
Except pending, set 0.
Format: expire1; expire2
Sample:
0;0
whatsappJSON ObjectYESDescribes the message content and delivery configuration for the WhatsApp channel
messageTextNOStatic with template: This value can empty
msisdnN (Numeric), Plus (+)YESMobile phone number, with 0, 62 or +
attachmentTextNOPath Format:
https://Path/filename
Note: https protocol is a must
File Extension:
WhatsApp: jpg, png, xls, xlsx, pdf, ppt, pptx,
doc, docx, wav, mp4, txt
Max Size: 5MB/file
Separator: “;”
Sample:
https://www.domain.com/test.pdf;
https://www.domain.com/test2.pdf
template_idAN (Alpha Numeric)YESTemplate Id registered
backup_onAN (Alpha Numeric)NOFormat: status1; status2
Mapping:
1 – Unsent
2 – Undelivered
3 – Pending
4 – Failed
9 – Delivered
Sample:
2;3
backup_expAN (Alpha Numeric)NOExpire in minutes.
Except pending, set 0.
Format: expire1; expire2
Sample:
0;10
Sample JSON Request
{
"signature": "<encrypted SHA 256 : username+password+time>",
"time": "<current timestamp (Unix Timestamp)>",
"type": "2",
"username": "<value from sprint>",
"ref_id": "<generated by client>",
"subject": "example subject",
"sender_id": "<value from sprint>",
"budget_code": "<generated by client>",
"channel": {
"sms": {
"message": "tes sandeza send all",
"msisdn": "62858xxxxxxxx ",
"backup_on": "",
"backup_exp": "",
"use_backup_sender": "false"
},
"telegram": {
"message": "tes sandeza send all",
"chat_id": "39673xxxx",
"attachment": "https://media.sandeza.id/Marketing/sandeza.png",
"backup_on": "",
"backup_exp": ""
},
"email": {
"message": "tes sandeza send all",
"email": "admin@sprintasia.co.id",
"attachment": "",
"template_id": "",
"backup_on": "",
"backup_exp": ""
},
"line": {
"message": "tes sandeza send all",
"chat_id": "U4a5d496a17259bde9788507064xxxxxx",
"attachment": "https://media.sandeza.id/Marketing/Sandeza.pdf",
"backup_on": "",
"backup_exp": ""
},
"whatsapp": {
"message": "",
"msisdn": "62858xxxxxxxx ",
"attachment": "",
"template_id": "thankyou_chatbot",
"backup_on": "",
"backup_exp": ""
}
}
}