Send Image Message
curl --request POST \
--url https://api.example.com/api/v1/campaign/rcs/message/image \
--header 'Content-Type: application/json' \
--data '
{
"to": "<string>",
"botId": "<string>",
"imageUrl": "<string>",
"suggestions": [
{
"type": "<string>",
"text": "<string>",
"postback": "<string>",
"url": "<string>",
"phoneNumber": "<string>",
"label": "<string>",
"latitude": 123,
"longitude": 123,
"title": "<string>",
"description": "<string>",
"startTime": "<string>",
"endTime": "<string>"
}
],
"source": "<string>",
"linkWithRecord": true,
"reportURL": "<string>",
"submissionStatus": true
}
'import requests
url = "https://api.example.com/api/v1/campaign/rcs/message/image"
payload = {
"to": "<string>",
"botId": "<string>",
"imageUrl": "<string>",
"suggestions": [
{
"type": "<string>",
"text": "<string>",
"postback": "<string>",
"url": "<string>",
"phoneNumber": "<string>",
"label": "<string>",
"latitude": 123,
"longitude": 123,
"title": "<string>",
"description": "<string>",
"startTime": "<string>",
"endTime": "<string>"
}
],
"source": "<string>",
"linkWithRecord": True,
"reportURL": "<string>",
"submissionStatus": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
to: '<string>',
botId: '<string>',
imageUrl: '<string>',
suggestions: [
{
type: '<string>',
text: '<string>',
postback: '<string>',
url: '<string>',
phoneNumber: '<string>',
label: '<string>',
latitude: 123,
longitude: 123,
title: '<string>',
description: '<string>',
startTime: '<string>',
endTime: '<string>'
}
],
source: '<string>',
linkWithRecord: true,
reportURL: '<string>',
submissionStatus: true
})
};
fetch('https://api.example.com/api/v1/campaign/rcs/message/image', 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://api.example.com/api/v1/campaign/rcs/message/image",
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([
'to' => '<string>',
'botId' => '<string>',
'imageUrl' => '<string>',
'suggestions' => [
[
'type' => '<string>',
'text' => '<string>',
'postback' => '<string>',
'url' => '<string>',
'phoneNumber' => '<string>',
'label' => '<string>',
'latitude' => 123,
'longitude' => 123,
'title' => '<string>',
'description' => '<string>',
'startTime' => '<string>',
'endTime' => '<string>'
]
],
'source' => '<string>',
'linkWithRecord' => true,
'reportURL' => '<string>',
'submissionStatus' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://api.example.com/api/v1/campaign/rcs/message/image"
payload := strings.NewReader("{\n \"to\": \"<string>\",\n \"botId\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"suggestions\": [\n {\n \"type\": \"<string>\",\n \"text\": \"<string>\",\n \"postback\": \"<string>\",\n \"url\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"label\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ],\n \"source\": \"<string>\",\n \"linkWithRecord\": true,\n \"reportURL\": \"<string>\",\n \"submissionStatus\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.example.com/api/v1/campaign/rcs/message/image")
.header("Content-Type", "application/json")
.body("{\n \"to\": \"<string>\",\n \"botId\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"suggestions\": [\n {\n \"type\": \"<string>\",\n \"text\": \"<string>\",\n \"postback\": \"<string>\",\n \"url\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"label\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ],\n \"source\": \"<string>\",\n \"linkWithRecord\": true,\n \"reportURL\": \"<string>\",\n \"submissionStatus\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/campaign/rcs/message/image")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"to\": \"<string>\",\n \"botId\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"suggestions\": [\n {\n \"type\": \"<string>\",\n \"text\": \"<string>\",\n \"postback\": \"<string>\",\n \"url\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"label\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ],\n \"source\": \"<string>\",\n \"linkWithRecord\": true,\n \"reportURL\": \"<string>\",\n \"submissionStatus\": true\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Message sent successfully"
}
{
"status": false,
"message": "Invalid data Provided"
}
{
"status": false,
"message": "Unauthorised"
}
Direct Messages
Send Image Message
POST
/
api
/
v1
/
campaign
/
rcs
/
message
/
image
Send Image Message
curl --request POST \
--url https://api.example.com/api/v1/campaign/rcs/message/image \
--header 'Content-Type: application/json' \
--data '
{
"to": "<string>",
"botId": "<string>",
"imageUrl": "<string>",
"suggestions": [
{
"type": "<string>",
"text": "<string>",
"postback": "<string>",
"url": "<string>",
"phoneNumber": "<string>",
"label": "<string>",
"latitude": 123,
"longitude": 123,
"title": "<string>",
"description": "<string>",
"startTime": "<string>",
"endTime": "<string>"
}
],
"source": "<string>",
"linkWithRecord": true,
"reportURL": "<string>",
"submissionStatus": true
}
'import requests
url = "https://api.example.com/api/v1/campaign/rcs/message/image"
payload = {
"to": "<string>",
"botId": "<string>",
"imageUrl": "<string>",
"suggestions": [
{
"type": "<string>",
"text": "<string>",
"postback": "<string>",
"url": "<string>",
"phoneNumber": "<string>",
"label": "<string>",
"latitude": 123,
"longitude": 123,
"title": "<string>",
"description": "<string>",
"startTime": "<string>",
"endTime": "<string>"
}
],
"source": "<string>",
"linkWithRecord": True,
"reportURL": "<string>",
"submissionStatus": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
to: '<string>',
botId: '<string>',
imageUrl: '<string>',
suggestions: [
{
type: '<string>',
text: '<string>',
postback: '<string>',
url: '<string>',
phoneNumber: '<string>',
label: '<string>',
latitude: 123,
longitude: 123,
title: '<string>',
description: '<string>',
startTime: '<string>',
endTime: '<string>'
}
],
source: '<string>',
linkWithRecord: true,
reportURL: '<string>',
submissionStatus: true
})
};
fetch('https://api.example.com/api/v1/campaign/rcs/message/image', 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://api.example.com/api/v1/campaign/rcs/message/image",
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([
'to' => '<string>',
'botId' => '<string>',
'imageUrl' => '<string>',
'suggestions' => [
[
'type' => '<string>',
'text' => '<string>',
'postback' => '<string>',
'url' => '<string>',
'phoneNumber' => '<string>',
'label' => '<string>',
'latitude' => 123,
'longitude' => 123,
'title' => '<string>',
'description' => '<string>',
'startTime' => '<string>',
'endTime' => '<string>'
]
],
'source' => '<string>',
'linkWithRecord' => true,
'reportURL' => '<string>',
'submissionStatus' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://api.example.com/api/v1/campaign/rcs/message/image"
payload := strings.NewReader("{\n \"to\": \"<string>\",\n \"botId\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"suggestions\": [\n {\n \"type\": \"<string>\",\n \"text\": \"<string>\",\n \"postback\": \"<string>\",\n \"url\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"label\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ],\n \"source\": \"<string>\",\n \"linkWithRecord\": true,\n \"reportURL\": \"<string>\",\n \"submissionStatus\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.example.com/api/v1/campaign/rcs/message/image")
.header("Content-Type", "application/json")
.body("{\n \"to\": \"<string>\",\n \"botId\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"suggestions\": [\n {\n \"type\": \"<string>\",\n \"text\": \"<string>\",\n \"postback\": \"<string>\",\n \"url\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"label\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ],\n \"source\": \"<string>\",\n \"linkWithRecord\": true,\n \"reportURL\": \"<string>\",\n \"submissionStatus\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/campaign/rcs/message/image")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"to\": \"<string>\",\n \"botId\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"suggestions\": [\n {\n \"type\": \"<string>\",\n \"text\": \"<string>\",\n \"postback\": \"<string>\",\n \"url\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"label\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ],\n \"source\": \"<string>\",\n \"linkWithRecord\": true,\n \"reportURL\": \"<string>\",\n \"submissionStatus\": true\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Message sent successfully"
}
{
"status": false,
"message": "Invalid data Provided"
}
{
"status": false,
"message": "Unauthorised"
}
Body
string
required
Specifies the recipient’s phone number in international format (e.g.,
“1xxxxxxxxxx”).
string
required
This is the unique identifier associated with the RCS bot. Find the BOT ID on
the Zixflow RCS Settings page. RCS
Settings
string
required
Image url which need to send
array
required
A Suggestions Object includes the following fields and formatting options:
Show Suggestions
Show Suggestions
string
default:"reply"
required
Suggestion Type Options: “reply”, “open-url”, “dialer”, “location”,
“calendar-event”
string
required
Displayed as button text to the end user.
string
(Optional) Used to track user interactions. When clicked, a unique
postback event is triggered on the webhook.
string
Required if type is “open-url”. Must be a valid URL. Example:
https://google.com
string
Required for “dialer” type. Must be a valid phone number with country code
and ”+” prefix. Example: +919876543210
string
Required for “location” type. Label for the location. Example: “Office
Location”
number
Required for “location” type. Latitude value in numeric format. Example:
12.9363301
number
Required for “location” type. Longitude value in numeric format. Example:
77.6084231
string
Required for “calendar-event” type. Event title. Example: “Zixflow
Appointment”
string
Required for “calendar-event” type. Event description. Example:
“Appointment with Zixflow team to understand their application.”
string
Required for “calendar-event” type. Start date and time in ISO format.
Example: “2024-11-30T14:00:00Z”
string
Required for “calendar-event” type. End date and time in ISO format.
Example: “2024-11-30T15:00:00Z”
string
default:"API"
If the “linkWithRecord” is set to true, the source from which the WhatsApp
message is sent should be mentioned; otherwise, it defaults to API.
boolean
Specify whether to associate the current message with a record and display it
in the inbox. Set it to “true” for linking with a record; otherwise, it
defaults to “false.”
string
(Optional) Specify the URL where the user’s report and deliveries should be
delivered.
boolean
(Optional) Indicates whether to wait for the submission status. Set it to
“true” if you want to wait for the submission status; otherwise, it defaults
to “false.”
Response
boolean
Indicates whether the call was successful. true if successful, false if not.
string
success or error response message
{
"status": true,
"message": "Message sent successfully"
}
{
"status": false,
"message": "Invalid data Provided"
}
{
"status": false,
"message": "Unauthorised"
}
⌘I