Dispatch Call to Action (CTA) Formats
curl --request POST \
--url https://app.wachat.net/api/v1/send/cta \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instanceName": "<string>",
"number": "<string>",
"type": "interactive",
"interactive": {
"type": "cta",
"body": "Visit our landing page or contact our sales team now.",
"buttons": [
{
"index": 1,
"urlButton": {
"displayText": "Visit",
"url": "https://www.wachat.net"
}
},
{
"index": 2,
"callButton": {
"displayText": "Contact us",
"phoneNumber": "+62812345678"
}
}
],
"title": "New Wachat.net Service",
"footer": "Powered by Wachat"
},
"delay": 123
}
'import requests
url = "https://app.wachat.net/api/v1/send/cta"
payload = {
"instanceName": "<string>",
"number": "<string>",
"type": "interactive",
"interactive": {
"type": "cta",
"body": "Visit our landing page or contact our sales team now.",
"buttons": [
{
"index": 1,
"urlButton": {
"displayText": "Visit",
"url": "https://www.wachat.net"
}
},
{
"index": 2,
"callButton": {
"displayText": "Contact us",
"phoneNumber": "+62812345678"
}
}
],
"title": "New Wachat.net Service",
"footer": "Powered by Wachat"
},
"delay": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
instanceName: '<string>',
number: '<string>',
type: 'interactive',
interactive: {
type: 'cta',
body: JSON.stringify('Visit our landing page or contact our sales team now.'),
buttons: [
{index: 1, urlButton: {displayText: 'Visit', url: 'https://www.wachat.net'}},
{index: 2, callButton: {displayText: 'Contact us', phoneNumber: '+62812345678'}}
],
title: 'New Wachat.net Service',
footer: 'Powered by Wachat'
},
delay: 123
})
};
fetch('https://app.wachat.net/api/v1/send/cta', 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://app.wachat.net/api/v1/send/cta",
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([
'instanceName' => '<string>',
'number' => '<string>',
'type' => 'interactive',
'interactive' => [
'type' => 'cta',
'body' => 'Visit our landing page or contact our sales team now.',
'buttons' => [
[
'index' => 1,
'urlButton' => [
'displayText' => 'Visit',
'url' => 'https://www.wachat.net'
]
],
[
'index' => 2,
'callButton' => [
'displayText' => 'Contact us',
'phoneNumber' => '+62812345678'
]
]
],
'title' => 'New Wachat.net Service',
'footer' => 'Powered by Wachat'
],
'delay' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.wachat.net/api/v1/send/cta"
payload := strings.NewReader("{\n \"instanceName\": \"<string>\",\n \"number\": \"<string>\",\n \"type\": \"interactive\",\n \"interactive\": {\n \"type\": \"cta\",\n \"body\": \"Visit our landing page or contact our sales team now.\",\n \"buttons\": [\n {\n \"index\": 1,\n \"urlButton\": {\n \"displayText\": \"Visit\",\n \"url\": \"https://www.wachat.net\"\n }\n },\n {\n \"index\": 2,\n \"callButton\": {\n \"displayText\": \"Contact us\",\n \"phoneNumber\": \"+62812345678\"\n }\n }\n ],\n \"title\": \"New Wachat.net Service\",\n \"footer\": \"Powered by Wachat\"\n },\n \"delay\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.wachat.net/api/v1/send/cta")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"instanceName\": \"<string>\",\n \"number\": \"<string>\",\n \"type\": \"interactive\",\n \"interactive\": {\n \"type\": \"cta\",\n \"body\": \"Visit our landing page or contact our sales team now.\",\n \"buttons\": [\n {\n \"index\": 1,\n \"urlButton\": {\n \"displayText\": \"Visit\",\n \"url\": \"https://www.wachat.net\"\n }\n },\n {\n \"index\": 2,\n \"callButton\": {\n \"displayText\": \"Contact us\",\n \"phoneNumber\": \"+62812345678\"\n }\n }\n ],\n \"title\": \"New Wachat.net Service\",\n \"footer\": \"Powered by Wachat\"\n },\n \"delay\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.wachat.net/api/v1/send/cta")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"instanceName\": \"<string>\",\n \"number\": \"<string>\",\n \"type\": \"interactive\",\n \"interactive\": {\n \"type\": \"cta\",\n \"body\": \"Visit our landing page or contact our sales team now.\",\n \"buttons\": [\n {\n \"index\": 1,\n \"urlButton\": {\n \"displayText\": \"Visit\",\n \"url\": \"https://www.wachat.net\"\n }\n },\n {\n \"index\": 2,\n \"callButton\": {\n \"displayText\": \"Contact us\",\n \"phoneNumber\": \"+62812345678\"\n }\n }\n ],\n \"title\": \"New Wachat.net Service\",\n \"footer\": \"Powered by Wachat\"\n },\n \"delay\": 123\n}"
response = http.request(request)
puts response.read_bodyMessages
Send CTA Buttons
Direct transaction pipelines effectively by serving contextual messages that contain automated triggers to launch outbound hyperlinks or click-to-dial customer support lines.
POST
/
send
/
cta
Dispatch Call to Action (CTA) Formats
curl --request POST \
--url https://app.wachat.net/api/v1/send/cta \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instanceName": "<string>",
"number": "<string>",
"type": "interactive",
"interactive": {
"type": "cta",
"body": "Visit our landing page or contact our sales team now.",
"buttons": [
{
"index": 1,
"urlButton": {
"displayText": "Visit",
"url": "https://www.wachat.net"
}
},
{
"index": 2,
"callButton": {
"displayText": "Contact us",
"phoneNumber": "+62812345678"
}
}
],
"title": "New Wachat.net Service",
"footer": "Powered by Wachat"
},
"delay": 123
}
'import requests
url = "https://app.wachat.net/api/v1/send/cta"
payload = {
"instanceName": "<string>",
"number": "<string>",
"type": "interactive",
"interactive": {
"type": "cta",
"body": "Visit our landing page or contact our sales team now.",
"buttons": [
{
"index": 1,
"urlButton": {
"displayText": "Visit",
"url": "https://www.wachat.net"
}
},
{
"index": 2,
"callButton": {
"displayText": "Contact us",
"phoneNumber": "+62812345678"
}
}
],
"title": "New Wachat.net Service",
"footer": "Powered by Wachat"
},
"delay": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
instanceName: '<string>',
number: '<string>',
type: 'interactive',
interactive: {
type: 'cta',
body: JSON.stringify('Visit our landing page or contact our sales team now.'),
buttons: [
{index: 1, urlButton: {displayText: 'Visit', url: 'https://www.wachat.net'}},
{index: 2, callButton: {displayText: 'Contact us', phoneNumber: '+62812345678'}}
],
title: 'New Wachat.net Service',
footer: 'Powered by Wachat'
},
delay: 123
})
};
fetch('https://app.wachat.net/api/v1/send/cta', 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://app.wachat.net/api/v1/send/cta",
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([
'instanceName' => '<string>',
'number' => '<string>',
'type' => 'interactive',
'interactive' => [
'type' => 'cta',
'body' => 'Visit our landing page or contact our sales team now.',
'buttons' => [
[
'index' => 1,
'urlButton' => [
'displayText' => 'Visit',
'url' => 'https://www.wachat.net'
]
],
[
'index' => 2,
'callButton' => [
'displayText' => 'Contact us',
'phoneNumber' => '+62812345678'
]
]
],
'title' => 'New Wachat.net Service',
'footer' => 'Powered by Wachat'
],
'delay' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.wachat.net/api/v1/send/cta"
payload := strings.NewReader("{\n \"instanceName\": \"<string>\",\n \"number\": \"<string>\",\n \"type\": \"interactive\",\n \"interactive\": {\n \"type\": \"cta\",\n \"body\": \"Visit our landing page or contact our sales team now.\",\n \"buttons\": [\n {\n \"index\": 1,\n \"urlButton\": {\n \"displayText\": \"Visit\",\n \"url\": \"https://www.wachat.net\"\n }\n },\n {\n \"index\": 2,\n \"callButton\": {\n \"displayText\": \"Contact us\",\n \"phoneNumber\": \"+62812345678\"\n }\n }\n ],\n \"title\": \"New Wachat.net Service\",\n \"footer\": \"Powered by Wachat\"\n },\n \"delay\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.wachat.net/api/v1/send/cta")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"instanceName\": \"<string>\",\n \"number\": \"<string>\",\n \"type\": \"interactive\",\n \"interactive\": {\n \"type\": \"cta\",\n \"body\": \"Visit our landing page or contact our sales team now.\",\n \"buttons\": [\n {\n \"index\": 1,\n \"urlButton\": {\n \"displayText\": \"Visit\",\n \"url\": \"https://www.wachat.net\"\n }\n },\n {\n \"index\": 2,\n \"callButton\": {\n \"displayText\": \"Contact us\",\n \"phoneNumber\": \"+62812345678\"\n }\n }\n ],\n \"title\": \"New Wachat.net Service\",\n \"footer\": \"Powered by Wachat\"\n },\n \"delay\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.wachat.net/api/v1/send/cta")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"instanceName\": \"<string>\",\n \"number\": \"<string>\",\n \"type\": \"interactive\",\n \"interactive\": {\n \"type\": \"cta\",\n \"body\": \"Visit our landing page or contact our sales team now.\",\n \"buttons\": [\n {\n \"index\": 1,\n \"urlButton\": {\n \"displayText\": \"Visit\",\n \"url\": \"https://www.wachat.net\"\n }\n },\n {\n \"index\": 2,\n \"callButton\": {\n \"displayText\": \"Contact us\",\n \"phoneNumber\": \"+62812345678\"\n }\n }\n ],\n \"title\": \"New Wachat.net Service\",\n \"footer\": \"Powered by Wachat\"\n },\n \"delay\": 123\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Authenticate your integration payloads by injecting your premium secure Wachat Account API Private Secret Key inside standard Authorization Bearer header vectors.
Body
application/json
Target instance configuration identity path label.
Target destination phone string with international parameters.
Configure core layout envelope to interactive.
Available options:
interactive Example:
"interactive"
Show child attributes
Show child attributes
Simulated system typing simulation latency config defined in milliseconds.
Response
200
Call-to-Action transactional button modules successfully deployed.
⌘I
