x-api-key header. The API is in beta, and the key stops working as soon as it is removed there.
Things to know before you send:
- Adding a page writes to your account.
monitoring.addPageadds a URL to monitoring and returns thesiteId,sessionIdandpageId. PasssiteIdandsessionIdtogether to add the page to an existing site. When you do, Fluxguard rejectssiteNicknameand every category option with 400 (“Site settings (categories, nickname) cannot be specified as the site already exists”), so the plugin refuses that combination before sending. Omit both to create a new site, optionally withsiteNicknameand a category. - Crawls run in the background and spend credits.
monitoring.startCrawlanswers 204 as soon as the crawl is queued. Read the capture withmonitoring.getPage; the trigger response repeats the ids it accepted. - Deletes cannot be undone.
monitoring.deletePagedrops the page and every version captured for it, andmonitoring.deleteSitedrops the site with all of its sessions, pages and versions. Both answer 204. A deleted page still answersmonitoring.getPage, withstatus: 'ignore', so the id keeps resolving. - Webhooks fire on every change.
webhooks.createtakes a URL and returns anid; from then on every detected change is POSTed there, which is a lot of data on an active account. Onlyurlis honoured:siteCategoriesandcategoriesare accepted and silently ignored, so assign categories in the console.webhooks.deletetakes theidin the request body, andwebhooks.samplereturns an array of example changes from your own account. categories.createmakes site categories only. Site and page categories are stored separately and each row carries aforfield saying which.categories.listrestores the id Fluxguard keeps only as the map key. Pages report their categories as arrays of names, not ids.- Rate limits and errors. Fluxguard does not document a limit or a
Retry-Afterheader, and fifteen parallel requests all answered 200, so no limit was observed. The plugin retries a 429 up to three times with backoff if one appears, and never retries a 403: that status covers a bad key (Forbidden) and a route that does not exist (Missing Authentication Token). Every error body is{ message }. - Inbound webhooks. Fluxguard signs each delivery with the webhook’s own secret key:
fluxguard-signature: t=<unix seconds>,v1=<hex HMAC-SHA256>over<t>.<raw body>. SetwebhookSecret, or store the key withkeys.set_webhook_signature. Verification needs the untouched request body, so mount the webhook route without a JSON parser. WithmultiTenancy, your own route chooses the tenant: register each tenant’s webhook URL with?tenantId=<id>and pass that toprocessWebhook, or the delivery is checked against thedefaulttenant. Corsair Hub looks the tenant up by the delivery’sorgIdinstead, and only after you store it withcorsair.withTenant(id).fluxguard.keys.set_tenant_external_id(orgId)(theidthataccount.getreturns).
- 12 typed API operations
- 1 incoming webhook event types
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
No setup required yet. A call with no saved key throws More: API Key
AuthMissingError; store the key (Account Settings, https://app.fluxguard.com/settings) with keys.set_api_key(key) or pass it as fluxguard({ key }).4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
Read a monitored pageWebhooks
React to a detected change the moment Fluxguard captures it.What’s next
API reference
Every
fluxguard.api.* operation with input and output types.Webhooks
Event paths, payloads, and
webhookHooks examples.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.