New:Socket for Asana Is Now Available.Learn more
Get Started

@synap-core/sdk

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@synap-core/sdk

Type-safe tRPC client SDK for Synap data pods

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

@synap-core/sdk

Type-safe tRPC client for Synap data pods. Connect any JavaScript/TypeScript app to your personal data pod with full autocomplete on all 47+ routers.

Install

npm install @synap-core/sdk
# or
pnpm add @synap-core/sdk

Quick start

import { createSynapClient } from "@synap-core/sdk";

const synap = createSynapClient({
  podUrl: "https://your-pod.synap.live", // your data pod URL
  apiKey: "sk_live_...", // from Workspace → Settings → API Keys
  workspaceId: "ws_...", // your workspace ID
});

// Fully typed — autocomplete works on all procedures
const entities = await synap.entities.list.query({ limit: 20 });
const workspace = await synap.workspaces.get.query();

// Create an entity
await synap.entities.create.mutate({
  profileSlug: "note",
  title: "My first note",
  properties: { content: "Hello from the SDK!" },
});

Authentication

API key (server-side / external apps)

const synap = createSynapClient({
  podUrl: "https://your-pod.synap.live",
  apiKey: "sk_live_...", // Bearer token — generate in workspace settings
  workspaceId: "ws_...",
});

Session cookie (browser — after Kratos login)

const synap = createSynapClient({
  podUrl: "https://your-pod.synap.live",
  workspaceId: "ws_...",
  // omit apiKey — credentials: "include" is set automatically
});

Type helpers

import type { RouterInputs, RouterOutputs } from "@synap-core/sdk";

type EntityListInput = RouterInputs["entities"]["list"];
type EntityListOutput = RouterOutputs["entities"]["list"];

React

For React apps use @synap-core/react which wraps this SDK with TanStack Query hooks.

API reference

Full procedure reference: docs.synap.live/reference/api-reference

Keywords

synap

FAQs

Package last updated on 26 Jul 2026

Related posts