browserlayer / docsPrivate alphaDashboard ↗
ReferenceMarkdown

HTTP API

Call the API from your backend with an application key for the target environment.

sh
export BROWSERLAYER_API_URL=https://api.browserlayer.dev
# Load BROWSERLAYER_API_KEY from your server's secret configuration.
curl "$BROWSERLAYER_API_URL/connections" \
  -H "Authorization: Bearer $BROWSERLAYER_API_KEY"
MethodPathBody / result
POST/link-sessions{ integration, connection? } → { connection, run, hostedUrl, url }
POST/link-sessions{ run } → hosted Link for an existing input wait
GET/connectionsConnections visible to this key
GET/connections/:idConnection state
POST/connections/:id/disconnectDisconnect and delete recoverable credentials

Save IDs against your signed-in user. The API key scopes an environment; your backend enforces which user owns each connection and run. Operator test accounts are unavailable to application keys.

Endpoints

MethodPathBody / result
POST/runs{ integration, flow, connection?, input } → admitted run ID
GET/runs/:idCurrent status, output/error and any input interaction
POST/runs/:id/cancelRequest cancellation

Use Idempotency-Key on POST /runs. Persist it before admission and reuse it after ambiguous network failures. flow is the public endpoint's filename ID. Internal flows and scheduled syncs are not callable through this route.

See endpoint calls for polling and input handling. Admission does not mean the operation completed.

Syncs

MethodPathResult
GET/connections/:id/syncsSchedules and pending runs
GET/connections/:id/syncs/:sync/records?limit=100&cursor=...{ changes, cursor, hasMore }
POST/connections/:id/syncs/:sync/pauseStop new scheduled occurrences
POST/connections/:id/syncs/:sync/startEnable scheduling and make the sync due
POST/connections/:id/syncs/:sync/triggerEnable scheduling and make the sync due

limit must be 1–1000. Omit cursor on the first read. Pausing does not cancel an active run. A waiting sync retains one occurrence until it finishes.

Errors

Error envelope:

json
{ "error": { "code": "NOT_FOUND", "message": "Resource not found" } }
CodeNext step
NOT_FOUNDCheck IDs and environment; the resource may be hidden from this key
FORBIDDENUse a key authorized for this environment and operation
CONNECTION_BUSYInspect the current run; don't repeatedly start the same mutation
INPUT_UNAVAILABLEFetch the run again; it no longer has an attachable input wait
CONNECTION_REQUIRES_INPUTReconnect, then deliberately begin a new business operation
ACTION_UNCERTAINInspect the website before deciding whether to repeat an action

Execution failures appear on the run, even when the admission request succeeded. Check status and error when polling.

Operator commands

Deployments, promotion, API key creation and delivery administration require operator access. Use the CLI; do not give your application an operator credential.