---
title: "TypeScript SDK"
description: "A typed client for the Overlane API, generated from the OpenAPI document: one method per operation, typed errors, retries for rate-limited reads, and webhook verification."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.overlane.app/llms.txt
> Use this file to discover all available pages before exploring further.

# TypeScript SDK

The SDK is generated from the [OpenAPI document](/developers/rest-api/), not written by hand, so it has exactly the operations the API has and the types its contracts define. It lives in the repository at `packages/sdk` as `@overlane/sdk`. It has no runtime dependencies and uses only `fetch` and Web Crypto. It is tested in Node 22 and in the Cloudflare Workers runtime.

The [SDK reference](/sdk/) lists every method by area, with its signature.

## Use it

```js sdk
import { Overlane, OverlaneApiError } from "@overlane/sdk";

const overlane = new Overlane({ apiKey: process.env.OVERLANE_KEY });

const { tenantId } = await overlane.meGet();
const { connectors } = await overlane.connectorsList({ tenantId });
const issues = await overlane.issuesList({ tenantId, projectId: "proj-1" });

try {
  await overlane.connectorsAction({ tenantId, provider: "slack", action: "post_message", body: { input: { channel: "C01GENERAL", text: "Build passed" } } });
} catch (error) {
  if (error instanceof OverlaneApiError && error.code === "autonomy_approval_required") {
    // The refusal names the class and the subject to approve; an independent agent or a person answers, then retry with the approval ID.
    approvalNeeded = error.body.error.approval.subject;
  }
}
```

Each method takes the path parameters, an optional `query` and a `body`, and returns the typed response. The second argument is `{ approvalId, signal }`: pass the approval ID when the [autonomy gate](/developers/approval-rule/) asks for one.

## Names

A method is named after the route it calls: the route `issues.list` is `issuesList`, `connectors.action` is `connectorsAction`, `apikeys.create` is `apikeysCreate`. A route that accepts several methods adds the method, such as `codeUploadPost`. Path parameters are named after the thing in the path: `issueId`, `webhookId`, `apiKeyId`. `OPERATIONS` lists every operation with its method, path and route ID.

## Errors and retries

A non-2xx answer throws `OverlaneApiError` with `status`, `code`, `hint`, `retryable`, `retryAfterSeconds` and the parsed `body`. A read that was rate limited or hit a server error is retried up to twice (change it with `maxRetries`), waiting for `Retry-After` when the API sends it. A write is never retried by the SDK: use the request ID or event ID the operation takes to repeat it safely.

## Version

The client sends `Overlane-Version` with the version it was generated from, which is exported as `API_VERSION`. Pass `version` to pin another one.

```js sdk
const pinned = new Overlane({ apiKey: process.env.OVERLANE_KEY, version: "2026-10-10" });
```

## Verify webhooks

```js verify
import { verifyWebhook } from "@overlane/sdk";

const problem = await verifyWebhook(secret, rawBody, signatureHeader);
if (problem !== null) throw new Error("bad signature");
```

See [Webhooks](/developers/webhooks/) for replay and ordering rules.

## Reproducible

The SDK sources are checked in. Generating them again from the same document changes nothing, and a test fails when the document, the route tables and the generated client disagree.

Source: https://docs.overlane.app/developers/sdk/index.mdx
