curl --location --request GET 'https://api.zixflow.com/api/v1/campaign/whatsapp/variable-keys?templateName=welcome_message&language=en' \
--header 'Authorization: Bearer {{zixflow_api_key}}'
var axios = require("axios");
var config = {
method: "get",
url: "https://api.zixflow.com/api/v1/campaign/whatsapp/variable-keys?templateName=welcome_message&language=en",
headers: {
Authorization: "Bearer {{zixflow_api_key}}",
},
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "https://api.zixflow.com/api/v1/campaign/whatsapp/variable-keys?templateName=welcome_message&language=en"
payload={}
headers = {
'Authorization': 'Bearer {{zixflow_api_key}}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://api.zixflow.com/api/v1/campaign/whatsapp/variable-keys?templateName=welcome_message&language=en")
.method("GET", null)
.addHeader("Authorization", "Bearer {{zixflow_api_key}}")
.build();
Response response = client.newCall(request).execute();
var headers = {
'Authorization': 'Bearer {{zixflow_api_key}}'
};
var request = http.Request('GET', Uri.parse('https://api.zixflow.com/api/v1/campaign/whatsapp/variable-keys?templateName=welcome_message&language=en'));
request.headers.addAll(headers);
http.StreamedResponse response = await request.send();
if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}
{
"status": true,
"message": "Success",
"data": [
{
"label": "Header Image",
"keyName": "image",
"type": "IMAGE_URL"
},
{
"label": "Body 1",
"keyName": "body_1",
"type": "TEXT"
}
]
}
{
"status": false,
"message": "file size exceeded"
}
{
"status": false,
"message": "No token provided"
}
Whatsapp Campaign
Get Template Variables
GET
/
api
/
v1
/
campaign
/
whatsapp
/
variable-keys
curl --location --request GET 'https://api.zixflow.com/api/v1/campaign/whatsapp/variable-keys?templateName=welcome_message&language=en' \
--header 'Authorization: Bearer {{zixflow_api_key}}'
var axios = require("axios");
var config = {
method: "get",
url: "https://api.zixflow.com/api/v1/campaign/whatsapp/variable-keys?templateName=welcome_message&language=en",
headers: {
Authorization: "Bearer {{zixflow_api_key}}",
},
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "https://api.zixflow.com/api/v1/campaign/whatsapp/variable-keys?templateName=welcome_message&language=en"
payload={}
headers = {
'Authorization': 'Bearer {{zixflow_api_key}}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://api.zixflow.com/api/v1/campaign/whatsapp/variable-keys?templateName=welcome_message&language=en")
.method("GET", null)
.addHeader("Authorization", "Bearer {{zixflow_api_key}}")
.build();
Response response = client.newCall(request).execute();
var headers = {
'Authorization': 'Bearer {{zixflow_api_key}}'
};
var request = http.Request('GET', Uri.parse('https://api.zixflow.com/api/v1/campaign/whatsapp/variable-keys?templateName=welcome_message&language=en'));
request.headers.addAll(headers);
http.StreamedResponse response = await request.send();
if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}
{
"status": true,
"message": "Success",
"data": [
{
"label": "Header Image",
"keyName": "image",
"type": "IMAGE_URL"
},
{
"label": "Body 1",
"keyName": "body_1",
"type": "TEXT"
}
]
}
{
"status": false,
"message": "file size exceeded"
}
{
"status": false,
"message": "No token provided"
}
Query Params
This is the unique identifier associated with the sender’s phone number given
by WhatsApp. Find the Phone ID on the Zixflow WhatsApp Settings page next to
the number. Whatsapp
Settings
Refers to the name of the template to be used for the message, e.g.,
“welcome_message.”
Specifies the language for the message, e.g., “en” for English.
Response
Indicates whether the call was successful. true if successful, false if not.
success or error response message
The contents of uploaded file
Show data
Show data
It defines variable label from the template
This defines the essential key names that must be used when specifying values for this variable in the WhatsApp API.
It defines type of value
| type | sample value |
|---|---|
| IMAGE_URL | <image-url> |
| VIDEO_URL | <video-url> |
| DOCUMENT_URL | <document-url> |
| TEXT | <text> |
| OTP | <otp> |
curl --location --request GET 'https://api.zixflow.com/api/v1/campaign/whatsapp/variable-keys?templateName=welcome_message&language=en' \
--header 'Authorization: Bearer {{zixflow_api_key}}'
var axios = require("axios");
var config = {
method: "get",
url: "https://api.zixflow.com/api/v1/campaign/whatsapp/variable-keys?templateName=welcome_message&language=en",
headers: {
Authorization: "Bearer {{zixflow_api_key}}",
},
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "https://api.zixflow.com/api/v1/campaign/whatsapp/variable-keys?templateName=welcome_message&language=en"
payload={}
headers = {
'Authorization': 'Bearer {{zixflow_api_key}}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://api.zixflow.com/api/v1/campaign/whatsapp/variable-keys?templateName=welcome_message&language=en")
.method("GET", null)
.addHeader("Authorization", "Bearer {{zixflow_api_key}}")
.build();
Response response = client.newCall(request).execute();
var headers = {
'Authorization': 'Bearer {{zixflow_api_key}}'
};
var request = http.Request('GET', Uri.parse('https://api.zixflow.com/api/v1/campaign/whatsapp/variable-keys?templateName=welcome_message&language=en'));
request.headers.addAll(headers);
http.StreamedResponse response = await request.send();
if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}
{
"status": true,
"message": "Success",
"data": [
{
"label": "Header Image",
"keyName": "image",
"type": "IMAGE_URL"
},
{
"label": "Body 1",
"keyName": "body_1",
"type": "TEXT"
}
]
}
{
"status": false,
"message": "file size exceeded"
}
{
"status": false,
"message": "No token provided"
}
⌘I