WhatsApp API Platform

Template

Embed the WhatsApp template creation wizard and react to created and cancelled events.

Mounts the template-creation wizard as an iframe. There is no list or edit surface — the embed always opens on a fresh template, so it's ideal for an in-app "Create template" flow.

Quick start

<div id="embed" style="height: 720px"></div>
<script src="https://new.theultimate.io/embed.js" defer></script>
<script>
  Embed.render("template", {
    target: "#embed",
    authToken: "<jwt>", // or apiKey: "pm_xxx"
    theme: "system",
    on: {
      ready: function () {
        console.log("creator ready");
      },
      created: function (m) {
        console.log("template created", m.templateId);
      },
      cancelled: function () {
        console.log("creator cancelled");
      },
    },
  });
</script>

Options

The template embed takes only the common options — there are no surface-specific options.

Events

EventFires when
readyThe wizard has loaded and authenticated.
createdA template was created. Payload includes templateId.
cancelledThe user dismissed the wizard without creating a template.

Teardown

render returns an instance; call destroy() when you remove the embed (required in SPAs):

var instance = Embed.render("template", {
  target: "#embed",
  authToken: "<jwt>",
});

// later…
instance.destroy();

How is this guide?

On this page