curl --location --request POST '/channel/3cb69db1-c410-4b83-8d37-84b823be9c06/template' \
--header 'apiKey: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "sample_document_2026_v1",
"description": "Sample document 2026 version 1",
"whatsapp": {
"name": "sample_document_2026_v1",
"language": "en_US",
"category": "MARKETING",
"components": [
{
"type": "HEADER",
"format": "DOCUMENT",
"url": "https://dev-cdn.peacom.co/files/samplelocalpdf_599f555d41ab41fca01196064a8b3ba5.pdf"
},
{
"type": "BODY",
"text": "Please check your document"
},
{
"type": "FOOTER",
"text": "Thanks"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "URL",
"text": "More Info",
"url": "https://www.youtube.com/watch?v=bHpmz87GOyU"
}
]
}
],
"example": {}
}
}'{
"name": "Template name",
"publicId": "3cb69db1-c410-4b83-8d37-84b823be9c06",
"tariffType": 0,
"description": "Template description",
"status": 1,
"statusText": "APPROVED",
"message": {
"type": "rich_card",
"message": "Message Content",
"richCards": [
{
"fileUrl": "https://images.pexels.com/photo.jpeg",
"thumbnailUrl": "https://images.pexels.com/photo.jpeg",
"title": "Example Title",
"description": "Example Description",
"suggestions": [
{
"text": "Example suggestion",
"action": "reply",
"tracking": true,
"webviewType": "FULL",
"postbackData": "Example postback data",
"openUrlApplication": "BROWSER"
}
]
}
],
"rcsExpireOpts": {
"type": "TTL",
"ttl": 3600,
"expireTime": "2025-06-13T11:00:00.000Z"
},
"rcsRichCardsOpts": {
"type": "STANDALONE",
"imageAlign": "THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED",
"orientation": "VERTICAL"
},
"fileUrl": "https://images.pexels.com/photo.jpeg",
"thumbnailUrl": "https://images.pexels.com/photo.jpeg"
}
}