Before you start
Create an API key in Permute and copy the workspace ID from the active workspace URL. Keep both values in server-side environment variables.
Keep API keys private. Never expose them in browser code or commit them to source control.
1. Install the SDK
bun add @permute/sdk
2. Configure your environment
PERMUTE_API_KEY=pk_live_... PERMUTE_WORKSPACE_ID=wksp_...
3. Make your first request
Derive a workspace client and list the datasets and connectors available to the key.
import { PermuteClient } from '@permute/sdk';
const orgClient = new PermuteClient({
apiKey: process.env.PERMUTE_API_KEY!,
});
const client = orgClient.withWorkspace(
process.env.PERMUTE_WORKSPACE_ID!,
);
const sources = await client.sources.list();
console.log(sources.items);