Docs menu
Reference
Events
Every event type and its payload: server events and connect window events.
Server events
An event is recorded for everything that happens to a connection, a sign-in or an async run,
whether or not you have a webhook. List them for 30 days. Set
webhook_url in settings and each one is also POSTed to
you. Events carry ids and statuses only, never portal data or credentials.
| Event | When | data |
|---|---|---|
connection.connected | A user linked an account, or signed in again on one that needed it (relinked: true). | connection_id, user_id, portal, status, relinked |
connection.reconnect_needed | The portal refused the stored login and only the user can fix it. Sent once, when the status changes. | connection_id, user_id, portal, status, reason |
connection.deleted | A connection was disconnected and its stored login deleted. | connection_id, user_id, portal, status |
link.challenge_required | During sign-in, the portal asked the user for a step: a code, a choice, a phone approval, security questions or a CAPTCHA. | user_id, portal, kind |
link.failed | A sign-in did not finish. reason is auth_failed (wrong password or code), blocked (the portal wants a check on its own page), abandoned (the user left the hosted browser) or busy. | user_id, portal, reason |
run.completed | An async run finished. Read the result with GET /v1/runs/{id}. | run_id, connection_id, user_id, portal, operation, status |
run.failed | An async run failed. error is one of the error codes. | run_id, connection_id, user_id, portal, operation, status, error |
build.completed | A portal build finished: status is ready, partial, needs_operator or published. | build_id, status, portal |
webhook.test | You sent a test event from the console or the API. | message |
Event body{ "id": "evt_1f0c...", "type": "connection.reconnect_needed", "created": 1795700000, "data": { "connection_id": "conn_8f2c41d07a9b4e6f", "user_id": "agency-42", "portal": "demo_carrier", "status": "reconnect_needed", "reason": "wrong_password" } }
Every event has the same envelope: id, type, created (unix
seconds) and data, whose fields are listed above. The
API also returns object, created_at and the delivery attempts.
Connect window events
The connect window reports to your page as it goes: link.js and
@sidelatch/link pass these to onEvent(name, data), for your own funnel
analytics. They never carry a login or anything the portal returned.
| Name | When | data |
|---|---|---|
opened | The sign-in form is showing. | {} |
submitted | The user sent their login. | {} |
challenge | The portal asked for a verification step. | {kind}: code, choice, push, questions or captcha |
browser | The portal's own sign-in page opened in a hosted browser. | {} |
error | Something went wrong; the user can usually try again. | {code, message}, code from the error codes |
connected | The account is linked. onSuccess(connectionId, {portal}) follows. | {connectionId, portal} |
exit | The window closed without a connection. onExit(error) follows. | {error}: the last {code, message}, or null |
If you embed /connect in your own iframe instead, these arrive as postMessage
data: {type: "sidelatch:event", name, ...data}, {type: "sidelatch:connected",
connection_id, portal} and {type: "sidelatch:exit", error}. Check that
event.origin is your Sidelatch host before you trust one.