Build a popup
What your agent does behind the scenes, and a few things worth knowing when you steer it.
You don’t have to call any tools yourself. Still, it helps to know the order your agent works in, so you can tell it what you want at each step.
The steps
First it creates a site with create_site. You need one site per website. The reply includes the script tag for that site and a manage token, which is how you prove the site is yours while you don’t have an account.
Then it reads the format with popup_schema and looks at the templates with list_templates - the same ones you can browse and try in the gallery. Starting from a template is almost always faster than starting from nothing.
It creates the popup with create_popup. This gives you a draft and a builder link.
Before publishing it runs audit_popup, which looks for mistakes that don’t cause an error but still break something on the page.
Finally publish_popup puts it live. The first time you publish on a site, you also get the script tag again.
To change a popup later, your agent reads it with get_popup, edits it, saves it with update_popup and publishes again. Nothing changes on your site until you publish.
The builder
Every popup has a builder link that looks like https://app.openpopup.ai/b/<id>#<token>. It opens the popup in a visual editor where you can change the text and fields, pick the layout and size, set when it appears and how often, and preview it before you publish.
There’s no login. Whoever has the link can edit the popup, so treat it like a password.
Three easy mistakes
These don’t throw an error, which is why they’re easy to miss. audit_popup checks for all three.
Every question needs its own label. Answers are saved under the question’s label, so two questions called “Email” end up writing into the same place and you lose one of them.
The title of a popup is a HEADING block. The name in settings is only for you, in your list of popups. If you put the title there, it either doesn’t show or shows twice.
LINK is a field where the visitor types a web address. If you want a clickable link in the popup, put a normal <a> tag inside a paragraph instead.