{"componentChunkName":"component---src-templates-docs-js","path":"/whatsapp/messaging/with_template/carousel","result":{"data":{"site":{"siteMetadata":{"title":"broadcaster","docsLocation":"https://github.com","docsLocationType":"github","editable":false}},"mdx":{"fields":{"id":"bf036a7f-daa6-5b19-ade7-d8ad3572a3a1","title":"Carousel","slug":"/whatsapp/messaging/with_template/carousel"},"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\": \"Carousel\",\n  \"order\": 5\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(\"blockquote\", null, mdx(\"p\", {\n    parentName: \"blockquote\"\n  }, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Integration summary\")), mdx(\"ul\", {\n    parentName: \"blockquote\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Endpoint:\"), \" \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"POST https://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Token:\"), \" messaging token, in the \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"Authorization: Bearer {{wa-msg-api-token}}\"), \" header (\", mdx(\"a\", {\n    href: \"/whatsapp/authentication_token\"\n  }, \"how to generate it\"), \")\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Common fields:\"), \" \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"from\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"to\"), \" (phone number or BSUID) and \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"type\"), \" (\", mdx(\"a\", {\n    href: \"/whatsapp/messaging/http#h-commonfields\"\n  }, \"details\"), \")\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"strong\"\n  }, \"type\"), \" values on this page:\"), \" \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"\\\"template\\\"\")), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Response:\"), \" the same for every message (\", mdx(\"a\", {\n    href: \"/whatsapp/messaging/http#h-response\"\n  }, \"see response\"), \")\"))), mdx(\"p\", null, \"Carousel templates with scrollable cards. All are sent with \", mdx(\"a\", {\n    href: \"/whatsapp/messaging/http\"\n  }, \"POST /v1/messaging\"), \"; headers, common fields and the response are in \", mdx(\"a\", {\n    href: \"/whatsapp/messaging/http\"\n  }, \"HTTP connection\"), \". The general template structure (template and components objects) is in \", mdx(\"a\", {\n    href: \"/whatsapp/messaging/with_template\"\n  }, \"Template messages\"), \".\"), mdx(\"section\", {\n    \"id\": \"carousel\"\n  }, mdx(\"h2\", {\n    parentName: \"section\"\n  }, \"Carousel\"), mdx(\"p\", {\n    parentName: \"section\"\n  }, \"A single text message accompanied by a set of up to 10 carousel cards in a horizontally scrollable view. It is sent as a \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"carousel\"), \" component with its cards in \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"cards\"), \".\")), mdx(\"section\", {\n    \"id\": \"carousel--body\"\n  }, mdx(\"h3\", {\n    parentName: \"section\"\n  }, \"Body\"), mdx(\"p\", {\n    parentName: \"section\"\n  }, \"Fields for \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Carousel\"), \":\"), mdx(\"table\", {\n    parentName: \"section\"\n  }, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Name\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Description\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Type\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Requirements\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"type\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"The value is \\\"carousel\\\".\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"String\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Required\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"a\", {\n    href: \"/whatsapp/messaging/with_template/carousel#h-cardobject\"\n  }, \"cards\")), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"A list of up to 10 card objects. Each card in the carousel must have: \", mdx(\"ul\", null, mdx(\"li\", null, \"A media header (image or video)\"), mdx(\"li\", null, \"Body text\"), mdx(\"li\", null, \"At least one button. Up to 2 buttons are supported. The buttons can be the same type or a mix of quick reply, phone number, and URL buttons.\"))), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"List of objects\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, mdx(\"ul\", null, mdx(\"li\", null, \"Required\"), mdx(\"li\", null, \"The media header format and button types must be the same across all cards in a carousel template.\"))))))), mdx(\"section\", {\n    \"id\": \"carousel--body--cardobject\"\n  }, mdx(\"h4\", {\n    parentName: \"section\"\n  }, \"Card object\"), mdx(\"table\", {\n    parentName: \"section\"\n  }, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Name\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Description\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Type\"), mdx(\"th\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Requirements\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"card_index\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Position of the card within the carousel, as a zero-based index: 0 is the first card, 1 the second, and so on.\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Integer\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Required\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"components\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Array of components to add to the card. Components can be of type \\\"header\\\", \\\"body\\\", and \\\"button\\\".\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"List of objects\"), mdx(\"td\", {\n    parentName: \"tr\",\n    \"align\": null\n  }, \"Required\"))))), mdx(\"section\", {\n    \"id\": \"carousel--example\"\n  }, mdx(\"h3\", {\n    parentName: \"section\"\n  }, \"Example\"), mdx(\"p\", {\n    parentName: \"section\"\n  }, \"Complete \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Carousel\"), \" example (HTTP request and JSON body):\")), mdx(\"section\", {\n    \"id\": \"carousel--example--carouselhttprequest\"\n  }, mdx(\"h4\", {\n    parentName: \"section\"\n  }, \"Carousel HTTP request\"), mdx(\"pre\", {\n    parentName: \"section\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-bash\"\n  }, \"curl --location --request POST 'https://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging' \\\\\\n-H 'Authorization: Bearer {{wa-msg-api-token}}' \\\\\\n-H 'Content-Type: application/json' \\\\\\n-d '{\\n    \\\"from\\\": \\\"{{wa-phone-number}}\\\",\\n    \\\"to\\\": \\\"{{recipient-wa-id}}\\\",\\n    \\\"type\\\": \\\"template\\\",\\n    \\\"template\\\":\\n    {\\n        \\\"language\\\": \\\"es_MX\\\",\\n        \\\"name\\\": \\\"concepto_movil_carrusel_products\\\",\\n        \\\"components\\\":\\n        [\\n            {\\n                \\\"type\\\": \\\"body\\\",\\n                \\\"parameters\\\":\\n                [\\n                    {\\n                        \\\"type\\\": \\\"text\\\",\\n                        \\\"text\\\": \\\"25OFF\\\"\\n                    },\\n                    {\\n                        \\\"type\\\": \\\"text\\\",\\n                        \\\"text\\\": \\\"25%\\\"\\n                    }\\n                ]\\n            },\\n            {\\n                \\\"type\\\": \\\"carousel\\\",\\n                \\\"cards\\\":\\n                [\\n                    {\\n                        \\\"card_index\\\": 0,\\n                        \\\"components\\\":\\n                        [\\n                            {\\n                                \\\"type\\\": \\\"header\\\",\\n                                \\\"parameters\\\":\\n                                [\\n                                    {\\n                                        \\\"type\\\": \\\"image\\\",\\n                                        \\\"media_id\\\": \\\"966046148378667\\\"\\n                                    }\\n                                ]\\n                            }\\n                        ]\\n                    },\\n                    {\\n                        \\\"card_index\\\": 1,\\n                        \\\"components\\\":\\n                        [\\n                            {\\n                                \\\"type\\\": \\\"header\\\",\\n                                \\\"parameters\\\":\\n                                [\\n                                    {\\n                                        \\\"type\\\": \\\"image\\\",\\n                                        \\\"media_id\\\": \\\"448282164313965\\\"\\n                                    }\\n                                ]\\n                            }\\n                        ]\\n                    },\\n                    {\\n                        \\\"card_index\\\": 2,\\n                        \\\"components\\\":\\n                        [\\n                            {\\n                                \\\"type\\\": \\\"header\\\",\\n                                \\\"parameters\\\":\\n                                [\\n                                    {\\n                                        \\\"type\\\": \\\"image\\\",\\n                                        \\\"media_id\\\": \\\"1583971738812030\\\"\\n                                    }\\n                                ]\\n                            }\\n                        ]\\n                    },\\n                    {\\n                        \\\"card_index\\\": 3,\\n                        \\\"components\\\":\\n                        [\\n                            {\\n                                \\\"type\\\": \\\"header\\\",\\n                                \\\"parameters\\\":\\n                                [\\n                                    {\\n                                        \\\"type\\\": \\\"image\\\",\\n                                        \\\"media_id\\\": \\\"1104222870702261\\\"\\n                                    }\\n                                ]\\n                            }\\n                        ]\\n                    }\\n                ]\\n            }\\n        ]\\n    }\\n}'\\n\"))), mdx(\"section\", {\n    \"id\": \"carousel--example--carouselbody\"\n  }, mdx(\"h4\", {\n    parentName: \"section\"\n  }, \"Carousel body\"), mdx(\"pre\", {\n    parentName: \"section\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-json\"\n  }, \"{\\n \\\"from\\\": \\\"{{wa-phone-number}}\\\",\\n \\\"to\\\": \\\"{{recipient-wa-id}}\\\",\\n \\\"type\\\": \\\"template\\\",\\n \\\"template\\\": {\\n   \\\"language\\\": \\\"es_MX\\\",\\n   \\\"name\\\": \\\"concepto_movil_carrusel_products\\\",\\n   \\\"components\\\": [\\n     {\\n       \\\"type\\\": \\\"body\\\",\\n       \\\"parameters\\\": [\\n         {\\n           \\\"type\\\": \\\"text\\\",\\n           \\\"text\\\": \\\"25OFF\\\"\\n         },\\n         {\\n           \\\"type\\\": \\\"text\\\",\\n           \\\"text\\\": \\\"25%\\\"\\n         }\\n       ]\\n     },\\n     {\\n       \\\"type\\\": \\\"carousel\\\",\\n       \\\"cards\\\": [\\n         {\\n           \\\"card_index\\\": 0,\\n           \\\"components\\\": [\\n             {\\n               \\\"type\\\": \\\"header\\\",\\n               \\\"parameters\\\": [\\n                 {\\n                   \\\"type\\\": \\\"image\\\",\\n                   \\\"media_id\\\": \\\"966046148378667\\\"\\n                 }\\n               ]\\n             }\\n           ]\\n         },\\n         {\\n           \\\"card_index\\\": 1,\\n           \\\"components\\\": [\\n             {\\n               \\\"type\\\": \\\"header\\\",\\n               \\\"parameters\\\": [\\n                 {\\n                   \\\"type\\\": \\\"image\\\",\\n                   \\\"media_id\\\": \\\"448282164313965\\\"\\n                 }\\n               ]\\n             }\\n           ]\\n         },\\n         {\\n           \\\"card_index\\\": 2,\\n           \\\"components\\\": [\\n             {\\n               \\\"type\\\": \\\"header\\\",\\n               \\\"parameters\\\": [\\n                 {\\n                   \\\"type\\\": \\\"image\\\",\\n                   \\\"media_id\\\": \\\"1583971738812030\\\"\\n                 }\\n               ]\\n             }\\n           ]\\n         },\\n         {\\n           \\\"card_index\\\": 3,\\n           \\\"components\\\": [\\n             {\\n               \\\"type\\\": \\\"header\\\",\\n               \\\"parameters\\\": [\\n                 {\\n                   \\\"type\\\": \\\"image\\\",\\n                   \\\"media_id\\\": \\\"1104222870702261\\\"\\n                 }\\n               ]\\n             }\\n           ]\\n         }\\n       ]\\n     }\\n   ]\\n }\\n}\\n\")), mdx(\"br\", null), mdx(\"hr\", {\n    parentName: \"section\"\n  })));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#carousel","title":"Carousel","items":[{"url":"#body","title":"Body","items":[{"url":"#card-object","title":"Card object"}]},{"url":"#example","title":"Example","items":[{"url":"#carousel-http-request","title":"Carousel HTTP request"},{"url":"#carousel-body","title":"Carousel body"}]}]}]},"timeToRead":1,"parent":{"__typename":"File","relativePath":"whatsapp/messaging/with_template/carousel.md","fields":{"gitLogLatestAuthorName":"Irais Aguirre","gitLogLatestAuthorEmail":"irais.aguirre@conceptomovil.com","gitLogLatestDate":"6 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":"bf036a7f-daa6-5b19-ade7-d8ad3572a3a1"}},"staticQueryHashes":["12478684","12478684","2882937274","2882937274","353167761","353167761"]}