{"componentChunkName":"component---src-templates-docs-js","path":"/ventachat/send_template/examples","result":{"data":{"site":{"siteMetadata":{"title":"broadcaster","docsLocation":"https://github.com","docsLocationType":"github","editable":false}},"mdx":{"fields":{"id":"f869e670-70f5-563a-9d5a-6141c6ba542a","title":"Examples","slug":"/ventachat/send_template/examples"},"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"Examples\",\n  \"order\": 2\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"Example requests for sending a template message with the VentaChat API.\"), mdx(\"section\", {\n    \"id\": \"httprequestwithtextheader\"\n  }, mdx(\"h3\", {\n    parentName: \"section\"\n  }, \"HTTP request with text header\"), mdx(\"pre\", {\n    parentName: \"section\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"curl -X POST 'http://{{url}}/api-template' \\\\\\n-H 'Authorization: Bearer {{api-token}}' \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: */*' \\\\\\n-d '{\\n    \\\"from\\\": \\\"5215500000001\\\",\\n    \\\"to\\\": \\\"5215500000002\\\",\\n    \\\"userId\\\": \\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\n    \\\"workgroupId\\\": \\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\n    \\\"campaignId\\\": \\\"campaign001\\\",\\n    \\\"type\\\": \\\"template\\\",\\n    \\\"message\\\": {\\n        \\\"templateId\\\": 9007199254740991,\\n        \\\"template\\\": {\\n            \\\"components\\\": [\\n                {\\n                    \\\"type\\\": \\\"header\\\",\\n                    \\\"parameters\\\": [\\n                        {\\n                            \\\"type\\\":\\\"text\\\",\\n                            \\\"text\\\":\\\"123456\\\"\\n                        }\\n                    ]\\n                }\\n            ]\\n        }\\n    }\\n}'\\n\"))), mdx(\"section\", {\n    \"id\": \"httprequestwithtextbody\"\n  }, mdx(\"h3\", {\n    parentName: \"section\"\n  }, \"HTTP request with text body\"), mdx(\"pre\", {\n    parentName: \"section\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"curl -X POST 'http://{{url}}/api-template' \\\\\\n-H 'Authorization: Bearer {{api-token}}' \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: */*' \\\\\\n-d '{\\n    \\\"contactName\\\": \\\"Juan\\\",\\n    \\\"from\\\": \\\"5215500000001\\\",\\n    \\\"to\\\": \\\"5215500000002\\\",\\n    \\\"userId\\\": \\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\n    \\\"workgroupId\\\": \\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\n    \\\"campaignId\\\": \\\"campaign001\\\",\\n    \\\"type\\\": \\\"template\\\",\\n    \\\"message\\\": {\\n        \\\"templateId\\\": 9007199254740991,\\n        \\\"template\\\": {\\n            \\\"components\\\": [{\\n                \\\"type\\\": \\\"body\\\",\\n                \\\"parameters\\\": [{\\n                    \\\"type\\\":\\\"text\\\",\\n                    \\\"text\\\":\\\"123456\\\"\\n                }]\\n            }]\\n        }\\n    }\\n}'\\n\"))), mdx(\"section\", {\n    \"id\": \"httprequestwithcurrencyheader\"\n  }, mdx(\"h3\", {\n    parentName: \"section\"\n  }, \"HTTP request with currency header\"), mdx(\"pre\", {\n    parentName: \"section\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"curl -X POST 'http://{{url}}/api-template' \\\\\\n-H 'Authorization: Bearer {{api-token}}' \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: */*' \\\\\\n-d '{\\n    \\\"contactName\\\": \\\"Juan\\\",\\n    \\\"from\\\": \\\"5215500000001\\\",\\n    \\\"to\\\": \\\"5215500000002\\\",\\n    \\\"userId\\\": \\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\n    \\\"workgroupId\\\": \\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\n    \\\"campaignId\\\": \\\"campaign001\\\",\\n    \\\"type\\\": \\\"template\\\",\\n    \\\"message\\\": {\\n        \\\"templateId\\\": 9007199254740991,\\n        \\\"template\\\": {\\n            \\\"components\\\": [{\\n                \\\"type\\\": \\\"header\\\",\\n                \\\"parameters\\\": [{\\n                    \\\"type\\\":\\\"currency\\\",\\n                    \\\"currency\\\": {\\n                        \\\"fallbackValue\\\": \\\"$100.99\\\",\\n                        \\\"code\\\": \\\"MXN\\\",\\n                        \\\"amount\\\": 222990\\n                    }\\n                }]\\n            }]\\n        }\\n    }\\n}'\\n\"))), mdx(\"section\", {\n    \"id\": \"httprequestwithcurrencybody\"\n  }, mdx(\"h3\", {\n    parentName: \"section\"\n  }, \"HTTP request with currency body\"), mdx(\"pre\", {\n    parentName: \"section\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"curl -X POST 'http://{{url}}/api-template' \\\\\\n-H 'Authorization: Bearer {{api-token}}' \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: */*' \\\\\\n-d '{\\n    \\\"contactName\\\": \\\"Juan\\\",\\n    \\\"from\\\": \\\"5215500000001\\\",\\n    \\\"to\\\": \\\"5215500000002\\\",\\n    \\\"userId\\\": \\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\n    \\\"workgroupId\\\": \\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\n    \\\"campaignId\\\": \\\"campaign001\\\",\\n    \\\"type\\\": \\\"template\\\",\\n    \\\"message\\\": {\\n        \\\"templateId\\\": 9007199254740991,\\n        \\\"template\\\": {\\n            \\\"components\\\": [{\\n                \\\"type\\\": \\\"body\\\",\\n                \\\"parameters\\\": [{\\n                    \\\"type\\\":\\\"currency\\\",\\n                    \\\"currency\\\": {\\n                        \\\"fallbackValue\\\": \\\"$100.99\\\",\\n                        \\\"code\\\": \\\"MXN\\\",\\n                        \\\"amount\\\": 222990\\n                    }\\n                }]\\n            }]\\n        }\\n    }\\n}'\\n\"))), mdx(\"section\", {\n    \"id\": \"httprequestwithdatetimeheader\"\n  }, mdx(\"h3\", {\n    parentName: \"section\"\n  }, \"HTTP request with date time header\"), mdx(\"pre\", {\n    parentName: \"section\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"curl -X POST 'http://{{url}}/api-template' \\\\\\n-H 'Authorization: Bearer {{api-token}}' \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: */*' \\\\\\n-d '{\\n    \\\"contactName\\\": \\\"Juan\\\",\\n    \\\"from\\\": \\\"5215500000001\\\",\\n    \\\"to\\\": \\\"5215500000002\\\",\\n    \\\"userId\\\": \\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\n    \\\"workgroupId\\\": \\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\n    \\\"campaignId\\\": \\\"campaign001\\\",\\n    \\\"type\\\": \\\"template\\\",\\n    \\\"message\\\": {\\n        \\\"templateId\\\": 9007199254740991,\\n        \\\"template\\\": {\\n            \\\"components\\\": [{\\n                \\\"type\\\": \\\"header\\\",\\n                \\\"parameters\\\": [{\\n                    \\\"type\\\": \\\"date_time\\\",\\n                    \\\"date_time\\\": {\\n                        \\\"fallbackValue\\\": \\\"Octubre 2, 1990\\\",\\n                        \\\"dayOfMonth\\\": 30,\\n                        \\\"year\\\": 2021,\\n                        \\\"month\\\": 3,\\n                        \\\"hour\\\": 13,\\n                        \\\"minute\\\": 19\\n                    }\\n                }]\\n            }]\\n        }\\n    }\\n}'\\n\"))), mdx(\"section\", {\n    \"id\": \"httprequestwithdatetimebody\"\n  }, mdx(\"h3\", {\n    parentName: \"section\"\n  }, \"HTTP request with date time body\"), mdx(\"pre\", {\n    parentName: \"section\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"curl -X POST 'http://{{url}}/api-template' \\\\\\n-H 'Authorization: Bearer {{api-token}}' \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: */*' \\\\\\n-d '{\\n    \\\"contactName\\\": \\\"Juan\\\",\\n    \\\"from\\\": \\\"5215500000001\\\",\\n    \\\"to\\\": \\\"5215500000002\\\",\\n    \\\"userId\\\": \\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\n    \\\"workgroupId\\\": \\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\n    \\\"campaignId\\\": \\\"campaign001\\\",\\n    \\\"type\\\": \\\"template\\\",\\n    \\\"message\\\": {\\n        \\\"templateId\\\": 9007199254740991,\\n        \\\"template\\\": {\\n            \\\"components\\\": [{\\n                \\\"type\\\": \\\"body\\\",\\n                \\\"parameters\\\": [{\\n                    \\\"type\\\": \\\"date_time\\\",\\n                    \\\"date_time\\\": {\\n                        \\\"fallbackValue\\\": \\\"Octubre 2, 1990\\\",\\n                        \\\"dayOfMonth\\\": 30,\\n                        \\\"year\\\": 2021,\\n                        \\\"month\\\": 3,\\n                        \\\"hour\\\": 13,\\n                        \\\"minute\\\": 19\\n                    }\\n                }]\\n            }]\\n        }\\n    }\\n}'\\n\"))), mdx(\"section\", {\n    \"id\": \"httprequestwithimage\"\n  }, mdx(\"h3\", {\n    parentName: \"section\"\n  }, \"HTTP request with image\"), mdx(\"pre\", {\n    parentName: \"section\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"curl -X POST 'http://{{url}}/api-template' \\\\\\n-H 'Authorization: Bearer {{api-token}}' \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: */*' \\\\\\n-d '{\\n    \\\"contactName\\\": \\\"Juan\\\",\\n    \\\"from\\\": \\\"5215500000001\\\",\\n    \\\"to\\\": \\\"5215500000002\\\",\\n    \\\"userId\\\": \\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\n    \\\"workgroupId\\\": \\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\n    \\\"campaignId\\\": \\\"campaign001\\\",\\n    \\\"type\\\": \\\"template\\\",\\n    \\\"message\\\": {\\n        \\\"templateId\\\": 9007199254740991,\\n        \\\"template\\\": {\\n            \\\"components\\\": [{\\n                \\\"type\\\": \\\"header\\\",\\n                \\\"parameters\\\": [{\\n                    \\\"link\\\": \\\"http://victormoran.me/leo/Broadcaster-RCS_API_v1.0.jpg\\\",\\n                    \\\"type\\\": \\\"image\\\"\\n                }]\\n            },\\n            {\\n                \\\"type\\\": \\\"body\\\",\\n                \\\"parameters\\\": [{\\n                    \\\"text\\\": \\\"sample text\\\",\\n                    \\\"type\\\": \\\"text\\\"\\n                }]\\n            }]\\n        }\\n    }\\n}'\\n\"))), mdx(\"section\", {\n    \"id\": \"httprequestwithdocument\"\n  }, mdx(\"h3\", {\n    parentName: \"section\"\n  }, \"HTTP request with document\"), mdx(\"pre\", {\n    parentName: \"section\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"curl -X POST 'http://{{url}}/api-template' \\\\\\n-H 'Authorization: Bearer {{api-token}}' \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: */*' \\\\\\n-d '{\\n    \\\"contactName\\\": \\\"Juan\\\",\\n    \\\"from\\\": \\\"5215500000001\\\",\\n    \\\"to\\\": \\\"5215500000002\\\",\\n    \\\"userId\\\": \\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\n    \\\"workgroupId\\\": \\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\n    \\\"campaignId\\\": \\\"campaign001\\\",\\n    \\\"type\\\": \\\"template\\\",\\n    \\\"message\\\": {\\n        \\\"templateId\\\": 9007199254740991,\\n        \\\"template\\\": {\\n            \\\"components\\\": [{\\n                \\\"type\\\": \\\"header\\\",\\n                \\\"parameters\\\": [{\\n                    \\\"link\\\": \\\"http://victormoran.me/leo/Broadcaster-RCS_API_v1.0.pdf\\\",\\n                    \\\"type\\\": \\\"document\\\",\\n                    \\\"filename\\\": \\\"RCS Documentation\\\"\\n                }]\\n            },\\n            {\\n                \\\"type\\\": \\\"body\\\",\\n                \\\"parameters\\\": [{\\n                    \\\"text\\\": \\\"sample text\\\",\\n                    \\\"type\\\": \\\"text\\\"\\n                }]\\n            }]\\n        }\\n    }\\n}'\\n\"))), mdx(\"section\", {\n    \"id\": \"httprequestwithvideo\"\n  }, mdx(\"h3\", {\n    parentName: \"section\"\n  }, \"HTTP request with video\"), mdx(\"pre\", {\n    parentName: \"section\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"curl -X POST 'http://{{url}}/api-template' \\\\\\n-H 'Authorization: Bearer {{api-token}}' \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: */*' \\\\\\n-d '{\\n    \\\"contactName\\\": \\\"Juan\\\",\\n    \\\"from\\\": \\\"5215500000001\\\",\\n    \\\"to\\\": \\\"5215500000002\\\",\\n    \\\"userId\\\": \\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\n    \\\"workgroupId\\\": \\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\n    \\\"campaignId\\\": \\\"campaign001\\\",\\n    \\\"type\\\": \\\"template\\\",\\n    \\\"message\\\": {\\n        \\\"templateId\\\": 9007199254740991,\\n        \\\"template\\\": {\\n            \\\"components\\\": [{\\n                \\\"type\\\": \\\"header\\\",\\n                \\\"parameters\\\": [{\\n                    \\\"link\\\": \\\"http://victormoran.me/leo/Broadcaster-RCS_API_v1.0.mp4\\\",\\n                    \\\"type\\\": \\\"video\\\"\\n                }]\\n            },\\n            {\\n                \\\"type\\\": \\\"body\\\",\\n                \\\"parameters\\\": [{\\n                    \\\"text\\\": \\\"sample text\\\",\\n                    \\\"type\\\": \\\"text\\\"\\n                }]\\n            }]\\n        }\\n    }\\n}'\\n\"))), mdx(\"section\", {\n    \"id\": \"httprequestwithbuttons\"\n  }, mdx(\"h3\", {\n    parentName: \"section\"\n  }, \"HTTP request with buttons\"), mdx(\"pre\", {\n    parentName: \"section\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"curl -X POST 'http://{{url}}/api-template' \\\\\\n-H 'Authorization: Bearer {{api-token}}' \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: */*' \\\\\\n-d '{\\n    \\\"contactName\\\": \\\"Juan\\\",\\n    \\\"from\\\": \\\"5215500000001\\\",\\n    \\\"to\\\": \\\"5215500000002\\\",\\n    \\\"userId\\\": \\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\n    \\\"workgroupId\\\": \\\"3fa85f64-5717-4562-b3fc-2c963f66afa6\\\",\\n    \\\"campaignId\\\": \\\"campaign001\\\",\\n    \\\"type\\\": \\\"template\\\",\\n    \\\"message\\\": {\\n        \\\"templateId\\\": 9007199254740991,\\n        \\\"template\\\": {\\n            \\\"components\\\": [{\\n                \\\"type\\\": \\\"body\\\",\\n                \\\"parameters\\\": [{\\n                    \\\"text\\\": \\\"Juan\\\",\\n                    \\\"type\\\": \\\"text\\\"\\n                }]\\n            },\\n            {\\n                \\\"type\\\": \\\"button\\\",\\n                \\\"subtype\\\": \\\"quick_reply\\\",\\n                \\\"index\\\": \\\"0\\\",\\n                \\\"parameters\\\": [{\\n                    \\\"type\\\": \\\"payload\\\",\\n                    \\\"payload\\\": \\\"12345765\\\"\\n                }]\\n            },\\n            {\\n                \\\"type\\\": \\\"button\\\",\\n                \\\"subtype\\\": \\\"quick_reply\\\",\\n                \\\"index\\\": \\\"1\\\",\\n                \\\"parameters\\\": [{\\n                    \\\"type\\\": \\\"payload\\\",\\n                    \\\"payload\\\": \\\"12345765\\\"\\n                }]\\n            },\\n            {\\n                \\\"type\\\": \\\"button\\\",\\n                \\\"subtype\\\": \\\"quick_reply\\\",\\n                \\\"index\\\": \\\"2\\\",\\n                \\\"parameters\\\": [{\\n                    \\\"type\\\": \\\"payload\\\",\\n                    \\\"payload\\\": \\\"12345765\\\"\\n                }]\\n            }]\\n        }\\n    }\\n}'\\n\"))));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#http-request-with-text-header","title":"HTTP request with text header"},{"url":"#http-request-with-text-body","title":"HTTP request with text body"},{"url":"#http-request-with-currency-header","title":"HTTP request with currency header"},{"url":"#http-request-with-currency-body","title":"HTTP request with currency body"},{"url":"#http-request-with-date-time-header","title":"HTTP request with date time header"},{"url":"#http-request-with-date-time-body","title":"HTTP request with date time body"},{"url":"#http-request-with-image","title":"HTTP request with image"},{"url":"#http-request-with-document","title":"HTTP request with document"},{"url":"#http-request-with-video","title":"HTTP request with video"},{"url":"#http-request-with-buttons","title":"HTTP request with buttons"}]},"timeToRead":1,"parent":{"__typename":"File","relativePath":"ventachat/send_template/examples.md","fields":{"gitLogLatestAuthorName":"Irais Aguirre","gitLogLatestAuthorEmail":"irais.aguirre@conceptomovil.com","gitLogLatestDate":"5 hours ago"}},"frontmatter":{"metaTitle":null,"showMetadata":null,"editable":null,"showPreviousNext":null,"showToc":null}},"gitBranch":{"name":"20211019-2FACTOR_AUTH"},"gitCommit":{"hash":"9713e1925aeb8cad930f91b6bf05d0b5937b2bb5","date":"2026-11-13 06:39"}},"pageContext":{"id":"f869e670-70f5-563a-9d5a-6141c6ba542a"}},"staticQueryHashes":["12478684","12478684","2882937274","2882937274","353167761","353167761"]}