Partner program

Building apps for NurtureSite sites

Register an app, get it installed on a site, and read site and CRM data with the Apps API.

An app is software you build and host yourself that works with NurtureSite sites. A site owner installs it from a link you share, sees exactly what it will be able to do, and approves. Your app then reads that site's data through the Apps API.

This is separate from the Partner API, which acts on your own partner account (creating client sites, checkout links). An app acts on one site at a time, with permissions that site's owner granted.

What apps can do today:

  • Read a site's details, CRM records, the people in its CRM, and its bookings.
  • Add their own blocks to a site's pages. The owner places them from the page editor.
  • Be told when things happen on a site, such as a new CRM record or a booking, through webhooks.
  • Make changes: add a CRM record, change its status, add a note, rename a contact, cancel a booking.
  • Add their own steps to a site's automations, and start the automations an owner builds on their events.
  • Show their own screen inside the site admin, and their own section to signed-in customers in the site's customer portal.
  • Charge for the app: you set a monthly price, the site pays it on its NurtureSite bill, and you are paid your share.

Planned, not available yet: one-time and usage-based charges. This page is updated as each one ships.

Before you start

  • Your partner account must be active.
  • If NurtureSite has published an App Developer Agreement, you accept it once under Partner → Apps before you can register or change an app.
  • You can register up to 20 apps.

Register an app

Go to Partner → Apps → Register an app and fill in:

Field Notes
App name Shown to site owners on the install screen and on their site's page.
Short description One or two sentences. Owners read it before they install.
Redirect addresses Where we send the owner after they approve. One per line, https:// only, no # part. The first one is used unless your install link names another.
Permissions What the app asks for. See below.

After you register, the app's page shows two secrets once. Copy both:

  • Client secret (nsapp_secret_…): your server sends it to get access tokens. We only keep a hash of it.
  • Signing secret (nsapp_sign_…): your app uses it to check that a webhook really came from NurtureSite.

If you lose one, create a new one on the app's page. A new client secret replaces the old one at once. A new signing secret keeps the previous one valid while you switch.

Keep both secrets on your server. Never put them in a browser, a mobile app, or a public repository.

Permissions

Permission What the app can read Personal data
site:read The site's name, web address, timezone and what the business calls its CRM records. No
leads:read CRM records: status, source, score, priority, value and dates. No names, emails, phone numbers, messages or addresses. No
contacts:read The people in the CRM: names, emails, phone numbers and consent. With this, CRM records and bookings also include the person's details. Yes
appointments:read Bookings and the services people can book. Yes
leads:write Add CRM records, change a record's status, score, priority, value or follow-up date, and add notes. No
contacts:write Change a person's first name, last name and role. Not their emails, phone numbers or consent. Yes
contacts:import Nothing is read. The app can copy a customer list into the CRM in bulk, quietly: no alerts or welcome automations for the people it adds. It cannot change the email or phone of someone already there. Yes
templates:write Nothing is read. The app can add email templates to the CRM, for the owner's automations and one-to-one email. It cannot send email, or see or change the templates already there. No
media:write Nothing is read. The app can add images to the site's media library, for example the pictures of a template it adds. It cannot see, change or remove the images already there. No
appointments:write Cancel a booking, under the business's own cancellation rules. Yes
automations:trigger Nothing is read through the API. The app can add steps to the site's automations and start the automations built on its events. When one of its steps runs, the app is sent the record the step runs for, as far as its other permissions allow. See Automations
admin:embed Nothing is read. The app can show its own screen inside the site admin, and learns which staff member is looking: an id and their role. No
portal:embed Nothing is read. The app can show its own section in the site's customer portal, and learns which customer is signed in: the id of their login and of their CRM records. Yes
storefront:embed Nothing is read. The app can add native and frame blocks to the site's pages. No
storefront:script Nothing is read through the API. The app's blocks can run its own HTML and JavaScript on the site's public pages. Only for partners NurtureSite has approved to ship scripts. See below

Ask only for what your app needs. The owner sees the list in plain words before installing, and a long list costs installs.

If you change an app's permissions later, sites that already installed it keep what they approved. Each owner approves the new list by opening your install link again.

The install flow

https://nurturesite.com/apps/{your-app-id}/install?state={random-value}

Your app's id and its full install link are on the app's page. Add a state value you generated for this visit; you get the same value back in step 3. Add redirect_uri= only if you want one of your other registered redirect addresses.

2. The owner approves

The owner signs in to NurtureSite, picks one of their sites, reads the permissions and chooses Approve and install. A partner can do the same for a client site they manage.

Opening the link never installs anything. Only the owner's approval does.

3. We send them back to you

https://yourapp.example.com/callback?code=…&installation_id=…&site_id=…&state=…
  • code: a one-time code. It works once and expires after 10 minutes.
  • installation_id: identifies this app on this site. Store it.
  • site_id: the site's id, used in API addresses. Store it.
  • state: must match the value you sent. If it doesn't, stop.

4. Swap the code for an access token

From your server:

POST https://nurturesite.com/api/apps/oauth/token
Authorization: Basic {base64 of client_id:client_secret}
Content-Type: application/json

{"grant_type": "authorization_code", "code": "…"}

You can send client_id and client_secret in the body instead of the Authorization header.

{
  "access_token": "nsat_…",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "site:read leads:read",
  "installation_id": "1f1a93bd-a945-4f80-b04d-47df26ac3a6d",
  "site_id": "b4562bb0-4517-41e4-a044-5bf07f0aacba"
}

5. Get a new token whenever you need one

A token works for one site and lasts one hour. There are no refresh tokens. Ask for a new token with your client secret and the installation id:

{"grant_type": "client_credentials", "installation_id": "1f1a93bd-a945-4f80-b04d-47df26ac3a6d"}

Reuse a token until shortly before it expires rather than asking for one on every call.

Test installs

You can install your own app on your own clients' sites to build and test it. These installs are marked Your test install on the app's page and work exactly like any other.

Calling the API

Base URL: https://nurturesite.com/api/apps/v1

GET /api/apps/v1/sites/{site_id}/leads?limit=50
Authorization: Bearer nsat_…
Accept: application/json
Endpoint Permission Returns
GET /installation Any valid token The install this token belongs to: site_id, current permissions, status.
GET /sites/{site_id} site:read The site.
GET /sites/{site_id}/leads leads:read CRM records. Filters: status, source.
GET /sites/{site_id}/leads/{id} leads:read One record.
GET /sites/{site_id}/contacts contacts:read People. Filters: lead_id, email (exact match).
GET /sites/{site_id}/contacts/{id} contacts:read One person.
GET /sites/{site_id}/appointments appointments:read Bookings. Filters: status (confirmed, pending_payment, cancelled), lead_id, starts_after, starts_before.
GET /sites/{site_id}/appointments/{id} appointments:read One booking.
GET /sites/{site_id}/booking-types appointments:read The services people can book.
POST /sites/{site_id}/leads leads:write Adds a CRM record. See Making changes.
PATCH /sites/{site_id}/leads/{id} leads:write Changes status, score, priority, estimated_value, next_follow_up_at.
POST /sites/{site_id}/leads/{id}/notes leads:write Adds a note to the record's timeline. Body: {"note": "…"}.
PATCH /sites/{site_id}/contacts/{id} contacts:write Changes first_name, last_name, role.
POST /sites/{site_id}/appointments/{id}/cancel appointments:write Cancels a booking. Optional {"reason": "…"}.
GET /sites/{site_id}/import/schema contacts:import What an importer needs before it maps columns: the site's statuses and extra fields.
POST /sites/{site_id}/contacts/import contacts:import Copies up to 100 people in. See Import a customer list.
POST /sites/{site_id}/message-templates templates:write Adds an email template. See Add email templates and images.
POST /sites/{site_id}/media media:write Adds one image to the media library and answers its address.
GET /sites/{site_id}/blocks/{key}/content storefront:embed What you last pushed for one of your native blocks.
PUT /sites/{site_id}/blocks/{key}/content storefront:embed Replaces that content. Body: {"content": {…}}, up to 64 KB.

A token only reaches its own site. Any other site_id answers 404 SITE_NOT_FOUND.

Lists

Every list answers the same way, oldest first:

{"data": [ … ], "next_cursor": "aWQ6NTA"}
  • limit: 1 to 100, default 50.
  • cursor: pass the next_cursor you were given to get the next page. null means you have everything.
  • updated_since: an ISO 8601 date and time. Returns only what changed since then, which is the cheap way to stay in step.

All dates are ISO 8601 in UTC.

What a CRM record looks like

With leads:read only:

{
  "id": 12,
  "status": "new",
  "source": "contact_form",
  "page_url": "https://summitplumbing.example/contact",
  "score": 40,
  "priority": "normal",
  "estimated_value": "450.00",
  "primary_contact_id": 31,
  "contacted_at": null,
  "last_contacted_at": null,
  "next_follow_up_at": null,
  "created_at": "2026-11-14T02:24:02+00:00",
  "updated_at": "2026-11-14T02:24:02+00:00"
}

page_url has its query string removed, since campaign links can carry an email address.

With contacts:read as well, the record also has name, email, phone, message, address and fields (the extra answers from the form), and page_url is complete.

A contact has first_name, last_name, display_name, role, is_primary, verified, lists of emails and phones, and consent: for each channel and purpose, whether the person agreed to be contacted. Your app must honor it. Do not message someone who has not consented for that channel and purpose.

Bookings

A booking has status, starts_at, ends_at, booking_type_id, booking_type_name, lead_id, party_size, meeting_mode and booker_timezone. With contacts:read it also has customer_name, customer_email, customer_phone and customer_notes.

Slots that are only held during checkout, or that expired, are never returned.

Making changes

Every change your app makes is written to the record's timeline with your app's name, so the business can always see what an app did.

Send an Idempotency-Key on every POST

Each POST must carry an Idempotency-Key header: any value up to 200 characters that is unique to that change, such as your own order or message id. If a call times out and you send it again with the same key, the site answers from the first call instead of doing it twice. A POST without the header is refused with 400 IDEMPOTENCY_KEY_REQUIRED. PATCH calls need no key.

Add a CRM record

POST /api/apps/v1/sites/{site_id}/leads
Authorization: Bearer nsat_…
Idempotency-Key: order-1001
Content-Type: application/json

{"email": "pat@example.com", "name": "Pat Visitor", "phone": "+15555550101",
 "message": "Asked for a quote", "fields": {"budget": "5k"}, "marketing_consent": true}

Only email is required. The answer is {"data": {…record…}, "created": true}.

If that email already belongs to someone in the CRM, you get their existing record back with "created": false, and nothing about that person is changed: an app's word is not proof of who someone is, so an existing person's name, email and phone stay as they are. marketing_consent is recorded only when it is true; false or leaving it out never opts anyone out.

Import a customer list

POST /leads is for news: a new lead emails the owner, raises an alert and starts their welcome automations. Copying over the customers a business already has is not news. Use the import instead, with the contacts:import permission:

POST /api/apps/v1/sites/{site_id}/contacts/import
Authorization: Bearer nsat_…
Idempotency-Key: import-42:0
Content-Type: application/json

{"origin": "acme-crm", "on_match": "skip", "rows": [
  {"first_name": "Pat", "last_name": "Visitor", "email": "pat@example.com", "phone": "+15555550101",
   "status": "qualified", "notes": "Prefers mornings", "fields": {"budget": "5k"},
   "consent": {"email_marketing": "opted_out"}, "external_id": "acme-77"}
]}
  • Up to 100 rows a call, and 50,000 rows a day per install. Give each batch its own Idempotency-Key and reuse it when you retry.
  • A row needs an email or a phone number. On sites whose records are households or places, an address is enough. A row can also carry name (or first_name and last_name), address_line1, address_line2, address_city, address_region, address_postal, address_country, status, notes, fields and external_id.
  • origin is a short slug naming where the list came from. Records are saved with the source import:{origin}.
  • It is quiet. The site sends no owner email, alert, welcome automation or customer portal invitation for the people you add, and no lead.created or contact.created events go to any app, yours included.
  • Someone already in the CRM is never changed. A row whose email (or phone) matches an existing record is reported as matched, and that record keeps its own name, email and phone. With "on_match": "fill_blanks" the site fills an address, notes or extra fields the record does not have yet; what is there always wins.
  • Consent. "opted_in" opts in a person the import creates. "opted_out" records an unsubscribe, on a new person and on an existing one with that email. Leaving consent out records nothing. An import never opts an existing person in.
  • "dry_run": true changes nothing and reports what would happen. Dry runs do not count against the daily limit.

The answer has one result per row, in order, and the totals:

{"data": {"dry_run": false,
  "results": [{"index": 0, "outcome": "created", "lead_id": 812, "opted_out": true}],
  "counts": {"created": 1, "matched": 0, "filled": 0, "invalid": 0}}}

outcome is created, matched, filled or invalid (with a reason). One bad row never stops the rest.

Ask GET /sites/{site_id}/import/schema first: it lists the statuses the site uses, its default status, and the extra fields the owner defined (key, label, type, options), so your column mapping can offer them. A status the site does not have falls back to its default.

Add email templates and images

With templates:write an app can add email templates to the site's CRM. The owner then uses them in automations and one-to-one email, and can change them in the template editor:

POST /api/apps/v1/sites/{site_id}/message-templates
Authorization: Bearer nsat_…
Idempotency-Key: template-acme-77
Content-Type: application/json

{"name": "Spring newsletter", "subject": "Hello {{first_name}}", "body_html": "<table>…</table>"}
  • body_html is up to 600 KB. A whole HTML document is fine: the site keeps its <style> blocks and the inside of <body>. Scripts, forms, frames, click handlers, comments and any link that is not http, https, mailto or tel are removed. Inline your CSS where you can: many mail apps ignore <style>.
  • Leave out your own footer and unsubscribe link. The site adds its own when it sends, with the business's address and a working unsubscribe link.
  • Merge tags are the site's own, such as {{first_name}}, {{name}}, {{email}}, {{phone}} and {{company}}.
  • The name is kept unique. If the CRM already has a template with that name, the site adds " (2)".
  • The answer is {"data": {"id", "name", "slug", "edit_url"}}, where edit_url opens the template in the site admin. Nothing is sent to anyone.

With media:write, put the template's images in the site's media library first, so they keep working when your copy is gone: POST /sites/{site_id}/media with {"filename": "hero.png", "data": "<base64>", "alt": "…"}. JPEG, PNG, GIF or WebP, up to 3 MB each, checked by their content and not their name. The answer is {"data": {"id", "url"}}; use url in your HTML. Give each image its own Idempotency-Key.

What an app cannot change

Emails, phone numbers and consent. Those are how the business reaches a person and whether it may, and they only change through the business itself or the person.

Cancelling a booking

A cancellation goes through the business's own rules, exactly as when the customer cancels online: the notice period applies, and so does any refund the business offers. If the rules do not allow it, you get 409 CANNOT_CANCEL with the reason. Cancelling a booking that is already cancelled succeeds and changes nothing.

Blocks

A block is a section your app adds to a site's pages. You declare your blocks once, on your app's page under Blocks, as JSON. Every site that installed your app then offers them in its page editor, in the block library under Apps. The owner places a block like any other section and fills in the fields you declared.

When your app is uninstalled or paused, its blocks stop showing on every page without anyone editing the pages. They come back if the app is installed again.

There are three kinds. Pick the least powerful one that does the job.

Kind What it is Permission
native You supply content; the site lays it out with its own pieces and styles. It matches the site's look and search engines read it as part of the page. None of your code runs. storefront:embed
frame Your own page, shown in a sandboxed frame. For interactive widgets. storefront:embed
script Your own HTML and JavaScript, run on the page itself. storefront:script
{
  "blocks": [
    {
      "key": "reviews",
      "name": "Customer reviews",
      "description": "Shows the latest reviews in the site's own style.",
      "kind": "native",
      "fields": [
        {"key": "title", "label": "Heading", "type": "text", "default": "What our customers say"}
      ],
      "pieces": [
        {"type": "heading", "text": {"setting": "title"}},
        {"type": "list", "layout": "cards", "items": {"content": "reviews"},
         "item": {"title": {"item": "author"}, "text": {"item": "body"}, "meta": {"item": "date"}}}
      ]
    }
  ]
}

Every block has a key (lowercase letters, digits, - and _), a name and a description the owner sees, and a kind. An app can declare up to 20 blocks.

Fields the owner fills in

fields are the settings the owner sees when they place your block: up to 12, each with a key, a label, a type (text, textarea, url, number, toggle, or select with options), and optionally a default, help text and max length. Every answer reaches you as text.

Native blocks

A native block is a list of up to 12 pieces:

Piece Properties
heading text
text text (plain, line breaks kept) or html (cleaned by the site: formatting, links and images only)
image src, alt
button label, href
list items, layout (cards or rows), and item with any of title, text, image, meta, href, rating

A property is either fixed text or a reference:

  • {"setting": "title"}: what the owner typed into that field.
  • {"content": "summary"}: something you pushed for this block on this site (a dot path such as stats.average works).
  • {"item": "author"}: a field of the current list item. Only inside a list's item.

A list's items names an array in your content, for example {"content": "reviews"}. Up to 24 items are shown.

An item's rating is a number from 0 to 5 (halves and tenths work) and is drawn as stars. Anything else is left out.

Push content from your server whenever it changes:

PUT /api/apps/v1/sites/{site_id}/blocks/reviews/content
Authorization: Bearer nsat_…
Content-Type: application/json

{"content": {"reviews": [{"author": "Pat V.", "body": "Fast and friendly.", "date": "March 2026"}]}}

Content is data. The site removes any markup from text, keeps only http, https, mailto, tel and site-relative links, and leaves out a piece that ends up empty. A native block with nothing to show is left off the page.

Frame blocks

{"key": "widget", "name": "Booking widget", "kind": "frame", "src": "https://yourapp.example.com/embed/widget", "height": 420}

Your page loads in a frame with ?installation_id=…&block=… added to its address, so your server knows which site is asking. The frame is sandboxed: it cannot read the page around it, its cookies or anything a signed-in person can see. height is the starting height in pixels.

Load the App Bridge in your frame page to size the frame to your content and to learn the owner's settings and the visitor's cookie choice:

<script src="https://nurturesite.com/sdk/app-bridge.v1.js"></script>
<script>
  NurtureSiteApp.ready(function (context) {
    // context.settings: the owner's answers to your block's fields
    // context.consent:  { analytics, marketing }
    // context.page:     { url, title }
  });
  NurtureSiteApp.onConsent(function (consent) { /* the visitor changed their choice */ });
</script>

Script blocks

Script blocks are for partners NurtureSite has reviewed and approved to ship scripts. If your account is approved, storefront:script appears in your app's permission list and your app's page says so. Ask us if you need it.

{
  "key": "chat",
  "name": "Chat bubble",
  "kind": "script",
  "html": "<div class=\"my-chat\"></div>",
  "script_urls": ["https://yourapp.example.com/chat.js"],
  "inline_script": "",
  "load": "after_consent"
}
  • html is placed on the page as written. script_urls (up to 5, https://) load once per page view, in order; inline_script runs once after them.
  • Your block's element carries data-ns-app, data-ns-block and data-settings (the owner's answers, as JSON).
  • When your code has loaded, the element gets an nsapp:block-mounted event, and nsapp:block-unmounted before it is removed. Listen on document: visitors move between pages without a full reload, so blocks come and go while your script stays loaded.
  • "load": "after_consent" waits until the visitor accepts analytics or marketing cookies. Use it for anything that tracks people.
document.addEventListener('nsapp:block-mounted', function (event) {
  if (event.detail.app !== 'your-app-id') return;
  startChat(event.target, event.detail.settings);
});

A script block runs with the same reach as the page itself: it can see what visitors type and change what the page shows. NurtureSite approves the partner and does not check each version of your code, so you are fully responsible for what it does. The owner is told this on the install screen. Sites that protect health information never run script blocks, and NurtureSite can remove your scripts from every site at once.

Automations

Every site has automations: flows the owner builds, such as "two hours after an appointment, send a thank-you email". With the automations:trigger permission your app can add to them in two ways:

  • Steps. A step of yours appears in the owner's automation builder as Run a step from an app. When an automation reaches it, we call your app.
  • Triggers. An event of yours ("Someone left a review") appears in the builder under An app reports something. When you report it for a CRM record, the automations the owner built on it start for that record.

Declare both on your app's page under Blocks, automation steps and screens, in the same JSON as your blocks:

{
  "automations": {
    "actions": [
      {
        "key": "send_review_request",
        "name": "Ask for a review",
        "description": "Sends this person a review request.",
        "url": "https://yourapp.example.com/actions/review-request",
        "fields": [
          {"key": "channel", "label": "Send by", "type": "select",
           "options": [{"value": "email", "label": "Email"}, {"value": "text", "label": "Text message"}],
           "default": "email"}
        ]
      }
    ],
    "triggers": [
      {"key": "review_left", "name": "Someone left a review", "description": "Starts when a new review comes in."}
    ]
  }
}

An app can declare up to 10 steps and 10 triggers. A key starts with a lowercase letter and uses lowercase letters, digits, - and _. name (up to 60 characters) and description (up to 200) are what the owner reads. Saving sends the change to every site your app is installed on.

Steps

fields are what the owner fills in when they add your step. They work exactly like block fields: text, textarea, url, select, toggle and number, up to 12 per step.

url is the https:// address we call when the step runs. It stays with NurtureSite and is never sent to the site.

When an automation reaches your step, we send:

POST https://yourapp.example.com/actions/review-request
X-NurtureSite-Topic: automation.action
X-NurtureSite-Delivery: 5f0c9b1e-2a3b-4c4d-9e5f-6a7b8c9d0e1f
X-NurtureSite-Timestamp: 1790000000
X-NurtureSite-Hmac-SHA256: …
Content-Type: application/json

{"id": "5f0c9b1e-2a3b-4c4d-9e5f-6a7b8c9d0e1f",
 "action": "send_review_request",
 "site_id": "…", "installation_id": "…",
 "occurred_at": "2026-11-14T16:20:00+00:00",
 "values": {"channel": "email"},
 "lead": {"id": 42, "status": "won", "source": "booking"}}

The request is signed like a webhook, with your signing secret. Check the signature the same way.

values holds the owner's answers to your fields, and only those: each one is cut to the field's length, and a select is always one of your options or empty.

lead is the CRM record the automation is running for. What it contains depends on your app's other permissions:

Your app also has lead contains
contacts:read The whole record, with the person's name, email, phone, message and address.
leads:read only The record without the person: status, source, score, dates.
Neither Just {"id": 42}.

Answer with any 2xx within 10 seconds. You can answer {"message": "Review request sent by email"}: that line is shown to the owner in the automation's history, next to your app's name.

If you answer 5xx or 429, or do not answer, the step is tried again after 1 minute and after 5 more. The id is the same on every try, so ignore one you already handled. A 4xx answer is not tried again. When a step gives up, it is marked failed in the automation's history, the owner is alerted, and the automation carries on with its next step. A step never waits for your app: the automation moves on as soon as the call is queued.

A site runs at most 120 of your steps a minute. When an owner tests an automation in the builder, your app is not called.

Triggers

Report an event for one CRM record:

POST /api/apps/v1/sites/{site_id}/automation-triggers/review_left/fire
Authorization: Bearer nsat_…
Idempotency-Key: review-8812
Content-Type: application/json

{"lead_id": 42}

The answer is {"data": {"trigger": "review_left", "lead_id": 42, "automations_started": 1}}.

automations_started can be 0, and that is not an error. An automation starts only when the owner built one on your trigger and turned it on, and the site's usual rules still apply: a person is not put in the same automation twice at once, and marketing automations only start for people who agreed to hear from the business.

You get 404 NOT_FOUND when the key is not one your app declares, or the record does not exist on that site. Like every POST, the call needs an Idempotency-Key, so sending the same report twice starts nothing twice.

If the owner uninstalls your app, your steps are skipped from then on and your triggers stop starting anything. The builder tells the owner which automations need changing.

Screens

Your app can show a page of its own in two places on a site:

  • In the site admin, for the business's staff. It appears under Apps in the admin menu. Needs admin:embed.
  • In the customer portal, for a customer who is signed in. It appears as a link in the portal's menu, with your name for it, and is labelled "Provided by" your app. Needs portal:embed.

Declare them in the same JSON as your blocks:

{
  "screens": {
    "admin": {"url": "https://yourapp.example.com/embed/admin", "height": 600},
    "portal": {"name": "Your rewards", "url": "https://yourapp.example.com/embed/portal", "height": 480}
  }
}

url is an https:// page you host. height is the starting height in pixels (200 to 2000, 600 if you leave it out). name is required for the portal, because it is the link customers see; in the admin it defaults to your app's name.

How a screen is shown

Your page is shown in a frame that is sealed off from the site, exactly like a frame block: it cannot read the admin or the portal around it, and it has no cookies or storage it can rely on. We add ?installation_id=…&surface=admin (or surface=portal) to your address so your server knows which site is asking. Those two values are not proof of anything: anyone can type them.

Load the bridge script in your page. It reports your page's height, so the frame grows with your content:

<script src="https://nurturesite.com/sdk/app-bridge.v1.js"></script>

Who is looking

Your page cannot see who is signed in, so it asks. NurtureSiteApp.sessionToken() gives you a short signed token to send to your own server:

NurtureSiteApp.ready(async function (context) {
  // context.surface is "admin" or "portal"
  const token = await NurtureSiteApp.sessionToken();
  const response = await fetch('https://yourapp.example.com/api/me', {
    headers: { Authorization: 'Bearer ' + token },
  });
});

The token is a JWT signed with your signing secret (HS256). It lives for one minute, so ask for a new one before each call to your server rather than keeping it.

Claim What it holds
iss https://nurturesite.com
aud Your app's client id. Refuse a token made for another app.
dest The site's id, the same site_id you use in the API.
installation_id The install.
surface admin or portal.
sub user:{id} for a staff member of the site, or customer:{id} for a customer's portal login.
role Admin screen only: the staff member's role on the site, such as admin or editor.
lead_ids Portal only: the ids of the CRM records that customer belongs to.
iat, nbf, exp Issued, valid from, expires.
jti Unique to this token.

On your server, check the signature, aud and exp before you trust anything in it:

import { createHmac, timingSafeEqual } from 'node:crypto';

function readSessionToken(token) {
  const [header, payload, signature] = token.split('.');
  const expected = createHmac('sha256', SIGNING_SECRET).update(`${header}.${payload}`).digest('base64url');
  if (expected.length !== signature.length || !timingSafeEqual(Buffer.from(expected), Buffer.from(signature))) {
    throw new Error('bad signature');
  }
  const claims = JSON.parse(Buffer.from(payload, 'base64url').toString('utf8'));
  if (claims.aud !== CLIENT_ID || Date.now() / 1000 >= claims.exp) {
    throw new Error('not for this app, or expired');
  }
  return claims;
}

Because the frame is sealed, the browser sends your page's requests without an origin. Your server must allow that for the address your page calls (Access-Control-Allow-Origin: * and the Authorization header), and must rely on the token, not on cookies.

The token names a person by id only. What your app may look up about them is decided by its other permissions: with contacts:read you can read the customer's records in lead_ids through the API; without it you know only that the same customer came back.

Keep your frame on pages you control. Whatever page is in the frame can ask for a token.

NurtureSiteApp.sessionToken() is refused inside a block on a public page: nobody is signed in there.

Pricing and payouts

An app is free unless you give it a price. Set one on your app's page, under Pricing.

What a site pays

  • You set a monthly price in US dollars, and a yearly price if you want one. A site that is billed yearly pays the yearly price, or twelve times the monthly price when you set none.
  • The charge is one more line on the site's own NurtureSite bill, in the site's own billing period. The owner sees the price on the install screen and approves it there. They never enter a card for you, and you never see their payment details.
  • A site that installs part-way through a billing period pays for the rest of that period, then the full price each period. A site billed monthly pays that first part on its next invoice. A site billed yearly is charged for it on the day it installs, so you are not left waiting for its renewal; if its card is refused, the app is not installed.
  • When an owner uninstalls, the charge stops. The period they already paid for is not refunded.

A paid app can only be installed on a site that is live and paying its NurtureSite bill. A site still in its free preview can install free apps; the owner is told to take the site live first for a paid one.

What you receive

You receive 85% of every payment for your app, before tax. NurtureSite keeps 15%. Your share is sent to your Stripe account, the same one that receives partner commission, when the site's invoice is paid. Your app's page shows the number of paying sites, what you have earned and what has not been paid out yet.

To set a price you must first connect a payout account in the partner portal. If your payout account stops being able to receive money, sales still count: what you are owed is kept and paid out once the account works again.

If a site's payment is refunded or a dispute is lost, your share of that payment is taken back.

Changing the price

A new price applies to sites that install from then on. Sites that already pay keep the price they approved, for as long as the app stays installed. Sites that installed while the app was free stay free; they start paying only if their owner approves your install link again, where they see the price.

When a site stops paying

If a site's NurtureSite bill goes unpaid past a short grace period, your app is paused on that site: API calls answer 403 and no webhooks are sent, exactly as for any paused install. It comes back within the hour once the bill is paid. If the site's subscription ends, the app's subscription ends with it and the owner approves the install again to resume.

Your own test installs are free: installing your app on one of your own client sites never adds a charge.

Sites managed by an agency

On a site that an agency manages, the agency looks after the bill. Only the agency can add a paid app there, and the client is emailed the price when it does. The client can still install free apps and can remove any app.

The app directory

Your app works from its install link without anything more. To also appear in NurtureSite's public directory of apps, write a listing on your app's page, under Directory listing, and submit it.

A listing has one line about the app, a description of what it does for a business, a category, an email address for help, the address of your privacy policy and, if you have them, your help pages. The directory adds your app's name, your price and the permissions it asks for, in the same words as the install screen.

NurtureSite reviews every listing before it is shown. The review is of the listing: that it says plainly what the app does, that the help address and privacy policy work, and that the permissions fit what the app claims to do. NurtureSite does not run or check your app's code, and the directory says so on your app's page.

  • If the listing is sent back, your app's page shows a note saying what to change. Change it and submit again.
  • Once it is approved, your app has a page in the directory with an Install on your site button that leads to your install screen.
  • When you change a listing that is already live, the directory keeps showing the approved one until the new one is approved.
  • You can take your app out of the directory at any time. Your install link keeps working, and sites that installed the app are not affected.
  • NurtureSite can take a listing down, for example if the help address stops working. A suspended app, or an app whose partner account is not active, is never shown.

Approved apps appear once the directory is open to the public. Your app's page tells you whether it is.

Webhooks

A webhook tells your app that something happened, so you do not have to keep asking. On your app's page, under Settings, enter a Webhook address (https://) and tick the Events to send. Only events your app's permissions cover are offered.

Event Sent when Permission
lead.created A CRM record is created. leads:read
lead.updated A CRM record changes. leads:read
lead.deleted A CRM record is deleted. data is just its id. leads:read
contact.created A person is added to a record. contacts:read
contact.updated A person's details or consent change. contacts:read
form.submitted A form on the site is sent in, whether or not it made a new record. leads:read
appointment.booked A booking is confirmed. appointments:read
appointment.rescheduled A booking moves to another time. appointments:read
appointment.cancelled A booking is cancelled. appointments:read
app.uninstalled The owner uninstalled your app. Always sent. none
site.redact 48 hours after an uninstall: delete what you stored for that site. Always sent. none

A site records an event only when an installed app asked for it and the install holds the permission.

What you receive

POST https://yourapp.example.com/webhooks/nurturesite
Content-Type: application/json
X-NurtureSite-Topic: lead.created
X-NurtureSite-Delivery: 5b0c6d2e-…        (the same on every retry of this delivery)
X-NurtureSite-Timestamp: 1794623090
X-NurtureSite-Hmac-SHA256: 3q2+7w==…

{
  "id": "0d9c4f3a-…",
  "topic": "lead.created",
  "site_id": "b4562bb0-4517-41e4-a044-5bf07f0aacba",
  "installation_id": "1f1a93bd-a945-4f80-b04d-47df26ac3a6d",
  "occurred_at": "2026-11-14T10:00:00+00:00",
  "data": { "id": 12, "status": "new", "source": "contact_form" }
}

data is the same shape the API returns for that record, and follows the same rule: the person's details are included only when the install holds contacts:read. For form.submitted, data is {"form_type": "…", "new_record": true, "lead": {…}}.

Check the signature

Always check that a webhook came from NurtureSite before you act on it. The signature is the base64 of an HMAC-SHA256 of {timestamp}.{raw body}, keyed with your signing secret. Use the raw body exactly as received, and refuse a timestamp that is more than five minutes old.

import { createHmac, timingSafeEqual } from 'node:crypto';

function isFromNurtureSite(rawBody, headers, signingSecret) {
  const timestamp = headers['x-nurturesite-timestamp'];
  if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;

  const expected = createHmac('sha256', signingSecret).update(`${timestamp}.${rawBody}`).digest('base64');
  const given = headers['x-nurturesite-hmac-sha256'] ?? '';

  return expected.length === given.length && timingSafeEqual(Buffer.from(expected), Buffer.from(given));
}

After you create a new signing secret, accept the old one too until your app is updated.

Answering, retries and repeats

  • Answer with any 2xx status within 10 seconds. Do slow work after you answer.
  • Anything else is tried again after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours and 24 hours, then given up on.
  • A delivery can arrive more than once. Use the event id to ignore one you have already handled.
  • Events can arrive out of order. Use occurred_at, or fetch the record, when order matters.
  • Redirects are not followed, and the address must be on the public internet.

Your app's page lists the last deliveries with how each went, and Send again resends one. Deliveries are kept for 7 days.

If your address only fails for two days, webhooks are paused and sites stop recording events for your app. Fix the address, then choose Turn webhooks back on. Events from the paused period are not sent; use updated_since on the API to catch up.

Errors

Errors are JSON with a matching HTTP status:

{"error": {"code": "INSUFFICIENT_SCOPE", "message": "This install was not granted contacts:read."}}
Status Code What to do
401 UNAUTHORIZED The token is missing, wrong or expired. Get a new one.
403 INSUFFICIENT_SCOPE The install does not have that permission. Ask the owner to approve it from your install link.
403 HIPAA_RESTRICTED The site protects health information and cannot share people or bookings. See below.
403 APP_SUSPENDED NurtureSite has paused your app, or your partner account is not active.
404 SITE_NOT_FOUND The token does not cover that site.
404 NOT_FOUND No record with that id.
404 CRM_DISABLED The site has its CRM turned off.
404 BLOCK_NOT_FOUND Your app has no native block with that key.
400 IDEMPOTENCY_KEY_REQUIRED Send an Idempotency-Key header on every POST.
409 CANNOT_CANCEL The business's rules do not allow cancelling that booking now.
409 IDEMPOTENCY_IN_PROGRESS The first call with this key is still running. Retry shortly.
422 INVALID_PARAMETER A filter, date or cursor is not valid. The message says which.
422 CONTENT_TOO_LARGE Block content is limited to 64 KB.
429 RATE_LIMITED Wait the number of seconds in Retry-After, then retry.
429 IMPORT_LIMIT_REACHED The install has imported its 50,000 rows for today. Continue tomorrow (UTC).
503 SITE_ASLEEP The site is switched off to save resources. An app cannot wake it. Retry later.
503 SITE_UNAVAILABLE, SITE_OUT_OF_SYNC The site did not answer. Retry after Retry-After.
503 SITE_UPGRADE_REQUIRED The site has not been updated to support apps yet.
502 SITE_ERROR The site failed to complete the request. Retry; if it keeps happening, contact support.

The token address uses the standard OAuth shape instead: {"error": "invalid_grant", "error_description": "…"}. invalid_client means the client id or secret is wrong, or the app is suspended. invalid_grant means the code is used up or expired, or the app is not installed on that site.

Rate limits

  • 120 calls a minute per install (one app on one site).
  • 1,200 calls a minute per app across all of its installs.
  • 60 token requests a minute per app.

Going over answers 429 with a Retry-After header. Use updated_since and reuse tokens to stay well under.

When an owner uninstalls

The owner can remove your app at any time from their site's page. From that moment:

  • Every token for that install stops working (401 UNAUTHORIZED).
  • A token request for it answers invalid_grant. Treat that as "uninstalled": stop calling.
  • If you have a webhook address, you get app.uninstalled straight away, and site.redact 48 hours later. On site.redact, delete the data you stored for that site. The wait is there in case the owner installs again.

If the owner installs again later, the installation_id is the same.

Sites that protect health information

Medical and dental sites can turn on HIPAA mode. On such a site:

  • An app that asks for people, bookings or any write permission (contacts:*, appointments:*, leads:write) cannot be installed.

  • If HIPAA mode is turned on after your app was installed, those calls answer 403 HIPAA_RESTRICTED, new tokens leave those permissions out, and CRM records come back without the person's details.

  • Script blocks are never shown, and an app that asks for storefront:script cannot be installed. Native and frame blocks still work.

  • An app that asks for portal:embed cannot be installed, and no app section is shown to customers. Your admin screen still works.

  • An app that asks for automations:trigger cannot be installed. If HIPAA mode is turned on later, your steps are skipped and your triggers are refused: a step would send a patient's record to your app.

  • No events are sent from that site.

There is nothing for your app to do except handle the error.

Your responsibilities

When an owner grants your app personal data, you are responsible for how the app uses it. Use it only for what the app does for that business, keep it secure, honor each person's consent, and delete it when the app is uninstalled or the owner asks.

NurtureSite can suspend an app that misuses data or harms sites. A suspended app stops working on every site until the suspension is lifted.

Sites are not charged for an app while it is suspended, so you earn nothing on it for that time. When the suspension is lifted, each site's charge starts again from its next bill; nothing is charged for the rest of its current period. The same applies while your partner account is not active.

A minimal example

// After the owner approves, on your callback route (Node 18+):
const tokens = await fetch('https://nurturesite.com/api/apps/oauth/token', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'Basic ' + Buffer.from(`${CLIENT_ID}:${CLIENT_SECRET}`).toString('base64'),
  },
  body: JSON.stringify({ grant_type: 'authorization_code', code }),
}).then((response) => response.json());

const leads = await fetch(`https://nurturesite.com/api/apps/v1/sites/${tokens.site_id}/leads?limit=5`, {
  headers: { Authorization: `Bearer ${tokens.access_token}` },
}).then((response) => response.json());