Resolve a template's variables against a lead without sending
curl --request POST \
--url https://api.pineyard.ai/whatsapp/templates/{id}/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"callId": "<string>",
"toPhone": "<string>",
"args": {}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({callId: '<string>', toPhone: '<string>', args: {}})
};
fetch('https://api.pineyard.ai/whatsapp/templates/{id}/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/whatsapp/templates/{id}/preview"
payload = {
"callId": "<string>",
"toPhone": "<string>",
"args": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"issue": {
"slot": "<string>",
"index": 123,
"message": "<string>"
},
"warnings": [
{
"slot": "<string>",
"message": "<string>"
}
],
"rendered": null
}Templates
Resolve a template's variables against a lead without sending
POST
/
whatsapp
/
templates
/
{id}
/
preview
Resolve a template's variables against a lead without sending
curl --request POST \
--url https://api.pineyard.ai/whatsapp/templates/{id}/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"callId": "<string>",
"toPhone": "<string>",
"args": {}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({callId: '<string>', toPhone: '<string>', args: {}})
};
fetch('https://api.pineyard.ai/whatsapp/templates/{id}/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/whatsapp/templates/{id}/preview"
payload = {
"callId": "<string>",
"toPhone": "<string>",
"args": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"issue": {
"slot": "<string>",
"index": 123,
"message": "<string>"
},
"warnings": [
{
"slot": "<string>",
"message": "<string>"
}
],
"rendered": null
}Required scope:
whatsapp.viewAuthorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Body
application/json

