Get RCS Template Variables
curl --request GET \
--url https://api-ai.zixflow.com/api/data/rcs/v1/{bot_id}/variable-keys \
--header 'x-api-key: <x-api-key>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://api-ai.zixflow.com/api/data/rcs/v1/{bot_id}/variable-keys"
headers = {
"x-api-key": "<x-api-key>",
"x-workspace-id": "<x-workspace-id>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-workspace-id': '<x-workspace-id>'}
};
fetch('https://api-ai.zixflow.com/api/data/rcs/v1/{bot_id}/variable-keys', 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-ai.zixflow.com/api/data/rcs/v1/{bot_id}/variable-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-ai.zixflow.com/api/data/rcs/v1/{bot_id}/variable-keys"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-ai.zixflow.com/api/data/rcs/v1/{bot_id}/variable-keys")
.header("x-api-key", "<x-api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-ai.zixflow.com/api/data/rcs/v1/{bot_id}/variable-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Template variables retrieved successfully",
"data": [
{
"key": "customer_name",
"type": "text"
},
{
"key": "order_number",
"type": "text"
},
{
"key": "product_image",
"type": "image"
}
]
}
{
"success": false,
"message": "Invalid bot_id or template_name parameter"
}
{
"success": false,
"message": "Unauthorized. Please check your API key and workspace ID."
}
{
"success": false,
"message": "Internal server error. Please try again later."
}
RCS
Get RCS Template Variables
Retrieves the variable keys and types for a specific RCS template
GET
/
api
/
data
/
rcs
/
v1
/
{bot_id}
/
variable-keys
Get RCS Template Variables
curl --request GET \
--url https://api-ai.zixflow.com/api/data/rcs/v1/{bot_id}/variable-keys \
--header 'x-api-key: <x-api-key>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://api-ai.zixflow.com/api/data/rcs/v1/{bot_id}/variable-keys"
headers = {
"x-api-key": "<x-api-key>",
"x-workspace-id": "<x-workspace-id>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-workspace-id': '<x-workspace-id>'}
};
fetch('https://api-ai.zixflow.com/api/data/rcs/v1/{bot_id}/variable-keys', 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-ai.zixflow.com/api/data/rcs/v1/{bot_id}/variable-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-ai.zixflow.com/api/data/rcs/v1/{bot_id}/variable-keys"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-ai.zixflow.com/api/data/rcs/v1/{bot_id}/variable-keys")
.header("x-api-key", "<x-api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-ai.zixflow.com/api/data/rcs/v1/{bot_id}/variable-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Template variables retrieved successfully",
"data": [
{
"key": "customer_name",
"type": "text"
},
{
"key": "order_number",
"type": "text"
},
{
"key": "product_image",
"type": "image"
}
]
}
{
"success": false,
"message": "Invalid bot_id or template_name parameter"
}
{
"success": false,
"message": "Unauthorized. Please check your API key and workspace ID."
}
{
"success": false,
"message": "Internal server error. Please try again later."
}
Description
This endpoint allows you to retrieve the variable keys and their types for a specific RCS template. This is useful when you need to know what variables are required or available in a template before sending a message.Headers
string
required
Your API key for authentication.
string
required
Your workspace ID for authentication.
Path Parameters
string
required
The unique identifier of the RCS bot. This is the Bot ID associated with your RCS account.
Query Parameters
string
required
The name of the RCS template for which you want to retrieve variable information.
Response
boolean
Indicates whether the API call was successful.
string
Success or error message from the API.
array
An array of template variable objects, each containing:
string
The variable key name that should be used when sending the template.
string
The type of the variable (e.g., “text”, “image”, “video”, etc.).
{
"success": true,
"message": "Template variables retrieved successfully",
"data": [
{
"key": "customer_name",
"type": "text"
},
{
"key": "order_number",
"type": "text"
},
{
"key": "product_image",
"type": "image"
}
]
}
{
"success": false,
"message": "Invalid bot_id or template_name parameter"
}
{
"success": false,
"message": "Unauthorized. Please check your API key and workspace ID."
}
{
"success": false,
"message": "Internal server error. Please try again later."
}