Single Channels
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 )
URL : {Base URL Send}/json/send/cgw
Method : POST
This section describes the request parameters and provides JSON request examples for sending messages through a single channel on Sandeza.
Channel SMS
This section describes the request parameters and provides JSON request examples for sending messages via the SMS channel
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
created_by | String | NO | username or the name of the person who created the message. |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
sms | JSON Object | YES | Describes the message content and delivery configuration for the SMS channel |
message | Text | YES | Message to be sent Sample: YTH. Bapak/Ibu…… |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
backup_on | AN (Alpha Numeric) | NO | Format: status1;status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 4 – Failed Sample: 1;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire in minutes. Except pending, set 0. Format: expire1;expire2 Sample: 0;10 |
use_backup_sender | Boolean | NO | Used to back up messages via SMS with credit deduction default “false” → Message backup is not enabled true → Message backup is active |
Sample JSON Request
{
"signature": "<encrypted SHA 256: username+password+time>",
"time": "<current timestamp (Unix Timestamp)>",
"type": "2",
"created_by": "<sending user>",
"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": "test sms",
"msisdn": "62858xxxxxxxx",
"backup_on": "",
"backup_exp": ""
"use_backup_sender": "false"
}
}
}
Channel Email
To send messages using the email channel, users can use two methods:
Email Plain Text
This section describes the request parameters and provides JSON request examples for sending messages in plain text email format.
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
created_by | String | NO | username or the name of the person who created the message. |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the Email channel | |
message | Text | NO | If 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 |
Valid Email Format | YES | Must be a valid email format | |
attachment | Text | NO | Path 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_id | AN (Alpha Numeric) | NO | Id template generated from sandeza web Template_id mandatory, If the email is sent using a template Then param message follows dynamic parameters |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 5 – Spam 6 – Bounced 7 – Blacklist Sample: 1;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire in minutes. Except pending, set 0. Format: expire1; expire2 Sample: 0;5 |
Sample JSON Request
{
"signature": "<encrypted SHA 256: username+password+time>",
"time": "<current timestamp (Unix Timestamp)>",
"type": "2",
"created_by": "<sending user>",
"username": "<value from sprint>",
"ref_id": "<generated by client>",
"subject": "example subject",
"sender_id": "<value from sprint>",
"budget_code": "<generated by client>",
"channel": {
"email": {
"message": "test email",
"email": "admin@sprintasia.co.id",
"attachment": "",
"template_id": "",
"backup_on": "",
"backup_exp": ""
}
}
}
Email Template
This section describes the request parameters and provides JSON request examples for sending messages in a template email format.
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
created_by | String | NO | username or the name of the person who created the message. |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the Email channel | |
message | Text | NO | If 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 |
Valid Email Format | YES | Must be a valid email format | |
attachment | Text | NO | Path 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_id | AN (Alpha Numeric) | NO | Id template generated from sandeza web Template_id mandatory, If the email is sent using a template Then param message follows dynamic parameters |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 5 – Spam 6 – Bounced 7 – Blacklist Sample: 1;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire in minutes. Except pending, set 0. Format: expire1; expire2 Sample: 0;5 |
Sample JSON Request
{
"signature": "<encrypted SHA 256: username+password+time>",
"time": "<current timestamp (Unix Timestamp)>",
"type": "2",
"created_by": "<sending user>",
"username": "<value from sprint>",
"ref_id": "<generated by client>",
"subject": "example subject",
"sender_id": "<value from sprint>",
"budget_code": "<generated by client>",
"channel": {
"email": {
"message": "nama:sprint;alamat:Jl. Fatmawati",
"email": "admin@sprintasia.co.id",
"attachment": "",
"template_id": "template-email-001",
"backup_on": "",
"backup_exp": ""
}
}
}
Channel Line
This section describes the request parameters and provides JSON request examples for sending messages via the Line channel
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
created_by | String | NO | username or the name of the person who created the message. |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
line | JSON Object | YES | Describes the message content and delivery configuration for the Line channel |
message | Text | YES | Body (non-HTML format) |
chat_id | AN (Alpha Numeric) | YES | Social id / metadata id |
attachment | Text | NO | Path 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_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 3 – Pending 4 – Failed Sample: 1;4 |
backup_exp | AN (Alpha Numeric) | NO | Expire in minutes. Except pending, set 0. Format: expire1; expire2 Sample: 0;0 |
Sample JSON Request
{
"signature": "<encrypted SHA 256: username+password+time>",
"time": "<current timestamp (Unix Timestamp)>",
"type": "2",
"created_by": "<sending user>",
"username": "<value from sprint>",
"ref_id": "<generated by client>",
"subject": "example subject",
"sender_id": "<value from sprint>",
"budget_code": "<generated by client>",
"channel": {
"line": {
"message": "test sprint",
"chat_id": "U4a5d496a17259bde978850xxxxxxxxxx",
"attachment": "",
"backup_on": "",
"backup_exp": ""
}
}
}
Channel Telegram
This section describes the request parameters and provides JSON request examples for sending messages via the Telegram channel
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
created_by | String | NO | username or the name of the person who created the message. |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
telegram | JSON Object | YES | Describes the message content and delivery configuration for the Telegram channel |
message | Text | YES | Body (non-HTML format) |
chat_id | AN (Alpha Numeric) | YES | Social id / metadata id |
attachment | Text | NO | Path 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_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 3 – Pending 4 – Failed Sample: 1;4 |
backup_exp | AN (Alpha Numeric) | NO | Expire in minutes. Except pending, set 0. Format: expire1; expire2 Sample: 0;0 |
Sample JSON Request
{
"signature": "<encrypted SHA 256: username+password+time>",
"time": "<current timestamp (Unix Timestamp)>",
"type": "2",
"created_by": "<sending user>",
"username": "<value from sprint>",
"ref_id": "<generated by client>",
"subject": "example subject",
"sender_id": "<value from sprint>",
"budget_code": "<generated by client>",
"channel": {
"telegram": {
"message": "test sprint",
"chat_id": "39xxxxxxx",
"attachment": "",
"backup_on": "",
"backup_exp": ""
}
}
}
Channel Facebook
This section describes the request parameters and provides JSON request examples for sending messages via the Facebook channel
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
created_by | String | NO | username or the name of the person who created the message. |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the Facebook channel | |
message | Text | YES | Body (non-HTML format) |
chat_id | AN (Alpha Numeric) | YES | Social id / metadata id |
attachment | Text | NO | Path 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_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 3 – Pending 4 – Failed Sample: 1;4 |
backup_exp | AN (Alpha Numeric) | NO | Expire in minutes. Except pending, set 0. Format: expire1; expire2 Sample: 0;0 |
Sample JSON Request
{
"signature": "<encrypted SHA 256: username+password+time>",
"time": "<current timestamp (Unix Timestamp)>",
"type": "2",
"created_by": "<sending user>",
"username": "<value from sprint>",
"ref_id": "<generated by client>",
"subject": "example subject",
"sender_id": "<value from sprint>",
"budget_code": "<generated by client>",
"channel": {
"facebook": {
"message": "test sprint",
"chat_id": "3444386822xxxxxx",
"attachment": "",
"backup_on": "",
"backup_exp": ""
}
}
}
Channel WhatsApp
To send a message using the WhatsApp channel, you must first have a template. If you are sending a WhatsApp message using a dynamic template, you will need to include dynamic parameters. However, to send a WhatsApp message using a static template, you only need the templateID.
To send messages using the WhatsApp channel, users can use two methods:
Use JSON Format
To send a message using a WhatsApp channel template in JSON format, there are several supported methods for sending messages with templates via the WhatsApp channel.
Template Static
This section describes the request parameters and provides JSON request examples for sending messages via the WhatsApp channel using a static template.
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
message | Text | NO | Static with template: This value can empty |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
attachment | Text | NO | Path 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_id | AN (Alpha Numeric) | YES | Template Id registered |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 4 – Failed 9 – Delivered Sample: 2;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire 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": {
"whatsapp": {
"message": "",
"msisdn": "62858xxxxxxxx",
"attachment": "",
"template_id": "thankyou",
"backup_on": "",
"backup_exp": ""
}
}
}
Template Dynamic
This section describes the request parameters and provides JSON request examples for sending messages via the WhatsApp channel use Template Dynamic.
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
template_id | AN (Alpha Numeric) | YES | Template Id registered |
message | JSON Object | NO | Message on body This field for dynamic parameter message (Mandatory) Type dynamic parameter: text See “Description Field Message” for details NOTE: if the template type is authentication, then the text value of the message must match the value of 'value_otp' on the button." |
type | String | YES | Type of message This value always “Body” for component template type message |
parameter | Array | YES | Detail information for parameter body dynamic |
type | String | YES | Type for body dynamic Example: text |
text | String | YES | Sample text dynamic from body Mandatory if body type text |
attachment | Text | NO | Path 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 |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 4 – Failed 9 – Delivered Sample: 2;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire 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": {
"whatsapp": {
"msisdn": "62858xxxxxxxx",
"template_id": "template_dynamic_body",
"message": {
"type": "body",
"parameters": [
{
"type": "text",
"text": "Aziz"
}
]
},
"attachment": "",
"backup_on": "",
"backup_exp": ""
}
}
}
Template Body (Dynamic) + Header (Dynamic Text)
This section describes the request parameters and provides JSON request examples for sending messages via the WhatsApp channel use Template with Body (Dynamic) + Header (Dynamic Text)
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
template_id | AN (Alpha Numeric) | YES | Template Id registered |
header | JSON Object | NO | Message on header This field for dynamic parameter header (Mandatory) Type dynamic parameter: text, Image, video, document, location See “Description Field Header” for details |
type | String | YES | Type of header This value always “Header” for component template type header |
parameter | Array | YES | Detail information for parameter header dynamic |
type | String | YES | Type for header dynamic Example: text, Image, video, document, location |
text | String | NO | Sample text dynamic from header Mandatory if header type text |
message | JSON Object | NO | Message on body This field for dynamic parameter message (Mandatory) Type dynamic parameter: text See “Description Field Message” for details NOTE: if the template type is authentication, then the text value of the message must match the value of 'value_otp' on the button." |
type | String | YES | Type of message This value always “Body” for component template type message |
parameter | Array | YES | Detail information for parameter body dynamic |
type | String | YES | Type for body dynamic Example: text |
text | String | YES | Sample text dynamic from body Mandatory if body type text |
attachment | Text | NO | Path 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 |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 4 – Failed 9 – Delivered Sample: 2;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire 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": {
"whatsapp": {
"msisdn": "62858xxxxxxxx",
"template_id": "thankyou_text",
"header": {
"type": "header",
"parameters": [
{
"type": "text",
"text": "Sandeza"
}
]
},
"message": {
"type": "body",
"parameters": [
{
"type": "text",
"text": "Sprint"
},
{
"type": "text",
"text": "Sandeza"
}
]
},
"attachment": "",
"backup_on": "",
"backup_exp": ""
}
}
}
Template Body (Dynamic) + Header (Dynamic Image)
This section describes the request parameters and provides JSON request examples for sending messages via the WhatsApp channel use Template with Body (Dynamic) + Header (Dynamic Image)
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
template_id | AN (Alpha Numeric) | YES | Template Id registered |
header | JSON Object | NO | Message on header This field for dynamic parameter header (Mandatory) Type dynamic parameter: text, Image, video, document, location See “Description Field Header” for details |
type | String | YES | Type of header This value always “Header” for component template type header |
parameter | Array | YES | Detail information for parameter header dynamic |
type | String | YES | Type for header dynamic Example: text, Image, video, document, location |
image | JSON Object | NO | Placeholder for image Allowed sample extension: .jpeg, .png Size limit: 2MB Mandatory if header type image |
link | String | NO | Storage location for media (image/video/document) file This field for header type: image, video, document |
message | JSON Object | NO | Message on body This field for dynamic parameter message (Mandatory) Type dynamic parameter: text See “Description Field Message” for details NOTE: if the template type is authentication, then the text value of the message must match the value of 'value_otp' on the button." |
type | String | YES | Type of message This value always “Body” for component template type message |
parameter | Array | YES | Detail information for parameter body dynamic |
type | String | YES | Type for body dynamic Example: text |
text | String | YES | Sample text dynamic from body Mandatory if body type text |
attachment | Text | NO | Path 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 |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 4 – Failed 9 – Delivered Sample: 2;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire 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": {
"whatsapp": {
"msisdn": "62858xxxxxxxx",
"template_id": "thankyou_image",
"header": {
"type": "header",
"parameters": [
{
"type": "image",
"image": {
"link": "https://media.sandeza.id/sandeza.png"
}
}
]
},
"message": {
"type": "body",
"parameters": [
{
"type": "text",
"text": "Pagi"
},
{
"type": "text",
"text": "Sprint"
}
]
},
"attachment": "",
"backup_on": "",
"backup_exp": ""
}
}
}
Template Body (Dynamic) + Header (Dynamic Video)
This section describes the request parameters and provides JSON request examples for sending messages via the WhatsApp channel use Template with Body (Dynamic) + Header (Dynamic Video)
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
template_id | AN (Alpha Numeric) | YES | Template Id registered |
header | JSON Object | NO | Message on header This field for dynamic parameter header (Mandatory) Type dynamic parameter: text, Image, video, document, location See “Description Field Header” for details |
type | String | YES | Type of header This value always “Header” for component template type header |
parameter | Array | YES | Detail information for parameter header dynamic |
type | String | YES | Type for header dynamic Example: text, Image, video, document, location |
video | JSON Object | NO | Placeholder for video Allowed sample extension: .3gp, .mp4 Size limit: 10MB Mandatory if header type video |
link | String | NO | Storage location for media (image/video/document) file This field for header type: image, video, document |
message | JSON Object | NO | Message on body This field for dynamic parameter message (Mandatory) Type dynamic parameter: text See “Description Field Message” for details NOTE: if the template type is authentication, then the text value of the message must match the value of 'value_otp' on the button." |
type | String | YES | Type of message This value always “Body” for component template type message |
parameter | Array | YES | Detail information for parameter body dynamic |
type | String | YES | Type for body dynamic Example: text |
text | String | YES | Sample text dynamic from body Mandatory if body type text |
attachment | Text | NO | Path 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 |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 4 – Failed 9 – Delivered Sample: 2;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire 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": {
"whatsapp": {
"msisdn": "62858xxxxxxxx",
"template_id": " thankyou_video",
"header": {
"type": "header",
"parameters": [
{
"type": "video",
"video": {
"link": "https://media.sandeza.id/sandeza.mp4"
}
}
]
},
"message": {
"type": "body",
"parameters": [
{
"type": "text",
"text": "Pagi"
},
{
"type": "text",
"text": "Sprint"
}
]
},
"attachment": "",
"backup_on": "",
"backup_exp": ""
}
}
}
Template Body (Dynamic) + Header (Dynamic Document)
This section describes the request parameters and provides JSON request examples for sending messages via the WhatsApp channel use Template with Body (Dynamic) + Header (Dynamic Document)
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
template_id | AN (Alpha Numeric) | YES | Template Id registered |
header | JSON Object | NO | Message on header This field for dynamic parameter header (Mandatory) Type dynamic parameter: text, Image, video, document, location See “Description Field Header” for details |
type | String | YES | Type of header This value always “Header” for component template type header |
parameter | Array | YES | Detail information for parameter header dynamic |
type | String | YES | Type for header dynamic Example: text, Image, video, document, location |
document | JSON Object | NO | Placeholder for document Allowed sample extension: .txt, .xls, .xlsx, .doc, .ppt, .pdf Size limit: 15MB Mandatory if header type document |
link | String | NO | Storage location for media (image/video/document) file This field for header type: image, video, document |
filename | String | NO | Displayed Document Filename |
message | JSON Object | NO | Message on body This field for dynamic parameter message (Mandatory) Type dynamic parameter: text See “Description Field Message” for details NOTE: if the template type is authentication, then the text value of the message must match the value of 'value_otp' on the button." |
type | String | YES | Type of message This value always “Body” for component template type message |
parameter | Array | YES | Detail information for parameter body dynamic |
type | String | YES | Type for body dynamic Example: text |
text | String | YES | Sample text dynamic from body Mandatory if body type text |
attachment | Text | NO | Path 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 |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 4 – Failed 9 – Delivered Sample: 2;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire 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": {
"whatsapp": {
"msisdn": "62858xxxxxxxx",
"template_id": "thankyou_document",
"header": {
"type": "header",
"parameters": [
{
"type": "document",
"document": {
"link": "https://media.sandeza.id/sandeza.pdf",
"filename" : "Sandeza.pdf"
}
}
]
},
"message": {
"type": "body",
"parameters": [
{
"type": "text",
"text": "Sprint"
}
]
},
"attachment": "",
"backup_on": "",
"backup_exp": ""
}
}
}
Template Body (Dynamic) + Header (Dynamic Location)
This section describes the request parameters and provides JSON request examples for sending messages via the WhatsApp channel use Template with Body (Dynamic) + Header (Dynamic Location)
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
template_id | AN (Alpha Numeric) | YES | Template Id registered |
header | JSON Object | NO | Message on header This field for dynamic parameter header (Mandatory) Type dynamic parameter: text, Image, video, document, location See “Description Field Header” for details |
type | String | YES | Type of header This value always “Header” for component template type header |
parameter | Array | YES | Detail information for parameter header dynamic |
type | String | YES | Type for header dynamic Example: text, Image, video, document, location |
location | JSON Object | NO | Placeholder for location Mandatory if header type location |
latitude | Float | NO | Type Location (coordinates point) This field for header type: location |
longitude | Float | NO | Type Location (coordinates point) This field for header type: location |
name | String | NO | Detail name of the location This field for header type: location |
address | String | NO | Detail address of the location This field for header type: location |
message | JSON Object | NO | Message on body This field for dynamic parameter message (Mandatory) Type dynamic parameter: text See “Description Field Message” for details NOTE: if the template type is authentication, then the text value of the message must match the value of 'value_otp' on the button." |
type | String | YES | Type of message This value always “Body” for component template type message |
parameter | Array | YES | Detail information for parameter body dynamic |
type | String | YES | Type for body dynamic Example: text |
text | String | YES | Sample text dynamic from body Mandatory if body type text |
attachment | Text | NO | Path 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 |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 4 – Failed 9 – Delivered Sample: 2;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire 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": {
"whatsapp": {
"msisdn": "62858xxxxxxxx",
"template_id": "thankyou_location",
"header": {
"type": "header",
"parameters": [
{
"type": "location",
"location": {
"latitude": "-6.1697604162596775",
"longitude": "106.82749612129722",
"name": "National Monument",
"address": "Gambir Central Jakarta City, Jakarta"
}
}
]
},
"message": {
"type": "body",
"parameters": [
{
"type": "text",
"text": "Sprint"
}
]
},
"attachment": "",
"backup_on": "",
"backup_exp": ""
}
}
}
Template Body (Dynamic) + Header (Dynamic Text) + Button (Dynamic URL)
This section describes the request parameters and provides JSON request examples for sending messages via the WhatsApp channel use Template with Body (Dynamic) + Header (Dynamic Text) + Button (Dynamic URL)
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
template_id | AN (Alpha Numeric) | YES | Template Id registered |
header | JSON Object | NO | Message on header This field for dynamic parameter header (Mandatory) Type dynamic parameter: text, Image, video, document, location See “Description Field Header” for details |
type | String | YES | Type of header This value always “Header” for component template type header |
parameter | Array | YES | Detail information for parameter header dynamic |
type | String | YES | Type for header dynamic Example: text, Image, video, document, location |
text | String | NO | Sample text dynamic from header Mandatory if header type text |
message | JSON Object | NO | Message on body This field for dynamic parameter message (Mandatory) Type dynamic parameter: text See “Description Field Message” for details NOTE: if the template type is authentication, then the text value of the message must match the value of 'value_otp' on the button." |
type | String | YES | Type of message This value always “Body” for component template type message |
parameter | Array | YES | Detail information for parameter body dynamic |
type | String | YES | Type for body dynamic Example: text |
text | String | YES | Sample text dynamic from body Mandatory if body type text |
button | JSON Object | NO | Message on button This field for a dynamic card carousel component (Mandatory) Type dynamic parameter: button URL, button catalog, button MPM See “Description Field Button” for details NOTE: if the template type is authentication, then the text value of the message must match the value of 'value_otp' on the button." |
type | String | YES | Type of button This value always “Button” for component template type button |
sub_type | String | YES | Sub type for button dynamic Example: URL, catalog, MPM |
index | Integer | YES | index is the order of the button, starting from 0 to 9 |
parameter | Array | YES | Detail information for parameter button dynamic |
Type | String | YES | Type for sub_type button dynamic: Text for Type URL Action for Type catalog & MPM |
text | String | NO | Sample text dynamic from button Mandatory if button type text |
attachment | Text | NO | Path 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 |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 4 – Failed 9 – Delivered Sample: 2;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire 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": {
"whatsapp": {
"msisdn": "62858xxxxxxxx",
"template_id": "thankyou_URL",
"header": {
"type": "header",
"parameters": [
{
"type": "text",
"text": "Selamat Pagi"
}
]
},
"message": {
"type": "body",
"parameters": [
{
"type": "text",
"text": "Aziz"
}
]
},
"button": [
{
"type": "BUTTON",
"sub_type": "URL",
"index": "3",
"parameters": [
{
"type": "text",
"text": "login.html"
}
]
}
],
"attachment": "",
"backup_on": "",
"backup_exp": ""
}
}
}
Template With Button OTP
This section describes the request parameters and provides JSON request examples for sending messages via the WhatsApp channel use Template With Button OTP
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
template_id | AN (Alpha Numeric) | YES | Template Id registered |
header | JSON Object | NO | Message on header This field for dynamic parameter header (Mandatory) Type dynamic parameter: text, Image, video, document, location See “Description Field Header” for details |
message | JSON Object | NO | Message on body This field for dynamic parameter message (Mandatory) Type dynamic parameter: text See “Description Field Message” for details NOTE: if the template type is authentication, then the text value of the message must match the value of 'value_otp' on the button." |
type | String | YES | Type of message This value always “Body” for component template type message |
parameter | Array | YES | Detail information for parameter body dynamic |
type | String | YES | Type for body dynamic Example: text |
text | String | YES | Sample text dynamic from body Mandatory if body type text |
button | JSON Object | NO | Message on button This field for a dynamic card carousel component (Mandatory) Type dynamic parameter: button URL, button catalog, button MPM See “Description Field Button” for details NOTE: if the template type is authentication, then the text value of the message must match the value of 'value_otp' on the button." |
type | String | YES | Type of button This value always “Button” for component template type button |
sub_type | String | YES | Sub type for button dynamic Example: URL, catalog, MPM |
index | Integer | YES | index is the order of the button, starting from 0 to 9 |
parameter | Array | YES | Detail information for parameter button dynamic |
Type | String | YES | Type for sub_type button dynamic: Text for Type URL Action for Type catalog & MPM |
text | String | NO | Sample text dynamic from button Mandatory if button type text |
attachment | Text | NO | Path 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 |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 4 – Failed 9 – Delivered Sample: 2;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire 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": {
"whatsapp": {
"msisdn": "62858xxxxxxxx",
"template_id": "sample_template_otp",
"header": "",
"message": {
"type": "body",
"parameters": [
{
"type": "text",
"text": "123456"
}
]
},
"button": [
{
"type": "BUTTON",
"sub_type": "URL",
"index": "0",
"parameters": [
{
"type": "text",
"text": "123456"
}
]
}
],
"attachment": "",
"backup_on": "",
"backup_exp": ""
}
}
}
Template Catalog
This section describes the request parameters and provides JSON request examples for sending messages via the WhatsApp channel use Template Catalog
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
template_id | AN (Alpha Numeric) | YES | Template Id registered |
header | JSON Object | NO | Message on header This field for dynamic parameter header (Mandatory) Type dynamic parameter: text, Image, video, document, location See “Description Field Header” for details |
message | JSON Object | NO | Message on body This field for dynamic parameter message (Mandatory) Type dynamic parameter: text See “Description Field Message” for details NOTE: if the template type is authentication, then the text value of the message must match the value of 'value_otp' on the button." |
type | String | YES | Type of message This value always “Body” for component template type message |
parameter | Array | YES | Detail information for parameter body dynamic |
type | String | YES | Type for body dynamic Example: text |
text | String | YES | Sample text dynamic from body Mandatory if body type text |
button | JSON Object | NO | Message on button This field for a dynamic card carousel component (Mandatory) Type dynamic parameter: button URL, button catalog, button MPM See “Description Field Button” for details NOTE: if the template type is authentication, then the text value of the message must match the value of 'value_otp' on the button." |
type | String | YES | Type of button This value always “Button” for component template type button |
sub_type | String | YES | Sub type for button dynamic Example: URL, catalog, MPM |
index | Integer | YES | index is the order of the button, starting from 0 to 9 |
parameter | Array | YES | Detail information for parameter button dynamic |
Type | String | YES | Type for sub_type button dynamic: Text for Type URL Action for Type catalog & MPM |
action | JSON Object | NO | Detail of the action information |
thumbnail_product_retailer_id | String | YES | Item SKU number. Labelled as Content ID in the Commerce Manager. The thumbnail of this item will be used as the message's header image |
attachment | Text | NO | Path 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 |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 4 – Failed 9 – Delivered Sample: 2;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire 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": {
"whatsapp": {
"msisdn": "62858xxxxxxxx ",
"template_id": "sample_catalog_template",
"header": "",
"message": {
"type": "body",
"parameters": [
{
"type": "text",
"text": "Aziz"
}
]
},
"button": [
{
"type": "button",
"sub_type": "catalog",
"index": 0,
"parameters": [
{
"type": "action",
"action": {
"thumbnail_product_retailer_id": "mln-002"
}
}
]
}
],
"attachment": "",
"backup_on": "",
"backup_exp": ""
}
}
}
Template Catalog Multi Product Message (MPM)
This section describes the request parameters and provides JSON request examples for sending messages via the WhatsApp channel use Template Catalog Multi Product Message (MPM)
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
template_id | AN (Alpha Numeric) | YES | Template Id registered |
header | JSON Object | NO | Message on header This field for dynamic parameter header (Mandatory) Type dynamic parameter: text, Image, video, document, location See “Description Field Header” for details |
type | String | YES | Type of header This value always “Header” for component template type header |
parameter | Array | YES | Detail information for parameter header dynamic |
type | String | YES | Type for header dynamic Example: text, Image, video, document, location |
text | String | NO | Sample text dynamic from header Mandatory if header type text |
message | JSON Object | NO | Message on body This field for dynamic parameter message (Mandatory) Type dynamic parameter: text See “Description Field Message” for details NOTE: if the template type is authentication, then the text value of the message must match the value of 'value_otp' on the button." |
type | String | YES | Type of message This value always “Body” for component template type message |
parameter | Array | YES | Detail information for parameter body dynamic |
type | String | YES | Type for body dynamic Example: text |
text | String | YES | Sample text dynamic from body Mandatory if body type text |
button | JSON Object | NO | Message on button This field for a dynamic card carousel component (Mandatory) Type dynamic parameter: button URL, button catalog, button MPM See “Description Field Button” for details NOTE: if the template type is authentication, then the text value of the message must match the value of 'value_otp' on the button." |
type | String | YES | Type of button This value always “Button” for component template type button |
sub_type | String | YES | Sub type for button dynamic Example: URL, catalog, MPM |
index | Integer | YES | index is the order of the button, starting from 0 to 9 |
parameter | Array | YES | Detail information for parameter button dynamic |
Type | String | YES | Type for sub_type button dynamic: Text for Type URL Action for Type catalog & MPM |
action | JSON Object | NO | Detail of the action information |
thumbnail_product_retailer_id | String | YES | Item SKU number. Labelled as Content ID in the Commerce Manager. The thumbnail of this item will be used as the message's header image |
sections | JSON Object | NO | Detail of the sections information |
title | String | YES | Section title text. You can specify up to 10 sections. Maximum 24 characters. Markdown is not supported |
product_items | Array | YES | Detail of the product_item information |
product_retailer_id | String | YES | SKU number of the items you want to display in the section. The SKU number is labeled as Content ID in Commerce Manager. Supports a total of up to 30 products across all sections. |
attachment | Text | NO | Path 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 |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 4 – Failed 9 – Delivered Sample: 2;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire 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": {
"whatsapp": {
"msisdn": "62858xxxxxxxx ",
"template_id": "sample_catalog_template_mpm",
"header": {
"type": "header",
"parameters": [
{
"type": "text",
"text": "Ini adalah product unggulan kami."
}
]
},
"message": {
"type": "body",
"parameters": [
{
"type": "text",
"text": "Aziz"
}
]
},
"button": [
{
"type": "button",
"sub_type": "mpm",
"index": 0,
"parameters": [
{
"type": "action",
"action": {
"thumbnail_product_retailer_id": "strw-002",
"sections": [
{
"title": "Dari Petani Langsung",
"product_items": [
{
"product_retailer_id": "8tziy9lloe"
},
{
"product_retailer_id": "mln-002"
}
]
},
{
"title": "Dari Pengepul",
"product_items": [
{
"product_retailer_id": "strw-001"
},
{
"product_retailer_id": "strw-002"
}
]
},
{
"title": "Dari Toko Buah",
"product_items": [
{
"product_retailer_id": "p235ynzaf6"
}
]
}
]
}
}
]
}
],
"attachment": "",
"backup_on": "",
"backup_exp": ""
}
}
}
Template Carousel
This section describes the request parameters and provides JSON request examples for sending messages via the WhatsApp channel use Template Carousel
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
template_id | AN (Alpha Numeric) | YES | Template Id registered |
header | JSON Object | NO | Message on header This field for dynamic parameter header (Mandatory) Type dynamic parameter: text, Image, video, document, location See “Description Field Header” for details |
message | JSON Object | NO | Message on body This field for dynamic parameter message (Mandatory) Type dynamic parameter: text See “Description Field Message” for details NOTE: if the template type is authentication, then the text value of the message must match the value of 'value_otp' on the button." |
type | String | YES | Type of message This value always “Body” for component template type message |
parameter | Array | YES | Detail information for parameter body dynamic |
type | String | YES | Type for body dynamic Example: text |
text | String | YES | Sample text dynamic from body Mandatory if body type text |
button | JSON Object | NO | Message on button This field for a dynamic card carousel component (Mandatory) Type dynamic parameter: button URL, button catalog, button MPM See “Description Field Button” for details NOTE: if the template type is authentication, then the text value of the message must match the value of 'value_otp' on the button." |
ype | String | YES | Type of Carousel This value always “Carousel” for component template type Carousel |
cards | Array | YES | Detail of the cards information |
card_index | Integer | YES | Zero-indexed order in which card should appear within the card carousel. 0 indicates first card, 1 indicates second card, etc. |
components | String | YES | Detail of the components cards information |
type | String | YES | Type from component carousel card Example: header, body, button |
parameters | Array | YES | Detail information for parameter component dynamic for detail see: “Additional fields required If field type is “header" , “body” , “button” |
type | String | YES | Type message in header Example: Image or Video |
image | JSON Object | NO | The field is used when the header type is an image. |
link | String | YES | Storage location for media files: image or video |
type | String | YES | Type from component carousel card Example: header, body, button |
parameters | Array | YES | Detail information for parameter component dynamic for detail see: “Additional fields required If field type is “header" , “body” , “button” |
type | String | YES | Type message in body |
text | JSON Object | YES | Sample message for param dynamic body |
type | String | YES | Type from component carousel card Example: header, body, button |
sub_type | String | NO | This field is used if components type is button Example: Quick_reply, URL |
index | Integer | NO | This field is used if components type is button index is the order of the button starting from 0 to 9 |
parameters | Array | YES | Detail information for parameter component dynamic for detail see: “Additional fields required If field type is “header" , “body” , “button” |
type | String | YES | Type from sub type button This value is always payload for the sub-type button Quick_Reply |
payload | String | NO | The payload defined by the developer that is displayed when the button is clicked, in addition to the display text on the button |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 4 – Failed 9 – Delivered Sample: 2;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire 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",
"created_by": "<value from sprint>",
"username": "<value from sprint>",
"ref_id": "<generated by client>",
"subject": "example subject",
"sender_id": "<value from sprint>",
"budget_code": "<generated by client>",
"channel": {
"whatsapp": {
"msisdn": "62858xxxxxxxx ",
"template_id": "carousel_boby_test",
"header": "",
"message": {
"type": "BODY",
"parameters": [
{
"type": "TEXT",
"text": "20OFF"
},
{
"type": "TEXT",
"text": "20%"
}
]
},
"button": "",
"carousel": {
"type": "CAROUSEL",
"cards": [
{
"card_index": 0,
"components": [
{
"type": "HEADER",
"parameters": [
{
"type": "IMAGE",
"image": {
"link": "https://media.sandeza.id/tes.jpg"
}
}
]
},
{
"type": "BODY",
"parameters": [
{
"type": "TEXT",
"text": "10OFF"
},
{
"type": "TEXT",
"text": "10%"
}
]
},
{
"type": "BUTTON",
"sub_type": "QUICK_REPLY",
"index": "0",
"parameters": [
{
"type": "PAYLOAD",
"payload": "59NqSd"
}
]
},
{
"type": "BUTTON",
"sub_type": "URL",
"index": "1",
"parameters": [
{
"type": "payload",
"payload": "last_chance_2023"
}
]
}
]
},
{
"card_index": 1,
"components": [
{
"type": "HEADER",
"parameters": [
{
"type": "IMAGE",
"image": {
"link": "https://media.sandeza.id/Tes.jpg"
}
}
]
},
{
"type": "BODY",
"parameters": [
{
"type": "TEXT",
"text": "30OFF"
},
{
"type": "TEXT",
"text": "30%"
}
]
},
{
"type": "BUTTON",
"sub_type": "QUICK_REPLY",
"index": "0",
"parameters": [
{
"type": "PAYLOAD",
"payload": "7C4xhY"
}
]
},
{
"type": "BUTTON",
"sub_type": "URL",
"index": "1",
"parameters": [
{
"type": "payload",
"payload": "carousel_boby_20240814"
}
]
}
]
}
]
},
"backup_on": "",
"backup_exp": ""
}
}
}
Use Delimeter Format
To send a message using a WhatsApp channel template in Delimeter format, there are several supported methods for sending messages with templates via the WhatsApp channel.
Template Static
This section describes the request parameters and provides JSON request examples for sending messages via the WhatsApp channel using a static template.
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
message | Text | NO | Static with template: This value can empty |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
attachment | Text | NO | Path 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_id | AN (Alpha Numeric) | YES | Template Code registered in Saneza |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 4 – Failed 9 – Delivered Sample: 2;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire 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": {
"whatsapp": {
"message": "",
"msisdn": "62858xxxxxxxx",
"attachment": "",
"template_id": "thankyou",
"backup_on": "",
"backup_exp": ""
}
}
}
Template Dynamic
This section describes the request parameters and provides JSON request examples for sending messages via the WhatsApp channel use Template Dynamic.
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
template_id | AN (Alpha Numeric) | YES | Template Code registered in Saneza |
message | Text | NO | Message on body Note: This field for dynamic parameter Format: type:=:value1 |
attachment | Text | NO | Path 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 |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 4 – Failed 9 – Delivered Sample: 2;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire 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": {
"whatsapp": {
"msisdn": "62858xxxxxxxx",
"template_id": "otp_layanan",
"message": "text:=:12345",
"attachment": "",
"backup_on": "",
"backup_exp": ""
}
}
}
Template Body (Dynamic) + Header (Dynamic Text)
This section describes the request parameters and provides JSON request examples for sending messages via the WhatsApp channel use Template with Body (Dynamic) + Header (Dynamic Text)
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
template_id | AN (Alpha Numeric) | YES | Template Code registered in Saneza |
header | Text | NO | Message on header Note: This field for dynamic parameter Format: type:=:value Type: text, Image, video, document, location Allowed sample extension: .jpeg, .png, 3gp, .mp4, .txt, .xls, .xlsx, .doc, .ppt Size limit image: 2MB Size limit video: 10MB Size limit document: 15MB Sample: Text: text:=:Sprint Doc: document:=:https://www.domain.com/test.pdf Image : image:=:https://www.domain.com/test.jpg |
message | Text | NO | Message on body Note: This field for dynamic parameter Format: type:=:value1 |
attachment | Text | NO | Path 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 |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 4 – Failed 9 – Delivered Sample: 2;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire 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": {
"whatsapp": {
"msisdn": "62858xxxxxxxx",
"template_id": "thankyou_text",
"header": "text:=:Sandeza",
"message": "text:=:Sprint||text:=:Sandeza",
"attachment": "",
"backup_on": "",
"backup_exp": ""
}
}
}
Template Body (Dynamic) + Header (Dynamic Image)
This section describes the request parameters and provides JSON request examples for sending messages via the WhatsApp channel use Template with Body (Dynamic) + Header (Dynamic Image)
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
template_id | AN (Alpha Numeric) | YES | Template Code registered in Saneza |
header | Text | NO | Message on header Note: This field for dynamic parameter Format: type:=:value Type: text, Image, video, document, location Allowed sample extension: .jpeg, .png, 3gp, .mp4, .txt, .xls, .xlsx, .doc, .ppt Size limit image: 2MB Size limit video: 10MB Size limit document: 15MB Sample: Text: text:=:Sprint Doc: document:=:https://www.domain.com/test.pdf Image : image:=:https://www.domain.com/test.jpg |
message | Text | NO | Message on body Note: This field for dynamic parameter Format: type:=:value1 |
attachment | Text | NO | Path 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 |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 4 – Failed 9 – Delivered Sample: 2;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire 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": {
"whatsapp": {
"msisdn": "62858xxxxxxxx",
"template_id": "thankyou_image",
"header": "image:=:https://media.sandeza.id/sandeza.png",
"message": "text:=:pagi||text:=:Sprint",
"attachment": "",
"backup_on": "",
"backup_exp": ""
}
}
}
Template Body (Dynamic) + Header (Dynamic Video)
This section describes the request parameters and provides JSON request examples for sending messages via the WhatsApp channel use Template with Body (Dynamic) + Header (Dynamic Video)
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
template_id | AN (Alpha Numeric) | YES | Template Code registered in Saneza |
header | Text | NO | Message on header Note: This field for dynamic parameter Format: type:=:value Type: text, Image, video, document, location Allowed sample extension: .jpeg, .png, 3gp, .mp4, .txt, .xls, .xlsx, .doc, .ppt Size limit image: 2MB Size limit video: 10MB Size limit document: 15MB Sample: Text: text:=:Sprint Doc: document:=:https://www.domain.com/test.pdf Image : image:=:https://www.domain.com/test.jpg |
message | Text | NO | Message on body Note: This field for dynamic parameter Format: type:=:value1 |
attachment | Text | NO | Path 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 |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 4 – Failed 9 – Delivered Sample: 2;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire 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": {
"whatsapp": {
"msisdn": "62858xxxxxxxx",
"template_id": "thankyou_video",
"header": "video:=:https://media.sandeza.id/sandeza.mp4",
"message": "text:=:pagi||text:=:Sprint",
"attachment": "",
"backup_on": "",
"backup_exp": ""
}
}
}
Template Body (Dynamic) + Header (Dynamic Document)
This section describes the request parameters and provides JSON request examples for sending messages via the WhatsApp channel use Template with Body (Dynamic) + Header (Dynamic Document)
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
template_id | AN (Alpha Numeric) | YES | Template Code registered in Saneza |
header | Text | NO | Message on header Note: This field for dynamic parameter Format: type:=:value Type: text, Image, video, document, location Allowed sample extension: .jpeg, .png, 3gp, .mp4, .txt, .xls, .xlsx, .doc, .ppt Size limit image: 2MB Size limit video: 10MB Size limit document: 15MB Sample: Text: text:=:Sprint Doc: document:=:https://www.domain.com/test.pdf Image : image:=:https://www.domain.com/test.jpg |
message | Text | NO | Message on body Note: This field for dynamic parameter Format: type:=:value1 |
attachment | Text | NO | Path 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 |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 4 – Failed 9 – Delivered Sample: 2;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire 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": {
"whatsapp": {
"msisdn": "62858xxxxxxxx ",
"template_id": "thankyou_document",
"header": "document:=:https://mdia.sandeza.id/Sandeza.pdf",
"message": "text:=:Sprint",
"attachment": "",
"backup_on": "",
"backup_exp": ""
}
}
}
Template Body (Dynamic) + Header (Dynamic Location)
This section describes the request parameters and provides JSON request examples for sending messages via the WhatsApp channel use Template with Body (Dynamic) + Header (Dynamic Location)
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
template_id | AN (Alpha Numeric) | YES | Template Code registered in Saneza |
header | Text | NO | Message on header Note: This field for dynamic parameter Format: type:=:value Type: text, Image, video, document, location Allowed sample extension: .jpeg, .png, 3gp, .mp4, .txt, .xls, .xlsx, .doc, .ppt Size limit image: 2MB Size limit video: 10MB Size limit document: 15MB Sample: Text: text:=:Sprint Doc: document:=:https://www.domain.com/test.pdf Image : image:=:https://www.domain.com/test.jpg |
message | Text | NO | Message on body Note: This field for dynamic parameter Format: type:=:value1 |
attachment | Text | NO | Path 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 |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 4 – Failed 9 – Delivered Sample: 2;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire 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": {
"whatsapp": {
"msisdn": "62858xxxxxxxx ",
"template_id": "thankyou_location",
"header": "location:=:-6.169760416259:=:106.8274961212:=:National Monument:=:Gambir Central Jakarta City, Jakarta",
"message": "text:=:Sprint",
"attachment": "",
"backup_on": "",
"backup_exp": ""
}
}
}
Template Body (Dynamic) + Header (Dynamic Text) + Button (Dynamic URL)
This section describes the request parameters and provides JSON request examples for sending messages via the WhatsApp channel use Template with Body (Dynamic) + Header (Dynamic Document) + Button (Dynamic URL)
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
template_id | AN (Alpha Numeric) | YES | Template Code registered in Saneza |
header | Text | NO | Message on header Note: This field for dynamic parameter Format: type:=:value Type: text, Image, video, document, location Allowed sample extension: .jpeg, .png, 3gp, .mp4, .txt, .xls, .xlsx, .doc, .ppt Size limit image: 2MB Size limit video: 10MB Size limit document: 15MB Sample: Text: text:=:Sprint Doc: document:=:https://www.domain.com/test.pdf Image : image:=:https://www.domain.com/test.jpg |
message | Text | NO | Message on body Note: This field for dynamic parameter Format: type:=:value1 |
button | Text | NO | Message on button Note: This field for dynamic parameter Format : Template button otp : button:=:url:=:value_otp Template button visit website: button:=:url:=:value_path_url Type: button URL Sample: button:=:url:=:123456 button:=:url:=:login.html NOTE: if the template type is authentication, then the text value of the message must match the value of 'value_otp' on the button." |
attachment | Text | NO | Path 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 |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 4 – Failed 9 – Delivered Sample: 2;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire 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": {
"whatsapp": {
"msisdn": "62858xxxxxxxx ",
"template_id": "sample_document_button",
"header": "document:=:https://mdia.sandeza.id/Sandeza.pdf",
"message": "text:=:Sprint",
"button": "button:=:url:=:login.html",
"attachment": "",
"backup_on": "",
"backup_exp": ""
}
}
}
Template With Button OTP
This section describes the request parameters and provides JSON request examples for sending messages via the WhatsApp channel use Template
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
budget_code | ANS (Alpha Numeric Space) | NO | Additional information, maximum 180 character |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
template_id | AN (Alpha Numeric) | YES | Template Code registered in Saneza |
header | Text | NO | Message on header Note: This field for dynamic parameter Format: type:=:value Type: text, Image, video, document, location Allowed sample extension: .jpeg, .png, 3gp, .mp4, .txt, .xls, .xlsx, .doc, .ppt Size limit image: 2MB Size limit video: 10MB Size limit document: 15MB Sample: Text: text:=:Sprint Doc: document:=:https://www.domain.com/test.pdf Image : image:=:https://www.domain.com/test.jpg |
message | Text | NO | Message on body Note: This field for dynamic parameter Format: type:=:value1 |
button | Text | NO | Message on button Note: This field for dynamic parameter Format : Template button otp : button:=:url:=:value_otp Template button visit website: button:=:url:=:value_path_url Type: button URL Sample: button:=:url:=:123456 button:=:url:=:login.html NOTE: if the template type is authentication, then the text value of the message must match the value of 'value_otp' on the button." |
attachment | Text | NO | Path 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 |
backup_on | AN (Alpha Numeric) | NO | Format: status1; status2 Mapping: 1 – Unsent 2 – Undelivered 3 – Pending 4 – Failed 9 – Delivered Sample: 2;3 |
backup_exp | AN (Alpha Numeric) | NO | Expire 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": {
"whatsapp": {
"msisdn": "62858xxxxxxxx ",
"template_id": "sample_template_otp",
"header": "",
"message": "text:=:123456",
"button": "button:=:url:=:123456",
"attachment": "",
"backup_on": "",
"backup_exp": ""
}
}
}
Channel WhatsApp Use Non-Template
In addition to using templates, the WhatsApp channel also allows you to send messages without templates. Here are a few ways to send using the Non-Template WhatsApp channel.
WhatsApp Type Text
This section describes the request parameters and provides JSON request examples for send a text-type message via the WhatsApp channel without using a template
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
message | JSON Object | YES | Message on WhatsApp See “Description Field Message” for details |
type | String | YES | Type of message Example: Text, Media (Audio, Image, Video, Document), Button, List, Location |
body | JSON Object | YES | This field is used for all message types See “Description Field in body” for details |
text | String | YES | Text message content in body This field used if type message is text |
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>",
"channel": {
"whatsapp": {
"msisdn": "62858xxxxxxxx ",
"message": {
"type": "text",
"body": {
"text": "testing non template"
}
}
}
}
}
WhatsApp Type Audio
This section describes the request parameters and provides JSON request examples for send an audio-type message via the WhatsApp channel without using a template
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
message | JSON Object | YES | Message on WhatsApp See “Description Field Message” for details |
type | String | YES | Type of message Example: Text, Media (Audio, Image, Video, Document), Button, List, Location |
body | JSON Object | YES | This field is used for all message types See “Description Field in body” for details |
media | JSON Object | NO | This field used if type message is media (audio, image, video, document) |
url | String | YES | Storage location for media files: audio, image, video, document |
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>",
"channel": {
"whatsapp": {
"msisdn": "62858xxxxxxxx ",
"message": {
"type": "audio",
"body": {
"media": {
"url": "https://media.wekonnek.id/konnek/file_example.mp3"
}
}
}
}
}
}
WhatsApp Type Image
This section describes the request parameters and provides JSON request examples for send an image-type message via the WhatsApp channel without using a template
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
message | JSON Object | YES | Message on WhatsApp See “Description Field Message” for details |
type | String | YES | Type of message Example: Text, Media (Audio, Image, Video, Document), Button, List, Location |
body | JSON Object | YES | This field is used for all message types See “Description Field in body” for details |
media | JSON Object | NO | This field used if type message is media (audio, image, video, document) |
url | String | YES | Storage location for media files: audio, image, video, document |
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>",
"channel": {
"whatsapp": {
"msisdn": "62858xxxxxxxx ",
"message": {
"type": "image",
"body": {
"media": {
"url": "https://media.sandeza.id/burung.png"
}
}
}
}
}
}
WhatsApp Type Video
This section describes the request parameters and provides JSON request examples for send a video-type message via the WhatsApp channel without using a template
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
message | JSON Object | YES | Message on WhatsApp See “Description Field Message” for details |
type | String | YES | Type of message Example: Text, Media (Audio, Image, Video, Document), Button, List, Location |
body | JSON Object | YES | This field is used for all message types See “Description Field in body” for details |
media | JSON Object | NO | This field used if type message is media (audio, image, video, document) |
url | String | YES | Storage location for media files: audio, image, video, document |
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>",
"channel": {
"whatsapp": {
"msisdn": "62858xxxxxxxx ",
"message": {
"type": "video",
"body": {
"media": {
"url": "https://media.sandeza.id/TEST VIDEO.mp4"
}
}
}
}
}
}
WhatsApp Type Document
This section describes the request parameters and provides JSON request examples for send a document-type message via the WhatsApp channel without using a template
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
message | JSON Object | YES | Message on WhatsApp See “Description Field Message” for details |
type | String | YES | Type of message Example: Text, Media (Audio, Image, Video, Document), Button, List, Location |
body | JSON Object | YES | This field is used for all message types See “Description Field in body” for details |
media | JSON Object | NO | This field used if type message is media (audio, image, video, document) |
url | String | YES | Storage location for media files: audio, image, video, document |
name | String | NO | Display name of the media file |
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>",
"channel": {
"whatsapp": {
"msisdn": "62858xxxxxxxx ",
"message": {
"type": "document",
"body": {
"media": {
"url": "https://media.sandeza.id/testing.doc",
"name": "sandeza.doc"
}
}
}
}
}
}
WhatsApp Type Button With Header text + Body text + Footer text
This section describes the request parameters and provides JSON request examples for send a button-type with header (text), body (text) and footer (text) message via the WhatsApp channel without using a template
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
message | JSON Object | YES | Message on WhatsApp See “Description Field Message” for details |
type | String | YES | Type of message Example: Text, Media (Audio, Image, Video, Document), Button, List, Location |
header | JSON Object | NO | This field is used for the message type Button & List See “Description Field in header” for details |
type | String | YES | Type message from header example: · If type message is button: text, image, video, document · If type message is list: text |
text | String | YES | Text message content in header |
body | JSON Object | YES | This field is used for all message types See “Description Field in body” for details |
text | String | YES | Text message content in body This field used if type message is text |
button | Array | NO | This field used if type message is button |
Type | String | YES | Type from button in body |
key | String | YES | Button ID received from the client and returned if there is a post back from the client. |
title | String | YES | As a button label (name of the button to be selected). |
footer | JSON Object | NO | This field is used for the message type Button & List See “Description Field in footer” for details |
text | String | NO | Text message content in footer |
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>",
"channel": {
"whatsapp": {
"msisdn": "62858xxxxxxxx ",
"message": {
"type": "button",
"header": {
"type": "text",
"text": "HEADER"
},
"body": {
"text": "message button",
"button": [
{
"type": "postback",
"key": "button1",
"title": "Button 1"
},
{
"type": "postback",
"key": "button2",
"title": "Button 2"
},
{
"type": "postback",
"key": "button3",
"title": "Button 3"
}
]
},
"footer": {
"text": "FOOTER"
}
}
}
}
}
WhatsApp Type Button With Header image + Body text + Footer text
This section describes the request parameters and provides JSON request examples for send a button-type with header (image), body (text) and footer (text) message via the WhatsApp channel without using a template
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
message | JSON Object | YES | Message on WhatsApp See “Description Field Message” for details |
type | String | YES | Type of message Example: Text, Media (Audio, Image, Video, Document), Button, List, Location |
header | JSON Object | NO | This field is used for the message type Button & List See “Description Field in header” for details |
type | String | YES | Type message from header example: · If type message is button: text, image, video, document · If type message is list: text |
media_url | String | NO | Storage location for media files: image or video |
body | JSON Object | YES | This field is used for all message types See “Description Field in body” for details |
text | String | YES | Text message content in body This field used if type message is text |
button | Array | NO | This field used if type message is button |
Type | String | YES | Type from button in body |
key | String | YES | Button ID received from the client and returned if there is a post back from the client. |
title | String | YES | As a button label (name of the button to be selected). |
footer | JSON Object | NO | This field is used for the message type Button & List See “Description Field in footer” for details |
text | String | NO | Text message content in footer |
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>",
"channel": {
"whatsapp": {
"msisdn": "62858xxxxxxxx ",
"message": {
"type": "button",
"header": {
"type": "image",
"media_url": "https://media.sandeza.id/burung.png"
},
"body": {
"text": "message button",
"button": [
{
"type": "postback",
"key": "button1",
"title": "Button 1"
},
{
"type": "postback",
"key": "button2",
"title": "Button 2"
},
{
"type": "postback",
"key": "button3",
"title": "Button 3"
}
]
},
"footer": {
"text": "FOOTER"
}
}
}
}
}
WhatsApp Type Button With Header video + Body text + Footer text
This section describes the request parameters and provides JSON request examples for send a button-type with header (video), body (text) and footer (text) message via the WhatsApp channel without using a template
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
message | JSON Object | YES | Message on WhatsApp See “Description Field Message” for details |
type | String | YES | Type of message Example: Text, Media (Audio, Image, Video, Document), Button, List, Location |
header | JSON Object | NO | This field is used for the message type Button & List See “Description Field in header” for details |
type | String | YES | Type message from header example: · If type message is button: text, image, video, document · If type message is list: text |
media_url | String | NO | Storage location for media files: image or video |
body | JSON Object | YES | This field is used for all message types See “Description Field in body” for details |
text | String | YES | Text message content in body This field used if type message is text |
button | Array | NO | This field used if type message is button |
Type | String | YES | Type from button in body |
key | String | YES | Button ID received from the client and returned if there is a post back from the client. |
title | String | YES | As a button label (name of the button to be selected). |
footer | JSON Object | NO | This field is used for the message type Button & List See “Description Field in footer” for details |
text | String | NO | Text message content in footer |
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>",
"channel": {
"whatsapp": {
"msisdn": "62858xxxxxxxx ",
"message": {
"type": "button",
"header": {
"type": "video",
"media_url": "https://media.sandeza.id/20VIDEO.mp4"
},
"body": {
"text": "message button",
"button": [
{
"type": "postback",
"key": "button1",
"title": "Button 1"
},
{
"type": "postback",
"key": "button2",
"title": "Button 2"
},
{
"type": "postback",
"key": "button3",
"title": "Button 3"
}
]
},
"footer": {
"text": "FOOTER"
}
}
}
}
}
WhatsApp Type Button With Header Document + Body text + Footer text
This section describes the request parameters and provides JSON request examples for send a button-type with header (document), body (text) and footer (text) message via the WhatsApp channel without using a template
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
message | JSON Object | YES | Message on WhatsApp See “Description Field Message” for details |
type | String | YES | Type of message Example: Text, Media (Audio, Image, Video, Document), Button, List, Location |
header | JSON Object | NO | This field is used for the message type Button & List See “Description Field in header” for details |
type | String | YES | Type message from header example: · If type message is button: text, image, video, document · If type message is list: text |
media_url | String | NO | Storage location for media files: image or video |
name | String | NO | Display name of the media file |
body | JSON Object | YES | This field is used for all message types See “Description Field in body” for details |
text | String | YES | Text message content in body This field used if type message is text |
button | Array | NO | This field used if type message is button |
Type | String | YES | Type from button in body |
key | String | YES | Button ID received from the client and returned if there is a post back from the client. |
title | String | YES | As a button label (name of the button to be selected). |
footer | JSON Object | NO | This field is used for the message type Button & List See “Description Field in footer” for details |
text | String | NO | Text message content in footer |
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>",
"channel": {
"whatsapp": {
"msisdn": "62858xxxxxxxx ",
"message": {
"type": "button",
"header": {
"type": "document",
"media_url": "https://media.sandeza.id/Sample.pdf",
"name": "sandeza.pdf"
},
"body": {
"text": "message button",
"button": [
{
"type": "postback",
"key": "button1",
"title": "Button 1"
},
{
"type": "postback",
"key": "button2",
"title": "Button 2"
},
{
"type": "postback",
"key": "button3",
"title": "Button 3"
}
]
},
"footer": {
"text": "FOOTER"
}
}
}
}
}
WhatsApp Type List With Header text + Body Text + Footer text
This section describes the request parameters and provides JSON request examples for send a list-type with header (text), body (text) and footer (text) message via the WhatsApp channel without using a template
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
message | JSON Object | YES | Message on WhatsApp See “Description Field Message” for details |
type | String | YES | Type of message Example: Text, Media (Audio, Image, Video, Document), Button, List, Location |
header | JSON Object | NO | This field is used for the message type Button & List See “Description Field in header” for details |
type | String | YES | Type message from header example: · If type message is button: text, image, video, document · If type message is list: text |
text | String | YES | Text message content in header |
body | JSON Object | YES | This field is used for all message types See “Description Field in body” for details |
text | String | YES | Text message content in body This field used if type message is text |
list | JSON Object | NO | This field used if type message is list |
title | String | YES | As a button label (name of the button to be selected). |
section | Array | YES | Details of the section information |
title | String | YES | Name of the section |
description | JSON Object | YES | Description of the section. |
actions | Array | YES | Details of the action information |
type | String | YES | Type from section list |
key | String | YES | list ID received from the client and returned if there is a post back from the client. |
title | String | YES | Name of the selected list |
footer | JSON Object | NO | This field is used for the message type Button & List See “Description Field in footer” for details |
text | String | NO | Text message content in footer |
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>",
"channel": {
"whatsapp": {
"msisdn": "62858xxxxxxxx ",
"message": {
"type": "list",
"header": {
"type": "text",
"text": "HEADER"
},
"body": {
"text": "message list",
"list": {
"title": "Title",
"sections": [
{
"title": "Section 1",
"description": "section satu desc",
"actions": [
{
"type": "postback",
"key": "action_1_1",
"title": "Action.1.1"
},
{
"type": "postback",
"key": "button_1_2",
"title": "Button.1.2"
},
{
"type": "postback",
"key": "button_1_3",
"title": "Button.1.3"
}
]
},
{
"title": "Section 2",
"description": "section dua desc",
"actions": [
{
"type": "postback",
"key": "action_2_1",
"title": "Action.2.1"
},
{
"type": "postback",
"key": "button_2_2",
"title": "Button.2.2"
},
{
"type": "postback",
"key": "button_2_3",
"title": "Button.2.3"
}
]
}
]
}
},
"footer": {
"text": "FOOTER"
}
}
}
}
}
WhatsApp Type Location
This section describes the request parameters and provides JSON request examples for send a text-type message via the WhatsApp channel without using a template
Description Parameter Request
FIELD | TYPE ALLOWED | MANDATORY | DESCRIPTION |
---|---|---|---|
signature | SHA 256 Hash | YES | Encrypted (Username+Password+Time), time refers to time field |
time | String (Unix timestamp) | YES | Current Request Time (Unix Timestamp) Example: Friday, November 1, 2024, 5:47:43 PM GMT+07:00 becomes “1730458063” |
type | N (Numeric) | YES | 1 (Send Primary Backup), 2 (Single channel / Send All) |
username | AN (Alpha Numeric) | YES | Username Division |
ref_id | AN (Alpha Numeric) (≤50) | YES | Unique Id generated by client (lowercase) |
subject | ANS (Alpha Numeric Space) (< 100) | YES | Sending Message Subject |
sender_id | ANS (Alpha Numeric Space) | YES | Sender Name (provided by sprint) |
channel | JSON Object | YES | Describe the channels used for sending messages Channel: SMS, Email, Line, Telegram, Facebook, WhatsApp |
JSON Object | YES | Describes the message content and delivery configuration for the WhatsApp channel | |
msisdn | N (Numeric), Plus (+) | YES | Mobile phone number, with 0, 62 or + |
message | JSON Object | YES | Message on WhatsApp See “Description Field Message” for details |
type | String | YES | Type of message Example: Text, Media (Audio, Image, Video, Document), Button, List, Location |
body | JSON Object | YES | This field is used for all message types See “Description Field in body” for details |
location | JSON Object | YES | This field used if type message is location |
latitude | Float | YES | Type Location (coordinates point). |
longitude | Float | YES | Type Location (coordinates point). |
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>",
"channel": {
"whatsapp": {
"msisdn": "62858xxxxxxxx ",
"message": {
"type": "location",
"body": {
"location": {
"latitude": -6.34282,
"longitude": 106.75267
}
}
}
}
}
}