Parameters array.Parameters targets a specific component of the template. The Type field determines which component you're filling:| Type | Purpose |
|---|---|
Header | Fills the template header — can be text, image, document, or video |
Body | Fills {{1}}, {{2}}, etc. placeholders in the message body |
Buttons | Fills dynamic variables in URL or quick reply buttons |
Values maps to {{1}}, {{2}}, {{3}}, etc.{
"Type": "Body",
"Values": [
{ "Type": "text", "Text": "value for {{1}}" },
{ "Type": "text", "Text": "value for {{2}}" }
]
}{
"Type": "Header",
"Values": [
{ "Type": "image", "ImageUrl": "https://example.com/image.jpg" }
]
}{
"Type": "Header",
"Values": [
{
"Type": "document",
"DocumentUrl": "https://example.com/file.pdf",
"DocumentFilename": "Invoice.pdf"
}
]
}{
"Type": "Header",
"Values": [
{ "Type": "video", "VideoUrl": "https://example.com/video.mp4" }
]
}{
"Type": "Header",
"Values": [
{ "Type": "text", "Text": "Your Order Update" }
]
}Values array, each button must be its own separate object in the Parameters array.SubType — the button type: "url" or "quick_reply"Index — the button position: "0" for the first button, "1" for the second, "2" for the thirdhttps://example.com/orders/{{1}}. You only provide the dynamic part, not the full URL.{
"Type": "Buttons",
"SubType": "url",
"Index": "0",
"Values": [
{ "Type": "text", "Text": "ORD-5123" }
]
}https://example.com/orders/ORD-5123.{
"Type": "Buttons",
"SubType": "quick_reply",
"Index": "0",
"Values": [
{ "Type": "text", "Text": "confirm_order_123" }
]
}{{1}}), you do not need to include it in Parameters. Only buttons with dynamic content require parametercurl --location 'https://api.voxa.sa/v1/whatsapp/service-account/sendTemplate' \
--header 'Authorization: Bearer <token>' \
--header 'content-type: application/json' \
--data '{
"ChannelId": "3a197b.....",
"TemplateName": "order_confirmation1",
"Language": "en",
"ToNumber": "9665...",
"Parameters": [
{
"Type": "Body",
"Values": [
{
"Type": "text",
"Text": "Variable 1"
},
{
"Type": "text",
"Text": "Variable 1"
},
{
"Type": "text",
"Text": "Variable 1"
}
]
}
]
}'{
"contactId": "3a18a7e6-48bf-e5b8-4935-867e4b6c6c02",
"status": "accepted",
"message": "Template message sent successfully",
"conversationEventId": "3a1e1287-9c7e-84fc-6eac-c530a49732ea"
}