Official libraries

### JavaScript

The filecheck-js loader — typed, promise-based Element loading plus every shared TypeScript type.

filecheck-js

replaces the manual

&lt;script&gt;

tag and polling loop with one typed call. It injects the CDN script once (concurrent calls share a single tag), resolves when the Element is ready, and exports the full Element type surface so

elements.create('intake', …)

and every event payload are typed end to end.

npm

install

filecheck-js

### Navigate to header: Quickstart Quickstart

import

\{

loadFilecheck

\}

from

'filecheck-js'

;

const

fc

=

await

loadFilecheck

(

'pk\_…'

);

if

(

fc

) \{

const

intake

=

fc

.

elements

.

create

(

'intake'

, \{

workflowId:

'wf\_…'

\});

intake

.

on

(

'status'

, (\{

canProceed

,

jobId

\})

=&gt;

\{

submitButton

.

disabled

=

\!

canProceed

;

// authoritative — never re-derive

jobIdInput

.

value

=

jobId

??

''

;

// verify server-side before fulfilling

\});

intake

.

mount

(

'\#fc-slot'

);

\}

Gate your submit button on

canProceed

and send the

jobId

to your server with the form — then

verify it server-side

before fulfilling.

### Navigate to header: loadFilecheck(publishableKey, options?) loadFilecheck(publishableKey, options?)

Returns

Promise&lt;FilecheckInstance \| null&gt;

.

| Option | Type | Description |
| --- | --- | --- |
| agentId | string | Optional sub-tenant scope, passed to the factory. |
| scriptUrl | string | Override the CDN script URL (staging or self-hosted). |
| loadTimeoutMs | number | Reject if the script has not loaded (default 30 000; 0 disables). |

Behavior worth knowing:

Idempotent. Repeated and concurrent calls inject exactly one &lt;script&gt; tag and share one promise. A tag you added yourself is reused.

SSR-safe. In a non-browser environment it resolves null instead of touching window , so you can call it unconditionally in isomorphic code.

Recoverable. A load failure or timeout rejects with a descriptive error; calling loadFilecheck again retries the load.

### Navigate to header: TypeScript TypeScript

Every shared type is exported from the package root:

FilecheckInstance

,

IntakeElementOptions

,

ReportElementOptions

,

IntakeUi

,

IntakeStatusPayload

,

IntakeFacts

,

ElementEventMap

,

ProofPayload

,

ConnectorConfig

, and more.

window.Filecheck

is also typed globally, including the static

Filecheck.mount

helper the CDN bundle provides.

From here the API is the standard Element surface — see

Create and mount

for options and methods, and

Events

for every payload.

Using React or Vue?

filecheck-react

and

filecheck-vue

build on this package and manage the element lifecycle for you.

Suggest edits

Raise issue

[verify it server-side](https://filecheck.io/docs/server/verify-jobs)

[Filecheck.mount](https://filecheck.io/docs/element/presentation)

[Create and mount](https://filecheck.io/docs/element/create-and-mount)

[Events](https://filecheck.io/docs/element/events)

[filecheck-react](https://filecheck.io/docs/integrations/react)

[filecheck-vue](https://filecheck.io/docs/integrations/vue)

[Suggest edits](https://github.com/sterlyai/mintlify-docs/edit/main/integrations/filecheck-js.mdx)

[Raise issue](https://github.com/sterlyai/mintlify-docs/issues/new?title=Issue%20on%20docs&body=Path:%20/integrations/filecheck-js)

[Navigate to header: Quickstart](https://filecheck.io/docs/integrations/filecheck-js#quickstart)

[Navigate to header: loadFilecheck(publishableKey, options?)](https://filecheck.io/docs/integrations/filecheck-js#loadfilecheck-publishablekey-options)

[Navigate to header: TypeScript](https://filecheck.io/docs/integrations/filecheck-js#typescript)