Developers · Examples

Worked examples

What a person asks, and the calls their AI makes. Every call here is checked against the tool's real schema when the site is built. Ids like <version id> come from the step before; prices, dates and names are samples.

Review the website and act on the numbers

An owner's app · Analytics and insights tools

"Review my website and tell me the three changes that would get more bookings."
  1. get_website_review Reads Everything Analytics measured against the period before: the ranked What to improve list, funnels, menu use, heatmap summaries, forms, speed, problems, missing pages, videos, and a playbook of which tool makes each kind of change.

    {
      "days": 28
    }
  2. get_page_report Reads Drill into the page with the biggest finding: scroll depth, how many views reach each section and for how long, taps per screen size, people who leave within 7 seconds.

    {
      "page": "/parties",
      "days": 28
    }
  3. get_page_heatmap Reads Every element tapped on phones with the spots inside it (0-1000 across and down): here the party photo gets taps but isn't a link, and few reach the Book button.

    {
      "page": "/parties",
      "screen": "phone",
      "days": 28
    }
  4. get_page Reads The page's sections and their ids, to suggest the change.

    {
      "page": "/parties"
    }
  5. move_section Changes The assistant tells the owner what it found (with the numbers) and what it would change, and shows the dry run: the booking section moves up under the top picture.

    {
      "page": "/parties",
      "id": "<booking section id>",
      "index": 1,
      "dry_run": true
    }
  6. move_section Changes After the owner says yes. Then publish_page when the owner is happy; History keeps the change, and the next review shows whether more people reached the button.

    {
      "page": "/parties",
      "id": "<booking section id>",
      "index": 1
    }

Add a weekly class

An owner's app · Schedule and classes tools

"Add Teen Ninja on Tuesdays from 5 to 6 PM for ages 12 to 17, $95 a month, 12 kids max."
  1. get_classes Reads Read the classes first: the types, locations and names already in use.

    {}
  2. add_class Changes A dry run shows exactly what would be added. The assistant shows it and asks "Shall I save that?"

    {
      "name": "Teen Ninja",
      "days_and_times": [
        "Tuesday 5:00 PM - 6:00 PM"
      ],
      "ages_from": 12,
      "ages_to": 17,
      "tuition": 95,
      "charged": "month",
      "capacity": 12,
      "free_trials": true,
      "dry_run": true
    }
  3. add_class Changes Saved: the class is on the weekly schedule and families can book it. History keeps the change.

    {
      "name": "Teen Ninja",
      "days_and_times": [
        "Tuesday 5:00 PM - 6:00 PM"
      ],
      "ages_from": 12,
      "ages_to": 17,
      "tuition": 95,
      "charged": "month",
      "capacity": 12,
      "free_trials": true
    }

Close for a holiday

An owner's app · Schedule and classes tools

"We're closed on Thanksgiving, November 26."
  1. add_closure Changes Shows which classes and bookings that day touches.

    {
      "date": "2026-11-26",
      "reason": "Thanksgiving",
      "dry_run": true
    }
  2. add_closure Changes The schedule, the home page and the booking pages show the closure within about a minute.

    {
      "date": "2026-11-26",
      "reason": "Thanksgiving"
    }

Build a landing page in a site version

A web developer's agent (an owner's works the same) · Pages and design tools

"Make a Summer Ninja Camp landing page, let the owner preview it, then publish."
  1. get_developer_guide Reads A web developer's agent reads the guide first: site versions, the design and CSS rules, the checks.

    {}
  2. create_site_version Changes A copy of the live site. Nothing here touches the live site. The answer has the version's id.

    {
      "name": "Summer camp 2027",
      "note": "New camp landing page"
    }
  3. list_section_types Reads Every section type, its layouts and fields, and the live data sections (the camps, the schedule).

    {}
  4. create_page Changes Starts from the camp template, in the site's own design.

    {
      "version": "<version id>",
      "title": "Summer Ninja Camp",
      "slug": "summer-camp",
      "template": "camp",
      "seo": {
        "title": "Summer Ninja Camp for Kids 5 to 13",
        "description": "Week-long summer ninja camps with obstacle courses, games and coaches who love kids. Full and half days, June to August."
      }
    }
  5. add_section Changes A Questions section. The page also gets FAQ structured data for Google.

    {
      "version": "<version id>",
      "page": "/summer-camp",
      "type": "faq",
      "variant": "accordion",
      "settings": {
        "heading": "Camp questions"
      },
      "blocks": [
        {
          "settings": {
            "q": "What should my child bring?",
            "a": "Water, a snack and gym shoes. We have the rest."
          }
        },
        {
          "settings": {
            "q": "Can I book single days?",
            "a": "Yes. Book by the week, by the day or with a flex pass."
          }
        }
      ]
    }
  6. check_page Reads Findings as { severity, check, section, where, message, fix }. Fix every error.

    {
      "version": "<version id>",
      "page": "/summer-camp"
    }
  7. site_version_link Changes A 14-day preview link of the whole site from this version, for the owner.

    {
      "version": "<version id>",
      "action": "create"
    }
  8. publish_site_version Changes Runs the review, then puts the design, every page, the menu, the logo and the icon live at once. The old site goes into the library.

    {
      "version": "<version id>",
      "confirm": true
    }

Change the design

A web developer's agent (an owner's works the same) · Pages and design tools

"Make it look more athletic: round corners and pill buttons."
  1. get_design_system Reads The current design: colors, fonts, sizes, corners, schemes, the custom CSS and its rules.

    {}
  2. set_design Changes Every color pair is checked for WCAG AA contrast; a failing pair is refused with the reason.

    {
      "personality": "bold-athletic",
      "changes": {
        "radius": "round",
        "buttons": "pill"
      },
      "dry_run": true
    }
  3. set_design Changes Saved as the draft design.

    {
      "personality": "bold-athletic",
      "changes": {
        "radius": "round",
        "buttons": "pill"
      }
    }
  4. publish_design Changes Live on every page. The website check runs on the home page and the menu's pages and emails what to fix.

    {
      "note": "Bolder, rounder look",
      "confirm": true
    }

Add CSS to one page

A web developer's agent (an owner's works the same) · Pages and design tools

"Space out the hero heading on the camps page."
  1. update_page Changes Page CSS is scoped for you: the rule becomes [data-pb-page="/camps"] .pb-t-hero h1.

    {
      "page": "/camps",
      "css": ".pb-t-hero h1 { letter-spacing: .02em; }\n@media (max-width: 600px) { .pb-t-hero h1 { letter-spacing: 0; } }",
      "dry_run": true
    }
  2. preview_page Reads A signed 24-hour preview link to check at phone and computer size.

    {
      "page": "/camps"
    }
  3. publish_page Changes Live within about a minute.

    {
      "page": "/camps",
      "note": "Hero heading spacing",
      "confirm": true
    }

Make a camp flyer and email it

An owner's app · Flyers tools

"Make a winter camp flyer with a QR code to the camps page, then turn it into an email."
  1. list_camps Reads The gym's camps with their ids, dates and prices.

    {}
  2. list_flyer_templates Reads The occasions, designs and palettes, and what a flyer can be tied to.

    {}
  3. create_flyer Changes Tied to the camp, so its dates and price fill in. Letter size by default, with a PDF and social pictures.

    {
      "occasion": "wintercamp",
      "palette": "brand",
      "tie_to": {
        "kind": "camp",
        "id": "<camp id>"
      },
      "slots": {
        "headline": "Winter Ninja Camp",
        "subhead": "Obstacles, games and friends all break long",
        "cta": "Book a day or the week",
        "qr": "camps"
      }
    }
  4. flyer_to_email Changes An email draft from the flyer. The owner sends it from the back office; the connector never sends email.

    {
      "id": "<flyer id>"
    }

Draft a newsletter

An owner's app · Emails and social tools

"Write a December newsletter about winter break camp."
  1. save_email_draft Changes Shows the draft.

    {
      "name": "December news",
      "subject": "Winter break camp is open",
      "message": "Winter break is almost here. Our camp runs December 22 to January 2 with full and half days.\n\nBook a day, a week or a flex pass.",
      "button_label": "See camp days",
      "button_link": "https://yourgym.com/camps",
      "dry_run": true
    }
  2. save_email_draft Changes Saved as a draft. It goes only to families who said yes to news, with one-click unsubscribe and no open or click tracking, when the owner sends it.

    {
      "name": "December news",
      "subject": "Winter break camp is open",
      "message": "Winter break is almost here. Our camp runs December 22 to January 2 with full and half days.\n\nBook a day, a week or a flex pass.",
      "button_label": "See camp days",
      "button_link": "https://yourgym.com/camps"
    }

Turn on camp reminders

An owner's app · Emails and social tools

"Remind camp families automatically before their camp days."
  1. get_automatic_emails Reads Every automatic email, on or off, with its wording.

    {}
  2. set_automatic_emails Changes What would change.

    {
      "group": "camp_reminders",
      "on": true,
      "dry_run": true
    }
  3. set_automatic_emails Changes On. Each email's words can be changed in Email templates.

    {
      "group": "camp_reminders",
      "on": true,
      "confirm": true
    }

Keep an old link working

A web developer's agent (an owner's works the same) · Search and redirects tools

"The old summer camp page moved. Make the old link go to the new one."
  1. get_redirects Reads The redirects already set, and addresses from the old website.

    {}
  2. add_redirect Changes Old links and search results keep working.

    {
      "old_address": "/summer-camps-2025",
      "goes_to": "/summer-camp"
    }

Black Friday discount code

An owner's app · Shop and promotions tools

"Make FRIDAY20 for 20% off the shop and camps through Monday."
  1. get_discount_codes Reads The codes the gym already has.

    {}
  2. add_discount_code Changes A dry run first.

    {
      "code": "FRIDAY20",
      "kind": "percent",
      "value": 20,
      "works_for": [
        "shop",
        "camp"
      ],
      "starts_on": "2026-11-27",
      "ends_on": "2026-11-30",
      "dry_run": true
    }
  3. add_discount_code Changes Families can use it at checkout from November 27.

    {
      "code": "FRIDAY20",
      "kind": "percent",
      "value": 20,
      "works_for": [
        "shop",
        "camp"
      ],
      "starts_on": "2026-11-27",
      "ends_on": "2026-11-30"
    }

Put booking on a website you already have

An owner's app · Widgets tools

"Give me a class schedule I can paste into our WordPress site."
  1. get_website_widget Reads The one line of HTML to paste (shown below), and a preview.

    {
      "kind": "classes",
      "style": "list"
    }
  2. set_widget_websites Changes Booking lists show only on the websites saved here (up to 10). Buttons work anywhere.

    {
      "websites": "yourgym.com",
      "confirm": true
    }

The line to paste into the other website (a plain link without the script, so it works for everyone):

<a href="https://yourgym.com/embed/go/classes" data-ow-widget="list" target="_blank" rel="noopener">Book a class</a><script src="https://yourgym.com/embed/widget.js" async></script>

Change party packages

An owner's app · Camps and parties tools

"Raise the Ninja Party to $350 with 15 kids included."
  1. get_party_booking Reads Packages, start times, rooms, add-ons, deposit and booking terms.

    {}
  2. update_party_booking Changes Shows the package before and after.

    {
      "packages": [
        {
          "package": "Ninja Party",
          "price": 350,
          "guests_included": 15
        }
      ],
      "dry_run": true
    }
  3. update_party_booking Changes Send only what changes: the other packages stay. New bookings use the new price; parties already booked keep theirs.

    {
      "packages": [
        {
          "package": "Ninja Party",
          "price": 350,
          "guests_included": 15
        }
      ]
    }

Undo a change

An owner's app · History and undo tools

"Undo the change to the schedule I made this morning."
  1. list_changes Reads Recent changes: when, who, through which app, and a change_id.

    {
      "area": "Weekly schedule",
      "limit": 5
    }
  2. get_change Reads Exactly what changed.

    {
      "change_id": "<change id>"
    }
  3. restore_change Changes The earlier version is back. A restore can itself be undone.

    {
      "change_id": "<change id>",
      "confirm": true
    }

Answer a how-to question

An owner's app · Help and overview tools

"How do I refund a camp day?"
  1. search_help Reads Help Center articles that match.

    {
      "query": "refund a camp day"
    }
  2. get_help_article Reads The article's steps, so the assistant walks the owner through the right screens instead of guessing.

    {
      "slug": "<article slug>"
    }

Ask NinjaHQ

Answers from our Help Center and website

Ask anything about NinjaHQ, or try:

AI answers from NinjaHQ's own pages and can make mistakes. Your questions are sent to Anthropic, the AI company, to answer; NinjaHQ doesn't keep them. Privacy