browserlayer / docsPrivate alphaDashboard ↗

Start here

Websites → endpoints and syncsInstallRun your first endpointAtlas walkthrough

Build integrations

Project structureCapture a websiteBuild with your coding agentEndpointsSteps and connector flowsTyped referencesAuthenticationUser input and MFABrowser interactions and HTTPSync recordsCheckpoints and deletionsTest an integrationDebug in Studio

Use in your app

Connect accounts with hosted LinkCall an endpointConsume sync recordsReceive webhooks

Deploy

Deploy and verify

Reference

SDK referenceHTTP APICLI reference
Start hereMarkdown

Run your first endpoint

The installer creates a working page-title endpoint and its offline tests.

1. Open local Studio

From my-integrations:

sh
browserlayer start

Studio opens on a loopback URL printed by the CLI. It does not require a cloud login.

2. Run the tests

sh
browserlayer test example

Expect two passing tests: a successful page load and a website returning HTTP 503. These use fixtures, with network access blocked.

3. Call the website

Start the scaffold's example website in another terminal, from the project directory:

sh
npm run website

Then run the endpoint:

sh
browserlayer run example page-title --local \
  --input '{"url":"http://127.0.0.1:3415"}' --wait

The completed run contains:

json
{ "title": "Example account" }

This run opens the live local website in Chrome. Open Runs in Studio and select page-title to inspect its input, output and browser step. You can then replace the URL with your own website.

4. Read the endpoint

A standalone version of integrations/example/endpoints/page-title.ts:

ts
import { createEndpoint } from "@browserlayer/sdk";
import { z } from "zod";

export default createEndpoint({
  description: "Read a page title.",
  input: z.object({ url: z.url() }),
  output: z.object({ title: z.string() }),
  async exec(ctx, input) {
    return ctx.step("read", async () => {
      const page = await ctx.browser();
      await page.goto(input.url);
      return { title: await page.title() };
    });
  },
});
PartMeaning
page-title.tsEndpoint ID: page-title
input / outputZod schemas checked at execution boundaries
execYour implementation
ctx.stepRecords the result so completed work can be reused after a pause

The scaffold separates its schemas and website helper into their own files. The same rules apply.

Next: Build with your coding agent or follow Atlas.

The completed page-title endpoint showing its input URL and Example account output in local Studio.

← InstallAtlas walkthrough →
On this page1. Open local Studio2. Run the tests3. Call the website4. Read the endpoint