Skip to content

hailer.public

Endpoints that work without a Hailer session. Unlike every other module, these do not go through the host frame — they fetch directly against the public backend (options.publicBackendUrl, default https://api.hailer.com). This is the only namespace usable in outside mode.

hailer.public.app

MethodEndpointReturns
config()reads local manifest.json, then POST /api/v3/app/publicPromise<Config>
ts
const config = await hailer.public.app.config();

Loads the app's public config. Used internally during startup to detect outside mode.

hailer.public.form

MethodEndpointReturns
data(formsKey)POST /api/v2/forms/process/getPromise<FormsResponse>
submit(formsKey, formsData)POST /api/v2/forms/activity/createPromise<FormCreateResponse>
ts
const form = await hailer.public.form.data(formsKey);
const result = await hailer.public.form.submit(formsKey, formsData);

data reads a public form's definition; submit creates an activity from a public form submission. See FormsResponse / FormsData / FormCreateResponse.

hailer.public.insight

MethodEndpointReturns
data(insightKey)POST /api/v3/insight/publicPromise<InsightResponse>
dataAsObject(insightKey)(calls data, maps rows)Promise<InsightResponseAsObjects>
ts
const insight = await hailer.public.insight.data(insightKey);
const rows = await hailer.public.insight.dataAsObject(insightKey); // rows as objects

dataAsObject runs data and maps the header/row arrays into row objects client-side. See InsightResponse / InsightResponseAsObjects.

hailer.public.product

MethodEndpointReturns
list(filter?, options?)POST /api/v3/product/listPromise<ProductListResponse>
get(id)POST /api/v3/product/getPromise<Product | undefined>
ts
const { products } = await hailer.public.product.list({ type: 'app' });
const product = await hailer.public.product.get(productId);

Public marketplace reads. Same shapes as hailer.product.

Hailer Developer Documentation