Sidelatch Docs
Docs menu

View as Markdown

Concepts

Seven words. Each means one thing, and the API, the console, the events and these docs use the same one.

ObjectWhat it isId
PortalA website your users sign in to that has no API. We build and keep a connector for each one. List them.demo_carrier
ConnectionOne user's login to one portal, stored encrypted and kept signed in. It is connected or reconnect_needed, with a reason.conn_...
Connect windowOur sign-in window, opened over your page by link.js with a single-use link token. The password goes from the user to us and never through your code.link token
ChallengeA step the portal asks for during sign-in: a code, a choice, a phone approval, security questions or a CAPTCHA. The user answers it. Format and limits.challenge.type
OperationA named read or write a portal offers, with typed params and a typed result. Every portal of a kind offers the same ones.list_policies
RunOne execution of an operation on a connection: what was asked, how it ended, how long it took and the steps taken. Every call makes one.run_...
EventSomething that happened: a connection changed, a sign-in needed a step, an async run finished. Listed by the API and sent to your webhook. All types.evt_...

Every list is newest first and takes limit (up to 100) and cursor; it returns data, has_more and next_cursor. Every response carries a Sidelatch-Request-Id header. Send us that id when something looks wrong.

Reading data

Call run with an operation name. GET /v1/portals lists each portal's operations and example params. Results are validated before you get them, so a changed portal shows up as an error, never as bad data.

Connectors read the portal's backend calls, not its pages, so a redesign or new layout changes nothing you receive. When the backend itself changes, we notice: each response's shape (field names and types, never values) is fingerprinted. Common backend changes are repaired automatically: a renamed field, a field moved into a sub-object, numbers that start arriving as text ("$450,000"), and a list that starts arriving inside an envelope ({"data": [...]}). Each repair is checked against the schema before it is used, and our team is alerted; you keep getting the same shape. A change no repair fits (an endpoint that moved, a new sign-in flow) starts our re-capture pipeline and returns schema_drift until the regenerated connector ships.

Sessions are kept warm between calls. If the portal has logged the user out, we sign in again from the vault before running your call.

Runs

Every call to an operation makes a run, whether it came from the API, an AI agent or one of our own checks. The response carries its run_id; look it up for 30 days.

A run{
  "id": "run_5d1e...",
  "object": "run",
  "connection_id": "conn_8f2c41d07a9b4e6f",
  "portal": "demo_carrier",
  "operation": "list_policies",
  "source": "api",
  "mode": "sync",
  "status": "completed",
  "error": null,
  "duration_ms": 412,
  "steps": [
    {
      "step": "session_expired"
    },
    {
      "step": "signed_in",
      "ms": 240
    },
    {
      "step": "portal_request",
      "method": "GET",
      "status": 200,
      "ms": 96
    }
  ],
  "created_at": "2026-11-26T15:04:05Z",
  "finished_at": "2026-11-26T15:04:05Z"
}

status is queued, running, completed or failed; a failed run's error is one of the codes. steps say what we did: reused or restored a session, signed in again, and each request to the portal with its status and time. They hold names, timings and status codes only, never a URL or anything the portal returned.

Async runs

A normal call answers when the portal does. For a slow operation or a batch, add "async": true: you get 202 with a queued run at once. Then wait for the run.completed or run.failed event, or poll GET /v1/runs/{run_id}, which returns the result in data for a day.

Deadlines

A read that has not finished in two minutes (sign-in included) fails with timeout; a write gets five. Nothing is retried for you after a timeout.