# SDK reference Install `@browserlayer/sdk` to **author integrations**. Your backend calls the hosted HTTP API. | API | Purpose | Example | | ---------------------------------------------------------------------------- | --------------------------------------- | ---------------------------------------------------- | | `createEndpoint({ description, input, output, exec })` | Define an application endpoint | [Endpoints](/docs/endpoints) | | `createSync({ description, connection, schedule, model, checkpoint, exec })` | Define a scheduled dataset | [Syncs](/docs/syncs) | | `ctx.step(id, fn)` | Record a result; reuse it after a pause | [Steps](/docs/flows) | | `ctx.run(flow, input)` | Invoke a discovered child flow | [Composition](/docs/flows#call-a-connector-flow) | | `ctx.input(id, form)` | Request input and suspend | [MFA](/docs/input) | | `form(schema, fields)` | Declare reusable input fields | [Authentication](/docs/authentication) | | `ctx.browser()` | Obtain the Playwright page | [Browser](/docs/browser) | | `ctx.http.get(url, options?)` | Browser-context GET | [HTTP](/docs/browser#read-json-through-the-browser) | | `ctx.http.request(url, options?)` | Browser-context request | [HTTP](/docs/browser#submit-a-request) | | `ctx.observe(id, check, { timeoutMs })` | Poll a read-only outcome | [Observation](/docs/browser#observe-after-an-action) | | `ctx.connection.data.get/set/delete` | Saved connection data | [Authentication](/docs/authentication) | | `ctx.getCheckpoint()` | Read source progress | [Checkpoints](/docs/checkpoints) | | `ctx.publish(id, records, options)` | Atomically publish records and progress | [Syncs](/docs/syncs) | | `FlowError(code, message, userMessage?)` | Structured failure | [Debugging](/docs/debugging) | | `createReference(schema)` | Define private upstream identity | [References](/docs/references) | | `ctx.references.store(reference, value)` | Get a stable public ID | [References](/docs/references#create-public-ids) | | `ctx.references.resolve(reference, id)` | Resolve private identity | [References](/docs/references#resolve-before-acting) | ## Additional entry points | Import | Audience | | ---------------------------- | ---------------------------------------------- | | `@browserlayer/sdk/testing` | Integration tests | | `@browserlayer/sdk/compiler` | Compile an integration directory | | `@browserlayer/link/browser` | Optional embedded Link | | `@browserlayer/sync` | Webhook verification and sync storage adapters | Low-level `Runtime`, `MemoryStore`, browser adapters and durable engine contracts are for custom hosts. See the installed SDK `RUNTIME.md` for their contract; they are unnecessary for the CLI workflow. `createFlow({ description, input, output, exec })` defines an internal connector operation. Only these flows can be composed with `ctx.run`; endpoints and syncs are entry points. All three support durable steps and user input.