Send Media Template
Sends a multimedia template message to a specified client using customizable parameters.
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
businessnamestringRequired
The business name associated with the template.
Body
clientstringOptional
Client ID (required if client_phone is not provided).
client_phonestringOptional
Client phone number, with country prefix (required if client is not provided).
client_namestringOptional
Client's name, required with client_phone.
callback_urlstringOptional
URL to receive message status updates.
delaystringOptional
Delay before sending the message, e.g., "10d".
agentsstring[]Optional
List of agent emails assigned to the chat.
Responses
200
Multimedia template message sent successfully.
application/json
post
/templatePOST /ext/v2/{businessname}/template HTTP/1.1
Host: api.pingueen.it/ext/v2/{businessname}
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 378
{
"client": "text",
"client_phone": "text",
"client_name": "text",
"callback_url": "text",
"delay": "text",
"agents": [
"text"
],
"template": {
"language": {
"policy": "text",
"code": "text"
},
"name": "text",
"components": [
{
"type": "header",
"parameters": [
{
"type": "text",
"image": {
"link": "text"
},
"currency": {
"fallback_value": "text",
"code": "text",
"amount_1000": 1
},
"date_time": {
"fallback_value": "text"
}
}
]
}
]
}
}200
Multimedia template message sent successfully.
{
"success": true,
"data": {
"message_id": "1232412421"
}
}Body Example
{
"client_phone": "3932132123", //phone with prefix
"client_name": "Jon Doe",
"callback_url": "https://webhook.domain.it/inbound", //callback to get results (sent/delivered/read)
"delay": "10m", //10 minutes delay
"text_message": "Hi {{1}}, my name is {{2}} and your order {{3}} is ready! Check the bill attached",
"agents": [
"email@agent.it" //assign the chat to the agent with that email
],
"template": {
"name": "TEMPLATE_NAME",
"language": {
"code": "it"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "document",
"document": {
"link": "https://documenturl.pdf"
}
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Tom"
},
{
"type": "text",
"text": "Dylan"
},
{
"type": "text",
"text": "123OrdID"
}
]
}
]
}
}Meta official documentation
Last updated