Trax Platform APIv1

Organization site

The organization site is the separate app organization staff use to run their website (it was called Site Manager). These are its endpoints, under /v1/manage. Every call needs a staff access token from Trax Keycloak (see Authentication and keys).

The signed-in staff user and their sites

GET https://api.nfocus.solutions/v1/manage/me → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/manage/me' \
  -H 'Authorization: Bearer your_keycloak_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/me', {
  headers: {
    'Authorization': 'Bearer your_keycloak_access_token',
  },
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/manage/me");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Each site has a provider: duda (a Duda website) or nfocus (an nFocus site, served by the public registration portal). GET /v1/manage/me and GET /v1/manage/sites/{siteId} show it. Profile, locations, staff, posts, announcements, alerts and images work the same for both, and stay when nFocus switches a site's provider.

GET /v1/manage/me is the site switcher. For each site it gives:

organizations lists your organization roles: the client, the organization's id and name, and the role.

Roles

Each person has a role on each site. A role on one site gives nothing on another site: calls about a site where you have no role answer 404 site-not-found.

Role Can
Author Write and edit drafts: posts, an nFocus site's website, services, schedules and organization content; upload images, preview
Editor Everything an Author can, plus publish, schedule, unpublish and archive posts; publish an nFocus site's website, services, schedules and organization content; edit the profile, locations, staff, announcements and alerts; push the profile to Duda
Author on sites that allow it Also create, change, publish and delete announcements and alerts (see Settings)
Site Admin Everything, plus people and roles, the template (and publishing a change of template), the domains and the audit trail

nFocus support staff act as Site Admin on every site. Only they can create a Duda website or lock its template, and only nFocus admins (see nFocus admin) switch a site's provider. nFocus support agents (trax-support-agent) open every site and change nothing: any change answers 403 support-read-only, and GET /v1/manage/me says supportAccess: "read" ("full" for full support). The site's audit trail records each support person's first visit of the day.

Organization roles

A role can also cover a Trax organization: every site at or below it in the organization's hierarchy, including sites added later. A regional or territory admin is a typical case. nFocus admins grant them (see nFocus admin), and so do Organization Admins in their own subtree.

A call that needs a higher role answers 403 site-role-required, and requiredRole names the role needed. Each operation in the API reference names its minimum role.

Organization Admins

An organization role of siteAdmin makes someone an Organization Admin: Site Admin on every site at or below the organization, and the organization's own pages under /v1/manage/organizations/{clientToken}/{organizationId}. They need an organization role on that organization or one above it; elsewhere they answer 404 organization-not-found. Any organization role reads the organization (GET); the rest needs Organization Admin (403 organization-role-required).

An organization, your role on it, and every organization below it with its portal and website

GET https://api.nfocus.solutions/v1/manage/organizations/riverbend/1 → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/manage/organizations/riverbend/1' \
  -H 'Authorization: Bearer your_keycloak_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/organizations/riverbend/1', {
  headers: {
    'Authorization': 'Bearer your_keycloak_access_token',
  },
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/manage/organizations/riverbend/1");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Granting a role on an organization outside your subtree

POST https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/roles → 400, problem details

curl
curl -s -X POST 'https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/roles' \
  -H 'Authorization: Bearer your_keycloak_access_token' \
  -H 'Content-Type: application/json' \
  -d '{"organizationId": 999999, "email": "new.editor@example.test", "role": "editor"}'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/roles', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer your_keycloak_access_token',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"organizationId": 999999, "email": "new.editor@example.test", "role": "editor"}),
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/roles");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
request.Content = new StringContent("""
    {"organizationId": 999999, "email": "new.editor@example.test", "role": "editor"}
    """, System.Text.Encoding.UTF8, "application/json");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

What new sites below an organization start from, and the locks

GET https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/defaults → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/defaults' \
  -H 'Authorization: Bearer your_keycloak_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/defaults', {
  headers: {
    'Authorization': 'Bearer your_keycloak_access_token',
  },
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/defaults");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

What onboarding a portal below would do (a dry run writes nothing)

POST https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/sites?dryRun=true → 200 OK, JSON

curl
curl -s -X POST 'https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/sites?dryRun=true' \
  -H 'Authorization: Bearer your_keycloak_access_token' \
  -H 'Content-Type: application/json' \
  -d '{"orgToken": "north"}'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/sites?dryRun=true', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer your_keycloak_access_token',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"orgToken": "north"}),
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/sites?dryRun=true");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
request.Content = new StringContent("""
    {"orgToken": "north"}
    """, System.Text.Encoding.UTF8, "application/json");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Changes in an organization's subtree, newest first

GET https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/audit?pageSize=5 → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/audit?pageSize=5' \
  -H 'Authorization: Bearer your_keycloak_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/audit?pageSize=5', {
  headers: {
    'Authorization': 'Bearer your_keycloak_access_token',
  },
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/audit?pageSize=5");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Report access

Site Admins run their site's reports, and Organization Admins their subtree's. Anyone else needs a report grant, which gives reports and nothing else, on one site or an organization: a Report Viewer has no website role, and an Editor runs no reports without one. GET /v1/manage/me lists where you may run reports (reports: scope site or organization, via role or grant). The reports are below.

A second grant for the same email and scope answers 409 report-grant-exists. Grants link to the person at their first sign-in, as invitations do.

People who may run a site's reports without a website role

GET https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/report-grants → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/report-grants' \
  -H 'Authorization: Bearer your_keycloak_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/report-grants', {
  headers: {
    'Authorization': 'Bearer your_keycloak_access_token',
  },
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/report-grants");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Report grants on an organization, the organizations below it and their sites

GET https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/report-grants → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/report-grants' \
  -H 'Authorization: Bearer your_keycloak_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/report-grants', {
  headers: {
    'Authorization': 'Bearer your_keycloak_access_token',
  },
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/report-grants");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Settings

Each organization decides whether announcements and alerts need an Editor. PUT …/settings with { "authorsPublishNotices": true } lets Authors publish them too. It is off by default, and only a Site Admin can change it. Posts, the profile, locations and staff still need an Editor.

Registration settings

A Site Admin sees and changes the portal's registration settings at …/registration-settings: guest carts, seat holds and cart reminder emails.

The portal's registration settings

GET https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/registration-settings → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/registration-settings' \
  -H 'Authorization: Bearer your_keycloak_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/registration-settings', {
  headers: {
    'Authorization': 'Bearer your_keycloak_access_token',
  },
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/registration-settings");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Each setting shows:

Key What it is Range
GuestCartDays Days a guest cart lives after its last change 1–365 days
CartHoldMinutes How long a cart holds a seat; 0 turns holds off 0–240 minutes
CartHoldMaxExtensions Extensions allowed per hold 0–10
CartHoldExtensionMinutes What one extension adds 1–120 minutes
CartReminderEnabled Send abandoned-cart reminder emails true or false
CartReminderAfterHours Hours without a change before a reminder 1–720 hours
CartReminderMax Reminders per filled cart 0–10
CartReturnUrl The "Return to my cart" link in reminders an https address of this site

PUT …/registration-settings takes values, by key. A value is written for this portal only, never for the whole client. null removes the portal's own value, so the client's value or the default applies again.

A setting outside its range

PUT https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/registration-settings → 400, problem details

curl
curl -s -X PUT 'https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/registration-settings' \
  -H 'Authorization: Bearer your_keycloak_access_token' \
  -H 'Content-Type: application/json' \
  -d '{"values": {"CartHoldMinutes": 999}}'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/registration-settings', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer your_keycloak_access_token',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"values": {"CartHoldMinutes": 999}}),
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Put, "https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/registration-settings");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
request.Content = new StringContent("""
    {"values": {"CartHoldMinutes": 999}}
    """, System.Text.Encoding.UTF8, "application/json");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Seat holds and reminders follow nFocus too. Where nFocus turned the capability cart.seatHolds or cart.reminders off for the portal, CartHoldMinutes or CartReminderEnabled shows locked (its value is ignored) and a change answers 403 setting-locked. Where nFocus keeps one on (onLocked), it can't be set to off (400: holds need at least 1 minute).

Capabilities

Each website and registration feature is a capability you can turn off for a site, or for every site at and below an organization. nFocus decides first, for the client or the portal:

Every capability is on until someone turns it off, so nothing changes by itself.

Key What it switches
website.blog, website.news Posts of that kind
website.videos, website.contacts Videos and contacts (a later gate)
website.announcements, website.alerts Announcements, alerts
website.staffDirectory The staff directory
website.locations Locations and location pages
website.services Services and service categories
website.schedules Weekly schedules
website.impact Impact numbers, outcomes, quotes, values and pathways
giving.donations Donations (also legacy's NoDonation)
giving.designated Gifts designated to a location or sponsorship
giving.sponsorships Sponsorship options
registration.activities Activity registration (also legacy's HideActivities and ParentPortalOnly)
registration.memberships Memberships bought on their own (also legacy's HideMemberships and ParentPortalOnly)
registration.paymentPlans Payment plans (also legacy's PaymentPlanEnabled)
cart.guestCart Guest carts and their merge at sign-in
cart.seatHolds, cart.reminders Seat holds and cart reminders: switched by their registration settings
cart.saveForLater Saving cart lines for later
reports This site's reports
organization.childSites Organization Admins setting up sites below them: nFocus only

Legacy-owned capabilities (owner: legacy) can only be turned off here, never on: one is on where legacy configuration has it on and the switchboard does too. Legacy's own switches keep their meaning: features on GET P/config still shows legacy's values, and capabilities shows what is on, both together.

Reading and changing them

A site's capabilities: what nFocus decided, the choices here and above, and whether you can change each

GET https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/capabilities → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/capabilities' \
  -H 'Authorization: Bearer your_keycloak_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/capabilities', {
  headers: {
    'Authorization': 'Bearer your_keycloak_access_token',
  },
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/capabilities");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Each capability shows:

Which choice wins, for a site:

  1. a locked choice at the highest organization above it;
  2. the site's own choice;
  3. the nearest organization's choice above it;
  4. on.

PUT takes values by key (true, false, or null to remove the choice made here) and, at an organization only, locks by key. A lock binds every site and organization below to this organization's choice, so lock a capability only with a choice made here.

An organization's capabilities for every site at and below it

GET https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/capabilities → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/capabilities' \
  -H 'Authorization: Bearer your_keycloak_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/capabilities', {
  headers: {
    'Authorization': 'Bearer your_keycloak_access_token',
  },
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/manage/organizations/riverbend/1/capabilities");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

What "off" does

Editing safely

Items you can edit return an ETag header, and the same value as version in the body. Send it back in If-Match when you change or delete the item:

A site's posts in Site Manager

GET https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/posts?pageSize=5 → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/posts?pageSize=5' \
  -H 'Authorization: Bearer your_keycloak_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/posts?pageSize=5', {
  headers: {
    'Authorization': 'Bearer your_keycloak_access_token',
  },
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/manage/sites/7d3c2a10-5b4e-4f6a-9c1d-2e8f0a6b4c21/posts?pageSize=5");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Posts

Images

Upload with multipart/form-data: a file field (JPEG, PNG or WebP, up to 5 MB) and an altText field (a request over 6 MB is refused with 413 request-too-large before it is read). The API reads the image's real format from its contents, then saves a fresh copy without camera or location data, scaled to at most 2400 px. While the profile, a staff photo or a post uses an image, deleting it answers 409 media-in-use.

Locations

Locations go live when an Editor saves them, as before. POST and PUT …/locations/{id} take an optional details object for the website's location pages:

Left out, details is kept as it is, so an app written before these fields can't wipe them. Sent, it is replaced whole, except a null slug, which keeps the current one.

Services, schedules and organization content

Each of these has a list, GET …/{id} with its ETag, create, change, delete, …/publish, …/unpublish and PUT …/order:

Path What
service-categories A category: name, slug, icon
services A service: category, name, slug, a short line, icon, link (catalog activities, a program or a url) and the locationIds offering it
schedules A weekly entry: title, day, startTime, endTime, notes, and optional locationId, serviceId and outcomeId
content/impact-numbers value ("500+"), label, sourceTitle, sourceNote
content/outcomes title, text, measures and programs (up to six lines each), accent
content/quotes text, attribution, role, photoMediaId
content/values name, text, icon
content/pathways name, minAge, maxAge, text
sponsorships name, text, and amountCents or minimumCents with maximumCents ($1 to $100,000)
videos A YouTube or Vimeo video: url, title, description, thumbnailMediaId, captions, audioDescription, transcript (see "Videos")
contacts Who to contact: name, role, phone, email, and public (false keeps it for your own reference)

A site's services, drafts included

GET https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/services → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/services' \
  -H 'Authorization: Bearer your_keycloak_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/services', {
  headers: {
    'Authorization': 'Bearer your_keycloak_access_token',
  },
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/services");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

An outcome with an unknown colour

POST https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/content/outcomes → 400, problem details

curl
curl -s -X POST 'https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/content/outcomes' \
  -H 'Authorization: Bearer your_keycloak_access_token' \
  -H 'Content-Type: application/json' \
  -d '{"title": "Safe and supported", "accent": "magenta"}'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/content/outcomes', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer your_keycloak_access_token',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"title": "Safe and supported", "accent": "magenta"}),
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/content/outcomes");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
request.Content = new StringContent("""
    {"title": "Safe and supported", "accent": "magenta"}
    """, System.Text.Encoding.UTF8, "application/json");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Videos

Add a video by its YouTube or Vimeo address: https://www.youtube.com/watch?v=…, https://youtu.be/…, a YouTube embed or shorts address, https://vimeo.com/{id} (with its /{hash} for an unlisted video) or https://player.vimeo.com/video/{id}. Only these addresses, over https, are accepted (400, errors.url); embed code isn't. The answer gives the provider, videoId, the player's embedUrl (YouTube's privacy-enhanced domain, or Vimeo's player without tracking) and the watchUrl.

A video can be a draft without the rest, but publishing needs, for WCAG 2.2 AA:

A transcript never replaces captions. Publishing without them answers 422 video-not-accessible with missing; each video also lists what it still needs (missing). A published video must keep them, and its thumbnail can't be deleted from the media library (409 media-in-use).

A site's videos, drafts included, with what publishing still needs

GET https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/videos → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/videos' \
  -H 'Authorization: Bearer your_keycloak_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/videos', {
  headers: {
    'Authorization': 'Bearer your_keycloak_access_token',
  },
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/videos");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

In a post, place a video by reference: <figure data-trax-video="{videoId}"></figure>. The post keeps only this site's videos, and never an iframe. Publishing a post whose videos aren't published answers 409 reference-not-published with videoIds, and so does a change to a published post that places one.

Contacts

A short "who to call" list for the website, the site's own or a location's. Each contact needs a phone, an email or both. Only published contacts marked public reach the website; set public: false for one you keep for your own reference. A new contact is public unless you say otherwise; a change that leaves public out keeps what it was.

Icons: accessible, arts, calendar, career, childcare, clothing, community, counseling, donate, education, emergency, faith, family, food, gift, handshake, health, heart, home, leadership, mentoring, money, parking, recreation, safety, seasonal, seniors, shelter, sports, star, stem, transportation, utilities, volunteer, worship, youth. Accents (an outcome's colour): teal, amber, green, red, blue, purple, pink, slate.

An nFocus site's website

An nFocus site's pages come from a template (see Building an nFocus site from a template). GET …/website returns the draft with its template's schema, the published version, problems (what stops the draft being published now) and notShown (content the draft's template has no place for). A Duda site answers 409 site-not-nfocus.

Choosing a template that doesn't exist

PUT https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/website/draft/template → 400, problem details

curl
curl -s -X PUT 'https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/website/draft/template' \
  -H 'Authorization: Bearer your_keycloak_access_token' \
  -H 'Content-Type: application/json' \
  -d '{"templateKey": "no-such-template"}'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/website/draft/template', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer your_keycloak_access_token',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"templateKey": "no-such-template"}),
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Put, "https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/website/draft/template");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
request.Content = new StringContent("""
    {"templateKey": "no-such-template"}
    """, System.Text.Encoding.UTF8, "application/json");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

An nFocus site's domains

An nFocus site is always served at its portal path on the public portal, {portal}/{clientToken}/{orgToken}/ (portalUrl). It can also have:

The record value is the same for all of a site's domains, so it can be published before a domain is added; the domain is then active as soon as it is added. Keep the record: every check looks for it, the daily one too.

Only an active domain serves the site: it is allowed to call the API from a browser, and the site's own sign-in client (site-{clientToken}-{orgToken}) sends families back to it after sign-in. The API checks each active custom domain every day. After three failed checks in a row it becomes failed and stops serving until a check passes again.

Call Who What it does
GET …/domains Author The portal path, the site's ownershipRecordValue, and every domain with its state, its last check (ok, ownership-not-proved, taken, not-resolving, points-elsewhere, no-front-end-targets, platform), failed checks in a row, and for a custom domain its ownership record (provedUtc is when the last check found it)
POST …/domains Site Admin Adds { "host": "www.example.org" } and checks it at once. A host under the platform suffix is the platform address
POST …/domains/{id}/check Site Admin Checks a domain now, for example after publishing its TXT record or changing its DNS
PUT …/domains/{id}/primary Site Admin Makes an active domain the primary address; the front end redirects the others to it. The first active domain is primary until you choose
DELETE …/domains/{id} Site Admin Removes a domain. It stops serving at once

One website at a time serves a host. A platform address belongs to its site, and an active custom domain to its site; adding either elsewhere answers 409 domain-taken (as does adding a host the site already lists). A pending domain reserves nothing: another site can add the same host, and whichever site's record the domain's owner publishes gets it. The other site's check then answers taken, and it stays pending. When a domain changes hands, the new owner replaces the record; the old site's daily checks fail, and after the third the new owner's site can take it.

A site has at most one platform address (409 platform-domain-exists) and ten domains, and a custom domain has at most 240 characters (so its record name fits in DNS). These calls answer 409 site-not-nfocus for a Duda site, whose address is changed with PUT …/domain.

An nFocus site's addresses

GET https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/domains → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/domains' \
  -H 'Authorization: Bearer your_keycloak_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/domains', {
  headers: {
    'Authorization': 'Bearer your_keycloak_access_token',
  },
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/domains");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

The Duda website

These calls are for Duda websites only. For an nFocus site they answer 409 site-not-duda.

Call Who What it does
POST /v1/manage/sites nFocus support Creates the portal's website from a template, sets its domain and writes its Content Library. Returns the site's keys once. The admin app's POST /v1/admin/sites does the same with provider: "duda"
PUT …/template Site Admin Switches the template. Needs confirm: true, because edits made in the Duda editor can be lost. Refused while support has locked the template. Writes the widget settings again and reconnects the collections (see the Duda guide)
POST …/duda/collections Site Admin Reconnects the site's trax_* collections to its own feeds, for example after a designer adds one to the template
PUT …/domain Site Admin Changes the domain: trax ({prefix}.traxregistration.com), custom (the organization's domain) or duda (Duda's address only). Browser access and sign-in follow the new address
POST …/publish Editor Writes the profile to the Content Library now, and to the live site if it is published
GET …/duda Author Shows the template, domain, published state and pending updates

Profile changes reach the Content Library automatically within seconds. Post, staff and location changes refresh their Duda collections. An nFocus site gets none of these updates. PUT …/template-lock (support) works for both providers.

Reports

Site Admins and Organization Admins run their sites' and organizations' reports, and so does anyone with a report grant:

Each runs by day, week or month, by channel, or for an organization by child organization. GET /v1/manage/reports lists yours, with your scopes. Every run and export is in the audit trail. See Reports and the troubleshooting log.

The reports you may run, with your scopes

GET https://api.nfocus.solutions/v1/manage/reports → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/manage/reports' \
  -H 'Authorization: Bearer your_keycloak_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/reports', {
  headers: {
    'Authorization': 'Bearer your_keycloak_access_token',
  },
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/manage/reports");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Troubleshooting log

Site Admins read their site's log of what went wrong (GET …/logs), and Organization Admins the log of every portal and site at or below their organization (GET /v1/manage/organizations/{clientToken}/{organizationId}/logs): errors, refused payments, failed sign-ins and lockouts (never who), failed emails (never the address), Duda jobs, checkout recovery and domain checks, for 90 days. includeChanges=true lists the audit trail's changes beside them. Every search is recorded in the audit trail. See Reports and the troubleshooting log.

A site's troubleshooting log, with its audit trail's changes

GET https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/logs?includeChanges=true&pageSize=5 → 200 OK, JSON

curl
curl -s 'https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/logs?includeChanges=true&pageSize=5' \
  -H 'Authorization: Bearer your_keycloak_access_token'
JavaScript
const response = await fetch('https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/logs?includeChanges=true&pageSize=5', {
  headers: {
    'Authorization': 'Bearer your_keycloak_access_token',
  },
});
const data = await response.json();
C#
using var http = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.nfocus.solutions/v1/manage/sites/3f6b1c2e-8a4d-4e7b-9f10-5c2d7e8a9b01/logs?includeChanges=true&pageSize=5");
request.Headers.Authorization = new("Bearer", "your_keycloak_access_token");
using var response = await http.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();

Audit trail

Every change is recorded with who made it and when. Site Admins can read the trail (…/audit).