Data Pod API Overview
Complete API reference for the Synap Data Pod
Base URL
http://localhost:3000/trpc
Authentication
All endpoints require authentication via Ory Kratos session or API key.
See Authentication for details.
Available Routers
Notes Router
notes.create- Create a notenotes.list- List notesnotes.get- Get a notenotes.update- Update a notenotes.delete- Delete a note
Chat Router
chat.sendMessage- Send a messagechat.getThread- Get conversation threadchat.listThreads- List all threads
Events Router
events.log- Log an eventevents.list- List eventsevents.get- Get an event
Hub Router
hub.generateAccessToken- Generate Hub access tokenhub.requestData- Request data (Hub only)hub.submitInsight- Submit insight (Hub only)
API Keys Router
apiKeys.create- Create API keyapiKeys.list- List API keysapiKeys.revoke- Revoke API key
Usage with SDK
import SynapClient from '@synap/client';
const synap = new SynapClient({
url: 'http://localhost:3000',
token: 'your-token',
});
// Create a note
const result = await synap.notes.create.mutate({
content: '# My Note\n\nContent here',
title: 'My Note',
});
Usage with tRPC Client
import { createTRPCProxyClient, httpBatchLink } from '@trpc/client';
import type { AppRouter } from '@synap/api';
const client = createTRPCProxyClient<AppRouter>({
links: [
httpBatchLink({
url: 'http://localhost:3000/trpc',
headers: {
'Authorization': 'Bearer your-token',
},
}),
],
});
const result = await client.notes.create.mutate({
content: '# My Note',
});
Next: See specific router documentation for detailed endpoints.