Skip to main content
Documentation
StartOverviewArchitectureAuthenticationSend your first message
TypeScript SDKOverviewTrusted app serverApp-user clientsRealtimeErrors & webhooks
Flutter SDKOverviewInstallationAuthenticationChannels & messagesOffline & syncRealtimeUI componentsPush & lifecycle
ConceptsTenancy & scopeChannels & messagesDelivery & reconciliationSecurity checklist
ProtocolsRealtimeSigned webhooks
ReferenceREST APIErrors, limits & retriesDeploy docs to Coolify
VV ChatDocs API v1
Recommended starting points
Build chat without rebuilding infrastructureV Chat is a multi-tenant messaging backend with typed server, web, and Flutter integration paths.StartArchitecture at a glanceUnderstand the control plane, data plane, realtime path, and SDK boundaries before integrating.StartAuthentication and credentialsSelect the correct credential for dashboard, trusted-server, app-user, realtime, and webhook flows.StartSend your first messageUse the trusted TypeScript server client to create the minimum safe messaging flow.StartTypeScript SDK overviewChoose the correct typed client for trusted servers, app users, dashboard sessions, realtime, and webhooks.TypeScript SDKTrusted app-server clientUse AppServerClient from a protected backend to manage data-plane resources and mint app-user tokens.TypeScript SDKApp-user clientsBuild browser or Node app-user flows with VChatClient or the lower-level AppUserClient.TypeScript SDK
↑↓ Navigate↵ Openesc Close
API reference
StartOverviewArchitectureAuthenticationSend your first message
TypeScript SDKOverviewTrusted app serverApp-user clientsRealtimeErrors & webhooks
Flutter SDKOverviewInstallationAuthenticationChannels & messagesOffline & syncRealtimeUI componentsPush & lifecycle
ConceptsTenancy & scopeChannels & messagesDelivery & reconciliationSecurity checklist
ProtocolsRealtimeSigned webhooks
ReferenceREST APIErrors, limits & retriesDeploy docs to Coolify
Contract sourceOpenAPI JSON
Docs/Start
Quickstart

Send your first message

Use the trusted TypeScript server client to create the minimum safe messaging flow.

Updated 2026-08-09•packages/sdk-typescript/README.md · generated OpenAPI operation folders

1. Install the SDK

bash
npm install @vchatsdk/sdk-typescript
Release-candidate package

Pin the package version approved for your environment. Review the SDK changelog before promoting a prerelease into production.

2. Create a trusted client

ts
import { AppServerClient } from '@vchatsdk/sdk-typescript';

const vchatConfig = readValidatedVChatConfig();

const chat = new AppServerClient({
  baseUrl: 'https://api.example.com',
  tenantId: vchatConfig.tenantId,
  appId: vchatConfig.appId,
  environment: 'production',
  credential: async () => vchatConfig.applicationCredential,
});
This code runs only on your backend

Load the application credential from a protected secret store. Never expose this client configuration through a browser bundle or mobile application.

3. Create the messaging resources

ts
await chat.appUsers.upsert('user-123', {
  displayName: 'Ada Lovelace',
  custom: { plan: 'pro' },
});

await chat.channels.create('messaging', 'support-123', {
  displayName: 'Customer support',
  custom: { topic: 'Onboarding' },
});

await chat.channelMemberships.add(
  'messaging',
  'support-123',
  'user-123',
  { custom: { role: 'customer' } },
);

Channel type and channel IDs are fixed identities. Treat foreign or denied resources as not found, and do not infer authorization from cached rows.

4. Send a message and issue a token

ts
const sent = await chat.messages.send(
  'messaging',
  'support-123',
  { text: 'Hello from V Chat' },
  { messageId: crypto.randomUUID() },
);

const session = await chat.appUsers.issueToken({
  userId: 'user-123',
  lifetimeSeconds: 3600,
});

return {
  message: sent.data.message,
  token: session.data.token,
  expiresAt: session.data.expiresAt,
};
Reconcile ambiguous mutations

The SDK retries eligible safe reads once by default and never automatically retries mutations. If a mutation outcome is ambiguous, read the fixed-identity resource and reconcile before deciding to retry.

5. Continue on the client

TypeScript app-user client

Query conversations, send messages, and connect realtime from browser or Node.

Read guide
Flutter installation

Add the recommended package and compose the SDK for a Flutter app.

Read guide
PreviousAuthentication and credentialsNext TypeScript SDK overview
On this page1. Install the SDK2. Create a trusted client3. Create the messaging resources4. Send a message and issue a token5. Continue on the client
Report a docs issue