Skip to main content

Create the factory

const fc = Filecheck('pk_live_…', {
  agentId: 'agt_…',   // optional sub-tenant scope
  // iframeSrc: '…',  // staging/dev override only
});

Create an intake element

const intake = fc.elements.create('intake', {
  workflowId: 'wf_…',       // required unless resuming with jobId
  presentation: 'inline',   // 'inline' (default) | 'dialog'
});

Create options

workflowId
string
The Workflow to run. Required unless jobId is provided.
jobId
string
Resume an existing job. When set, workflowId is ignored.
presentation
'inline' | 'dialog'
default:"inline"
Render inline in the page flow, or behind a trigger button as a dialog.
locale
string
Locale for the widget UI, for example en-US.
connector
object
Map file facts onto your product-page controls. See Connectors.
connectorId
string
Resolve a connector server-side by id (cntr_…).
ui
object
UI overrides: title, subtitle, theme, accent, layout, showHeader, submitLabel, autoSubmit, and more.

Methods

intake.mount('#fc-slot');        // or .mount(htmlElement)

intake.update({ workflowId: 'wf_…', ui: { theme: 'dark' } });

intake.focus();                  // open a dialog/drawer layout programmatically
intake.blur();

intake.respondToProof(true);     // approve a soft-proof gate
intake.setConnector({ /* … */ }); // replace the active connector
intake.applyNow();               // re-run the connector against the last facts

intake.unmount();
intake.on(...) returns an unsubscribe function. See Events.