Skip to content

Most resources in Socifyr are scoped to a workspace. Your API key may have access to several, so every request must indicate which one to use.

How it works

WhereHow
REST APISend the X-Workspace-Id header
SDKPass workspaceId once when constructing the client
CLIsocifyr configure --workspace <id> or SOCIFYR_WORKSPACE_ID env var
http
X-Workspace-Id: 69fbbf978e770da397a59a5a

Default fallback

If you don't send X-Workspace-Id, the API uses the first workspace your key has access to. This is fine for keys scoped to one workspace, but explicit is safer.

Per-call override (SDK)

The SDK locks the workspace at construction time. To use multiple workspaces from the same process, create separate clients:

typescript
const personal = new Socifyr({
  apiKey: process.env.SOCIFYR_API_KEY!,
  workspaceId: 'ws_personal_id',
})

const work = new Socifyr({
  apiKey: process.env.SOCIFYR_API_KEY!,
  workspaceId: 'ws_work_id',
})

await personal.uploads.text({ ... })
await work.uploads.text({ ... })

Finding your workspace ID

  • Dashboard URL: open a workspace; the ID is in socifyr.com/dashboard/<workspaceId>/...
  • SDK: await socifyr.workspaces.list() returns all workspaces your key has access to
  • CLI: socifyr connections --json (auto-uses your default workspace)