Skip to main content

Actions & Bindings

Typed retrieval makes your site queryable. Actions make it actionable: the forms your pages already offer — request a quote, book a table, register for an event — become executable by AI agents, with you in control of where each submission lands.

An agent discovers an action on one of your entities (its potentialAction), collects the inputs the action declares, and executes it with the nxis_action tool on your site's MCP server. NxisAI validates the arguments, looks up the binding you configured, and routes the typed payload — to your webhook, into a Zapier action you've enabled, or back to the browser.

No anonymous writes

nxis_action always requires an authenticated agent (API key or OAuth), even when Public Access is on. Public agents can discover your actions; only authenticated ones can execute them, and executions are rate-limited separately from reads.

How an agent executes an action​

  1. Discover — nxis_query/nxis_get returns an entity whose potentialAction describes the action: its @id, its input fields (names, types, which are required), and its type (QuoteAction, ReserveAction, …).
  2. Collect — the agent gathers the declared inputs from the user.
  3. Execute — the agent calls:
{
"name": "nxis_action",
"arguments": {
"id": "https://your-site.com/reserve#action",
"arguments": {
"party_size": 4,
"reservation_date": "2026-07-10",
"reservation_time": "19:00",
"name": "Jane Doe",
"phone": "+1-313-555-0142"
}
}
}

NxisAI validates the arguments against the action's declared inputs (required fields, types, ranges) before anything is sent. The real destination never appears in your public data — agents only ever see an opaque handle.

Bindings — where the payload goes​

You choose the routing per site (a Default Route) with optional per-action-type overrides — e.g. quotes to your CRM webhook, reservations through Zapier. Configure it all in Site Settings → MCP → Action Binding.

BindingPayload lands atBest for
Browser (Self-Page)Your page's own form, filled and submitted in the user's browserForms with no backend endpoint; zero configuration
WebhookA URL you expose — your CRM intake, booking system, or backendYou already have an endpoint
Gateway (Zapier)A tool in your connected Zapier account — Gmail, HubSpot, Sheets, 8,000+ appsNo endpoint — reuse the apps you already run on
Protocol (UCP)Your commerce checkout, via the commerce protocol — payment happens at conversion with the user's held credentials (OAuth/wallet)E-commerce checkout (BuyAction/OrderAction); NxisAI never holds payment credentials

How actions resolve at read time​

Extraction emits write actions as binding-pending — discoverable, but not yet executable. The moment you configure a binding, your MCP server resolves each action as it's read: it stamps the routing kind (nxis:targetKind), replaces the target with an opaque proxy URL (submit.nxis.ai/a/<hash> — your real endpoint never enters the published data), and assigns a deterministic nxis:toolName matching the generated tool in tools/list. Agents see that the action exists and what it takes; where it routes stays tenant configuration they can never read.

The webhook contract​

With a Webhook binding, NxisAI POSTs the validated, typed payload (JSON) to your Target URL. Three things to build against:

1 · Verify the signature​

Every request is signed with a shared secret so you can verify it genuinely came from NxisAI and wasn't tampered with. The secret is generated when you save the binding — copy it from the Action Binding table (each webhook has its own, and you can rotate it anytime).

X-Nxis-Signature: t=<unix-timestamp>,v1=<hex>

The signature is HMAC-SHA256(secret, "<timestamp>.<raw-body>"). Recompute it over the exact raw bytes you received, compare in constant time, and reject stale timestamps (we recommend a 5-minute window):

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

function verifyNxisSignature(secret, header, rawBody) {
const parts = Object.fromEntries(header.split(",").map(p => p.split("=")));
if (Math.abs(Date.now() / 1000 - Number(parts.t)) > 300) return false;
const expected = createHmac("sha256", secret)
.update(`${parts.t}.`).update(rawBody).digest("hex");
return expected.length === parts.v1.length &&
timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1));
}

2 · Confirm bookings with an ID​

For booking-type actions (ReserveAction, ScheduleAction, RsvpAction) a bare 200 OK is not enough — a slot commit needs proof. Return the reference inline:

{ "status": "confirmed", "confirmationId": "RSV-18B83691" }

Lead-type actions (QuoteAction, AskAction) just need a 2xx with an identifier (any id/reference field works).

3 · Answer conflicts usefully​

If the requested slot is taken, don't just fail — return 409 with alternatives, and the agent will offer them to the user instead of retrying blindly:

{ "status": "conflict", "alternatives": [ { "date": "2026-07-10", "time": "19:30" } ] }

Availability checks​

For bookings, agents can ask "is this slot free?" before committing — nxis_action with mode: "check". It's opt-in per binding:

  • Webhook — tick Supports availability checks in the binding editor. A check is the same signed POST, marked with an X-Nxis-Mode: check header and an "nxis:mode": "check" field in the body. Answer without booking anything:

    { "available": true }
    { "available": false, "alternatives": [ { "date": "2026-07-10", "time": "20:00" } ] }

    Optionally set a separate Availability URL if your booking system has a dedicated availability route (same signing secret).

  • Gateway (Zapier) — pick an Availability check action (a Zapier read action, e.g. a calendar lookup) in the binding editor; checks run that action instead of committing.

Checks are advisory — they never hold a slot, and the commit remains authoritative (a race between check and commit still resolves through the 409 conflict response). If a binding doesn't opt in, agents skip straight to the commit and rely on the conflict contract.

Action types & safeguards​

The safeguards an agent must apply are derived from the action's type — you never configure them:

PolicyAction typesAgent behavior
Lead generationQuoteAction, AskAction, free RegisterActionMay submit after user consent
BookingReserveAction, ScheduleAction, RsvpActionCheck-then-commit; confirmation required; conflicts re-confirmed with the user
TransactionBuyAction, OrderAction, ApplyActionFull payload review with the user; never auto-submitted
What stays private

Your webhook URL, signing secret, Zapier server URL, and tokens live only in your account settings. They are never published to your pages, your structured data, or any agent-visible surface — agents see that an action is executable (and whether it supports checks), never where it routes.