FormsClientOptions
@ebitex/forms-sdk — the framework-agnostic half: fetching a form definition and validating a
submission against it. Neither imports React, so a server-only consumer never pulls it in.
The rendering components live behind a separate entry point, @ebitex/forms-sdk/react. That
split is deliberate and load-bearing: createFormsClient takes an organization-wide API key and
must only ever run server-side, while the components render in a respondent’s browser and must
never receive one. Expressing the boundary in the import graph makes a mistake visible in review.
Properties
Section titled “Properties”apiKey
Section titled “apiKey”apiKey:
string
An organization-scoped API key, created in Hub under Organizations → API Keys.
Server-side only. This key acts for the whole organization and is not scoped to one form.
Anything you ship to a browser is readable by every visitor, so fetch form definitions from
your own server or build step and pass the resulting object to the rendering components — which
never receive the key. That split is why @ebitex/forms-sdk/react is a separate entry point.
baseUrl?
Section titled “baseUrl?”
optionalbaseUrl?:string
Defaults to ebitex’s production API. Override for a self-hosted or local deployment.
fetch?
Section titled “fetch?”
optionalfetch?: (input,init?) =>Promise<Response>
Injectable for testing or for a runtime with a non-global fetch.
Parameters
Section titled “Parameters”RequestInfo | URL
RequestInit
Returns
Section titled “Returns”Promise<Response>