Skip to main content

Client SDK

The parlance client SDK is the typed TypeScript wrapper around the REST API. It is the recommended way to talk to the platform from TypeScript or JavaScript, giving you a typed client, sensible defaults and consistent error handling rather than hand-rolled HTTP calls.

This page is an overview. It covers what the SDK is, how to install it and the shape of a typical call.

What it is

  • A single TypeScript package, parlance-sdk, that wraps the REST API.
  • The shared foundation for every parlance extension: the Figma plugin, the browser extension, the VS Code extension, the Xcode and native auditors, and the MCP server all consume this SDK rather than calling the API directly.
  • Typed throughout, so request and response shapes are checked at compile time.

Installation

The SDK is distributed as a git-pinned package — installed from its repository at a specific commit, rather than from a public registry. Pin it in your package.json dependencies, for example:

{
  "dependencies": {
    "parlance-sdk": "git+ssh://git@github.com/jpace-cloud/parlance-sdk.git#<sha>"
  }
}

Replace <sha> with the commit you want to pin to, then install with your package manager. Pinning to a commit keeps builds reproducible and matches how the rest of the toolchain consumes the SDK.

Authentication

The SDK authenticates with the same API keys as the REST API. Create one in the app under Account → API keys (/account/api-keys) and provide it when you construct the client. Keep the key in an environment variable or secrets manager — never commit it.

An illustrative usage snippet

The snippet below is illustrative — it shows the shape of constructing a client and running an audit conceptually, not a literal method reference. Provide your API key from /account/api-keys.

import { ParlanceClient } from 'parlance-sdk';

// Construct a client with an API key (read it from the environment).
const parlance = new ParlanceClient({
  apiKey: process.env.PARLANCE_API_KEY,
});

// Conceptually: run an audit and read the findings back.
const result = await parlance.audits.run({
  projectId: 'your-project',
  // ...target and contract details
});

console.log(result.findings);

Because the SDK wraps the REST API, it points at https://api.parlance.business by default and surfaces failures as explicit errors.

Next steps

  • REST API — the underlying service, its base URL and authentication.
  • Extensions — the tools that build on this SDK, for Figma, the browser, VS Code, Xcode, native apps and AI agents.
  • Account → API keys — create and manage the keys the SDK uses.