Send a template message with a base64 file
curl --request POST \
--url https://smartsend-server.otherwise.co.il/integrations/make/messages/send-template-base64 \
--header 'Content-Type: application/json' \
--header 'x-organization-id: <api-key>' \
--data '
{
"phoneNumber": "<string>",
"templateName": "<string>",
"fileData": "<string>",
"fileName": "<string>",
"languageCode": "<string>",
"parameters": [
"<string>"
],
"sentByUserId": "<string>",
"sentByUserName": "<string>"
}
'import requests
url = "https://smartsend-server.otherwise.co.il/integrations/make/messages/send-template-base64"
payload = {
"phoneNumber": "<string>",
"templateName": "<string>",
"fileData": "<string>",
"fileName": "<string>",
"languageCode": "<string>",
"parameters": ["<string>"],
"sentByUserId": "<string>",
"sentByUserName": "<string>"
}
headers = {
"x-organization-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-organization-id': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phoneNumber: '<string>',
templateName: '<string>',
fileData: '<string>',
fileName: '<string>',
languageCode: '<string>',
parameters: ['<string>'],
sentByUserId: '<string>',
sentByUserName: '<string>'
})
};
fetch('https://smartsend-server.otherwise.co.il/integrations/make/messages/send-template-base64', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://smartsend-server.otherwise.co.il/integrations/make/messages/send-template-base64",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'phoneNumber' => '<string>',
'templateName' => '<string>',
'fileData' => '<string>',
'fileName' => '<string>',
'languageCode' => '<string>',
'parameters' => [
'<string>'
],
'sentByUserId' => '<string>',
'sentByUserName' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-organization-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://smartsend-server.otherwise.co.il/integrations/make/messages/send-template-base64"
payload := strings.NewReader("{\n \"phoneNumber\": \"<string>\",\n \"templateName\": \"<string>\",\n \"fileData\": \"<string>\",\n \"fileName\": \"<string>\",\n \"languageCode\": \"<string>\",\n \"parameters\": [\n \"<string>\"\n ],\n \"sentByUserId\": \"<string>\",\n \"sentByUserName\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-organization-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://smartsend-server.otherwise.co.il/integrations/make/messages/send-template-base64")
.header("x-organization-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phoneNumber\": \"<string>\",\n \"templateName\": \"<string>\",\n \"fileData\": \"<string>\",\n \"fileName\": \"<string>\",\n \"languageCode\": \"<string>\",\n \"parameters\": [\n \"<string>\"\n ],\n \"sentByUserId\": \"<string>\",\n \"sentByUserName\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://smartsend-server.otherwise.co.il/integrations/make/messages/send-template-base64")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-organization-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phoneNumber\": \"<string>\",\n \"templateName\": \"<string>\",\n \"fileData\": \"<string>\",\n \"fileName\": \"<string>\",\n \"languageCode\": \"<string>\",\n \"parameters\": [\n \"<string>\"\n ],\n \"sentByUserId\": \"<string>\",\n \"sentByUserName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyMake.com Integration
Send a template message with a base64 file
Accepts a base64-encoded file, uploads it to CDN, then sends the template with the file as header media. Use this when you have file data (e.g. from Google Drive download) instead of a public URL.
POST
/
integrations
/
make
/
messages
/
send-template-base64
Send a template message with a base64 file
curl --request POST \
--url https://smartsend-server.otherwise.co.il/integrations/make/messages/send-template-base64 \
--header 'Content-Type: application/json' \
--header 'x-organization-id: <api-key>' \
--data '
{
"phoneNumber": "<string>",
"templateName": "<string>",
"fileData": "<string>",
"fileName": "<string>",
"languageCode": "<string>",
"parameters": [
"<string>"
],
"sentByUserId": "<string>",
"sentByUserName": "<string>"
}
'import requests
url = "https://smartsend-server.otherwise.co.il/integrations/make/messages/send-template-base64"
payload = {
"phoneNumber": "<string>",
"templateName": "<string>",
"fileData": "<string>",
"fileName": "<string>",
"languageCode": "<string>",
"parameters": ["<string>"],
"sentByUserId": "<string>",
"sentByUserName": "<string>"
}
headers = {
"x-organization-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-organization-id': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phoneNumber: '<string>',
templateName: '<string>',
fileData: '<string>',
fileName: '<string>',
languageCode: '<string>',
parameters: ['<string>'],
sentByUserId: '<string>',
sentByUserName: '<string>'
})
};
fetch('https://smartsend-server.otherwise.co.il/integrations/make/messages/send-template-base64', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://smartsend-server.otherwise.co.il/integrations/make/messages/send-template-base64",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'phoneNumber' => '<string>',
'templateName' => '<string>',
'fileData' => '<string>',
'fileName' => '<string>',
'languageCode' => '<string>',
'parameters' => [
'<string>'
],
'sentByUserId' => '<string>',
'sentByUserName' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-organization-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://smartsend-server.otherwise.co.il/integrations/make/messages/send-template-base64"
payload := strings.NewReader("{\n \"phoneNumber\": \"<string>\",\n \"templateName\": \"<string>\",\n \"fileData\": \"<string>\",\n \"fileName\": \"<string>\",\n \"languageCode\": \"<string>\",\n \"parameters\": [\n \"<string>\"\n ],\n \"sentByUserId\": \"<string>\",\n \"sentByUserName\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-organization-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://smartsend-server.otherwise.co.il/integrations/make/messages/send-template-base64")
.header("x-organization-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phoneNumber\": \"<string>\",\n \"templateName\": \"<string>\",\n \"fileData\": \"<string>\",\n \"fileName\": \"<string>\",\n \"languageCode\": \"<string>\",\n \"parameters\": [\n \"<string>\"\n ],\n \"sentByUserId\": \"<string>\",\n \"sentByUserName\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://smartsend-server.otherwise.co.il/integrations/make/messages/send-template-base64")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-organization-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phoneNumber\": \"<string>\",\n \"templateName\": \"<string>\",\n \"fileData\": \"<string>\",\n \"fileName\": \"<string>\",\n \"languageCode\": \"<string>\",\n \"parameters\": [\n \"<string>\"\n ],\n \"sentByUserId\": \"<string>\",\n \"sentByUserName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Your SmartSend Organization ID. Required on every request.
Body
application/json
Phone number in any format (972..., 05..., +972...)
Name of the approved WhatsApp template
Base64-encoded file content
File name with extension (e.g. proposal.pdf)
Template language code (default 'he')
Template parameters for variable substitution
Response
200
Template message sent successfully with uploaded file
⌘I