Tool reference · 22 tools

Emails, texts, push and social

News email drafts (never sent by the connector), every automatic email and its versions, email settings, text campaign audiences, push notifications, the phone line and social posts.

Ask it in plain words

  • "Draft a December newsletter about winter break camps."
  • "Turn on camp reminder emails."
  • "Use Tuesday's Instagram post as a news item on the website."

Worked examples: Draft a newsletter, Turn on camp reminders.

get_push_notifications

Push notifications Reads

Push notifications to families' phones: whether they are switched on, how many families and devices have them on, whether the website is live (before launch only staff and test addresses get them), and the last 30 sends (title, message, link, who it went to, families and devices reached). Sending is done by an owner in the back office (Marketing > Push notifications): it reaches people, so the connector never sends one.

Takes no parameters.

Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_push_notifications",
    "arguments": {}
  }
}

flyer_to_email

Make an email from a flyer Changes

Turn a saved flyer into a draft email in Marketing > Emails (owners and managers): a picture of the flyer, its words and details, its button, and a link to download the flyer as a PDF. Nothing is sent: the owner picks who gets it and presses Send on the Emails page.

ParameterTypeDescription
id requiredstringThe flyer's id (list_flyers)
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "flyer_to_email",
    "arguments": {
      "id": "<id>"
    }
  }
}

count_text_audience

Who a text would reach Reads

How many people a text message to a group would reach (only people who said yes to texts, never anyone who replied STOP), the text as it would be sent (with the gym's name and Reply STOP to opt out), how many parts it is and the cost estimate. The connector doesn't send texts: the owner sends them in Marketing > Text messages.

ParameterTypeDescription
audience requiredstringall, members, packs, customers, campers, competitors, loc:<location key> or tag:<list>
messagestringThe text to check (optional): returns it as sent, its parts and cost
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "count_text_audience",
    "arguments": {
      "audience": "<audience>"
    }
  }
}

save_email_draft

Save an email to customers as a draft Changesdry_runWeb developer

Save a news email or notice as a draft for the owner to review and send themselves: it becomes a saved template under Marketing > Email templates, picked under "Start from" on the Emails page (owners and managers). Nothing is sent from here, ever; the owner chooses who gets it and presses Send in the back office.

ParameterTypeDescription
namestringA name only the gym sees, e.g. Snow day closure (up to 80 characters)
subject requiredstringThe subject line (up to 150 characters)
message requiredstringThe email's words; blank lines between paragraphs
button_labelstringOptional button words, e.g. Book now
button_linkstringThe button's https:// link, needed with button_label
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "save_email_draft",
    "arguments": {
      "subject": "<subject>",
      "message": "<message>",
      "dry_run": true
    }
  }
}

get_email_preferences

See which emails a family gets Reads

Which types of email one family gets from the gym: competition essentials (always), competition updates, classes, camps and gym notices, follow-ups, and news and promotions; and whether their address bounced or marked an email as spam. Owners only.

ParameterTypeDescription
email requiredstringThe family's email address
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_email_preferences",
    "arguments": {
      "email": "<email>"
    }
  }
}

set_email_preferences

Change which emails a family gets Changesdry_run

Turn types of email on or off for one family, only when the family asked the gym to (owners only; recorded with the owner's name). Competition essentials (run order, competition-day reminders), receipts and confirmations can't be turned off. News and promotions can only be turned on by the family themselves (a recorded yes), so this tool doesn't change news; the family uses "Choose which emails you get" at the bottom of any email.

ParameterTypeDescription
email requiredstringThe family's email address
competition_updatesbooleanCompetition update emails for this family
classes_camps_and_gym_noticesbooleanClass, camp and gym notice emails for this family
follow_upsbooleanFollow-up emails for this family
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "set_email_preferences",
    "arguments": {
      "email": "<email>",
      "dry_run": true
    }
  }
}

get_automatic_emails

The emails the website sends automatically Reads

Every automatic email the website sends customers (Marketing > Email templates): its name, when it is sent, who gets it, whether it is on, whether the gym changed its words, and whether it can be switched off on its own; the on/off groups (trial, party, camp, waitlist, waiver renewal and class pack emails); and the gym's own saved templates. Nothing is sent from here.

Takes no parameters.

Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_automatic_emails",
    "arguments": {}
  }
}

get_email_template_versions

An email's earlier versions Reads

The words an automatic email (or a saved template) goes out with now, and its last 20 saved versions by date, each with its subject and first words. Use the version number with restore_email_template_version.

ParameterTypeDescription
email requiredstringThe email's name from get_automatic_emails, or a saved template's name
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_email_template_versions",
    "arguments": {
      "email": "<email>"
    }
  }
}

set_automatic_emails

Turn a group of automatic emails on or off Changesdry_runconfirm

Turn a whole group of automatic customer emails on or off (owners and managers): trial and drop-in reminders with the after-trial invitation, party reminders and thank-you, waitlist spot offers, camp reminders, waiver renewal reminders, or class pack emails. Turning one off needs confirm: true after the owner says yes. This never sends anything itself.

ParameterTypeDescription
group requiredstring: trial_and_drop_in_reminders | party_reminders | waitlist_offers | camp_reminders | waiver_renewals | class_packsWhich group of automatic emails
on requiredbooleantrue switches the whole group on, false off
confirmbooleanMust be true, after the owner has said yes
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "set_automatic_emails",
    "arguments": {
      "group": "trial_and_drop_in_reminders",
      "on": true,
      "dry_run": true
    }
  }
}

set_email_on

Turn one automatic email on or off Changesdry_runconfirm

Stop one automatic email on its own, or start it again (owners and managers), for the emails that can be switched off alone (reminders, follow-ups and thank-yous: can_switch_off_alone in get_automatic_emails). Receipts and confirmations can't be. Turning one off needs confirm: true after the owner says yes.

ParameterTypeDescription
email requiredstringThe email's name from get_automatic_emails
on requiredbooleantrue starts the email again, false stops it
confirmbooleanMust be true, after the owner has said yes
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "set_email_on",
    "arguments": {
      "email": "<email>",
      "on": true,
      "dry_run": true
    }
  }
}

reset_email_template

Put an email back to the standard words Changesdry_runconfirm

Put an automatic email back to NinjaHQ's standard words, undoing the gym's own words (owners and managers); its earlier versions stay under get_email_template_versions. An email switched off on its own is on again afterwards. For one of the gym's saved templates, this deletes it. Ask the owner, then send confirm: true.

ParameterTypeDescription
email requiredstringThe email's name, or a saved template's name to delete it
confirmbooleanMust be true, after the owner has said yes
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "reset_email_template",
    "arguments": {
      "email": "<email>",
      "dry_run": true
    }
  }
}

restore_email_template_version

Bring back an earlier version of an email Changesdry_run

Bring back one of an email's earlier saved versions (owners and managers): from then on the email goes out with those words. The words it has now are kept as a version too, so this can be undone the same way.

ParameterTypeDescription
email requiredstringThe email's key, from get_automatic_emails
version requiredintegerThe version number from get_email_template_versions
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "restore_email_template_version",
    "arguments": {
      "email": "<email>",
      "version": 1,
      "dry_run": true
    }
  }
}

get_email_settings

Email settings Reads

The gym's email settings: whether "Email me news" starts ticked for US visitors (US gyms only), the time camp reminders go out the day before, which groups of automatic emails are on, and whether owners get emails about customers' expiring or replaced cards.

Takes no parameters.

Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_email_settings",
    "arguments": {}
  }
}

set_email_settings

Change the email settings Changesdry_run

Change when camp reminders go out the day before, and (US gyms only) whether "Email me news" starts ticked for US visitors (owners and managers). To turn reminder emails on or off, use set_automatic_emails. Nothing is sent from here.

ParameterTypeDescription
news_box_ticked_for_us_visitorsbooleanUS gyms only: "Email me news" starts ticked on the website's forms for US visitors (US law allows it; visitors from other countries always see it unticked)
camp_reminder_hourinteger8 to 21 (24-hour clock): when camp reminders go out the day before, e.g. 17 = 5 PM
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "set_email_settings",
    "arguments": {
      "dry_run": true
    }
  }
}

set_card_alert_emails

Card alert emails to owners Changesdry_runconfirm

Turn on or off the emails owners get when a customer's saved card is about to expire, has expired or was replaced by the bank (owners and managers; Money > Cards to update). They go to the gym's owners only, never to customers. The list and check-in still show the cards either way. Turning them off needs confirm: true.

ParameterTypeDescription
on requiredbooleantrue sends owners these card emails, false stops them
confirmbooleanMust be true, after the owner has said yes
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "set_card_alert_emails",
    "arguments": {
      "on": true,
      "dry_run": true
    }
  }
}

get_phone_calls

How the gym's phone line answers Reads

How calls to the gym's NinjaHQ phone number are answered (owners only; Settings > Phone & texting): the gym's number, how many cell phones ring and in which order, whether the call is announced first, whether calls outside opening hours go to voicemail, and the voicemail greeting. Staff's own cell numbers and addresses are not shown.

Takes no parameters.

Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_phone_calls",
    "arguments": {}
  }
}

set_phone_calls

Change how the phone line answers Changesdry_run

Change how calls to the gym's NinjaHQ number are answered (owners only): the voicemail greeting, whether the cell phones ring all at once or one after another, the announcement before connecting, and after-hours voicemail. The cell phones that ring and the voicemail email addresses stay as they are (back office only). Calls are never recorded.

ParameterTypeDescription
voicemail_greetingstringWhat callers hear before leaving a voicemail (up to 500 characters); empty = the standard greeting
ringstring: all_at_once | one_after_anotherRing every phone at once, or one after another
announce_call_firstbooleanSay "Call for <gym>. Press 1 to answer" first, so a phone's own voicemail never takes the call
after_hours_straight_to_voicemailbooleanOutside the website's opening hours, calls go straight to voicemail
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "set_phone_calls",
    "arguments": {
      "dry_run": true
    }
  }
}

get_social_posts

Posts from Facebook and Instagram Reads

The gym's own recent Facebook and Instagram posts and what each one could add to the website: a closure, a schedule change, a special event (title, date, time, price, ages), photos or a video, and whether it was added. Also whether closures and photos are added by themselves. Only the gym's posts: comments and messages from people are not shown.

ParameterTypeDescription
showstring: new | done | ignored | allnew = waiting for a choice (default), done = used, ignored = skipped
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_social_posts",
    "arguments": {}
  }
}

use_social_post

Put a social post on the website Changesdry_run

Add what one of the gym's own posts announces to the website (owners and managers): a closure or schedule change on the schedule, a special event on Special events, its photos on the Photos page, or its video. Check the date, time and price with the owner first; never guess them.

ParameterTypeDescription
post_id requiredstringFrom get_social_posts
add requiredstring: closure | change | event | photos | videoWhat to add: closure (the gym is closed), change (a one-day schedule change), event (Special events), photos (to the Photos page), video (a click-to-play clip on the Photos page)
indexintegerWhich suggestion of that kind (from get_social_posts), default 0
titlestringFor an event or a video: the title (up to 80 characters)
datestringYYYY-MM-DD, to correct the date read from the post
endstringYYYY-MM-DD, the last day
timestringFor an event, e.g. 6-9 PM
pricestringFor an event, e.g. $35
agesstringFor an event, e.g. Ages 5-12
descriptionstringFor an event: the words families see (up to 600 characters)
use_picture_as_flyerbooleanFor an event: true (default) = the post's first picture becomes its flyer
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "use_social_post",
    "arguments": {
      "post_id": "<post_id>",
      "add": "closure",
      "dry_run": true
    }
  }
}

skip_social_post

Skip a social post Changesdry_run

Mark one of the gym's posts as skipped, so it leaves the waiting list without changing the website (owners and managers).

ParameterTypeDescription
post_id requiredstringThe post's id, from get_social_posts
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "skip_social_post",
    "arguments": {
      "post_id": "<post_id>",
      "dry_run": true
    }
  }
}

refresh_social

Check Facebook and Instagram for new posts Changesdry_run

Check the gym's connected Facebook Page and Instagram now for new posts (and new comments for the Social inbox), instead of waiting up to 15 minutes (owners and managers). It only reads the gym's own accounts: nothing is posted or replied. Says how many are new; comments themselves are answered in the back office.

ParameterTypeDescription
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "refresh_social",
    "arguments": {
      "dry_run": true
    }
  }
}

set_social_auto

Let social posts update the website by themselves Changesdry_runconfirm

Choose whether closures and photos from the gym's own posts go on the website by themselves or wait for a tap (owners only). Special events always wait. Switching one back to ask needs confirm: true.

ParameterTypeDescription
closuresstring: auto | askauto = closures announced in a post go on the schedule by themselves; ask = wait for a tap
photosstring: auto | askauto = a post's photos go on the Photos page by themselves
confirmbooleanMust be true, after the owner has said yes
dry_runbooleantrue = only show what would change, save nothing. Use it first for anything the owner hasn't seen yet.
Call shape
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "set_social_auto",
    "arguments": {
      "dry_run": true
    }
  }
}

All 318 tools

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