Skip to main content
AMLOK’s Integrations Hub collects borrower authorization and connects sources selected by the institution in the console. Your backend creates a borrower-bound session; your frontend displays its short-lived launch URL. AMLOK performs collection and normalization.

Publish and discover a Hub

In Embeddings, publish the integrations, branding and requested consent purposes. Approve exact HTTPS embedding origins and return URLs. AMLOK rejects wildcard origins, embedded URL credentials, fragments and unregistered destinations. Sandbox alone may permit explicitly registered loopback HTTP origins for development; Live requires HTTPS. Read GET /v1/configuration. Each embedding_versions entry lists its ID, integrations, consent purposes, allowed origins, return URLs and hub_origin. Publishing a new version does not change existing sessions. Use a version whose integration set and purposes fit the borrower flow.

Create the session on your server

Authenticate your own customer and authorize their relationship to the borrower before calling POST /v1/embedding-sessions. Keep the API key on the server. Send borrower_id, embedding_version_id, purpose, return_url, consent_purposes and, for an iframe, embed_origin.
  • Request credit_assessment for underwriting.
  • Request continuous_monitoring for post-funding monitoring.
  • Request both if the borrower is explicitly consenting to both. The Hub presents both purposes; neither implies the other.
  • Requested purposes must be a subset of the published Hub’s allowed purposes. Otherwise return 422 consent_purpose_missing.
  • For reauthorization, use purpose reauthorize and the affected connection_id. Consent can be renewed only with a new affirmative borrower authorization.
The session expires at expires_at. Repeating the same idempotency key returns the same session, including its original expiry. After expiration create a new session with a fresh command identity. An abandoned session is never evidence of consent.

Display the borrower experience

Use launch_url for either full-page navigation or an iframe. A session without embed_origin is redirect-only. The Hub uses a frame-ancestors policy allowing the approved parent origin; API endpoints do not enable browser CORS for secret keys. Allow the configured hub_origin in your application’s frame-src policy.
Set the iframe source from your own authenticated backend response. Never put an API key into HTML. Providers that require a new window open it only after a borrower action. If browser restrictions prevent completion, offer a borrower-initiated full-page link to the same unexpired launch URL. The Hub persists the session’s confirmed connections across these presentations. The browser example uses the typed HubMessage contract. Every message contains protocol_version, event_id, session_id and type. Types are amlok.hub.ready, amlok.hub.completed, amlok.hub.cancelled, amlok.hub.expired and amlok.hub.failed. The Hub sends messages only to the exact embed_origin, never *. Validate event.origin against the configured hub_origin, event.source against the iframe’s contentWindow, and session_id against the session your backend created. Deduplicate event_id. No message includes provider tokens, financial data or proof of consent. Your backend retrieves the session before trusting a terminal state. For full-page presentation, terminal states return the browser to the approved return_url with amlok_session_id and amlok_state added as query parameters. These reserved parameters cannot be supplied in the configured URL. Treat them as untrusted hints; your authenticated backend verifies session ownership and retrieves its state. Cancelled and expired sessions require a new session. Already confirmed consent/connections are not revoked by closing the window.

Confirm readiness

The completed state means the borrower finished the Hub journey, not that all sources have finished ingestion. Retrieve session.connection_ids and consent_ids. A connection exposes authorization status separately from data_status, freshness and coverage. Wait for required inputs or let an origination remain collecting; never interpret a stale or partial source as a clean result. An underwriting-only connection cannot enroll in Signal. Create a new authorization session requesting continuous_monitoring, then use the resulting connection IDs. Reauthorization preserves the logical connection ID when the same source account is reconnected. A different source creates a different connection.

Resolve a resource requirement

When an origination or monitor returns requires_action, use its typed requirements. Create a Hub session with that resource’s origination_id or monitor_id and requirement_id. These IDs must match the borrower and an open connect/reauthorize requirement. On successful authorization, AMLOK atomically associates the connection, resolves that requirement, increments the resource version and schedules permitted continuation. The immutable submitted_request and historical results remain unchanged. For an independently connected source on an existing monitor, replace connection_ids using the monitor’s If-Match configuration update. This change is prospective. Hub configuration stays in the console; the API does not expose provider job orchestration.