PermuteDocs
Dashboard

Guide

Set up a workspace

Create a workspace with an organization-scoped management key, then use its ID for workspace data operations.

Workflow

  1. 1Create the workspace
  2. 2Keep the returned workspace ID
  3. 3Use that workspace for data operations

Complete example

typescript
import { PermuteClient } from '@permute/sdk';

const orgClient = new PermuteClient({
  apiKey: process.env.PERMUTE_API_KEY!,
});

const workspace = await orgClient.workspaces.create({
  name: 'Finance',
  context: 'Revenue, customers, and operating performance', // Optional.
});

const client = orgClient.withWorkspace(workspace.id);
const sources = await client.sources.list();

console.log(workspace.id, sources.items);