Skip to main content
The Wassist SDK provides a fully typed TypeScript client for programmatic access to all Wassist features. Create agents, manage conversations, handle WhatsApp accounts, and more—all from your code.

Why Use the SDK?

Full Type Safety

Complete TypeScript definitions for all API resources. Catch errors at compile time.

Intuitive API

Resource-based design that mirrors the REST API. If you know one, you know both.

All Features

Access every Wassist capability: agents, conversations, WhatsApp accounts, integrations.

Built-in Auth

Simple token-based authentication with automatic header management.

Quick Example

import { createWassistClient } from '@wassist/sdk';

// Initialize the client
const client = createWassistClient({
  baseUrl: 'https://api.wassist.app/api/v1/',
  authToken: 'your-auth-token',
});

// List your agents
const { data: agents } = await client.agents.list();
console.log(`You have ${agents.length} agents`);

// Create a new agent from an idea
const agent = await client.onboarding.createFromIdea({
  idea: 'A helpful customer support agent for my coffee shop',
});

// Send a message in a conversation
await client.conversations.sendMessage(conversationId, {
  message: 'Hello! How can I help you today?',
});

SDK Structure

The SDK is organized around resources, each with methods for common operations:
WassistClient
├── agents           # Create, read, update, delete agents
├── conversations    # Manage conversations and messages
├── whatsappAccounts # WhatsApp Business accounts
├── whatsappLinkSessions # Account linking
├── phoneNumbers     # Phone number management
├── integrations
│   ├── connectors   # MCP connectors
│   └── elevenlabs   # ElevenLabs voice integration
├── onboarding       # Quick agent creation
└── public           # Public agent discovery

Available Resources

Create and manage AI agents with all their configurations.
// CRUD operations
client.agents.list()
client.agents.get(id)
client.agents.create(input)
client.agents.update(id, input)
client.agents.delete(id)

// Deployment
client.agents.deploy(id, { phoneNumberId })
client.agents.share(id, { userPhoneNumber })
Full documentation →
Access conversation data and send messages.
client.conversations.list(filters)
client.conversations.get(id)
client.conversations.getMessages(id)
client.conversations.sendMessage(id, { message })
client.conversations.sendTemplate(id, templateData)
client.conversations.trigger(id, { prompt })
client.conversations.setCredits(id, { credits })
Full documentation →
Manage your WhatsApp Business accounts and phone numbers.
client.whatsappAccounts.list()
client.whatsappAccounts.get(id)
client.whatsappAccounts.create(input)
client.whatsappAccounts.deployAgent(id, input)
client.whatsappAccounts.proxy(id, method, path, options)
client.whatsappAccounts.getTemplates(id, wabaId)
client.whatsappAccounts.createTemplate(id, wabaId, input)
Full documentation →
Connect external services like ElevenLabs and MCP servers.
// ElevenLabs
client.integrations.elevenlabs.list()
client.integrations.elevenlabs.create(input)
client.integrations.elevenlabs.getAgents(id)

// MCP Connectors
client.integrations.connectors.list()
client.integrations.connectors.listPublic()
client.integrations.connectors.create(input)
Full documentation →
Quick agent creation from various sources.
client.onboarding.createFromIdea({ idea })
client.onboarding.createFromWebsite({ websiteUrl })
client.onboarding.createFromKnowledgeBase({ name, files })
client.onboarding.createFromElevenLabs({ integrationId, agentId })
client.onboarding.createFromShopify({ shopifyUrl })

TypeScript Support

The SDK includes complete type definitions for all resources:
import type { 
  Agent, 
  Conversation, 
  Message,
  WhatsAppAccount,
  AgentTool,
  // ... and many more
} from '@wassist/sdk';

// Full autocomplete and type checking
const agent: Agent = await client.agents.get(id);
console.log(agent.name);        // string
console.log(agent.tools);       // AgentTool[]
console.log(agent.paywallConfig?.messageLimit); // number | null

Error Handling

The SDK throws errors for failed requests:
try {
  const agent = await client.agents.get('invalid-id');
} catch (error) {
  if (error.message === 'Unauthorized') {
    // Handle auth error
    client.clearAuthToken();
    redirectToLogin();
  } else {
    // Handle other errors
    console.error('Failed to get agent:', error.message);
  }
}
Learn more about error handling →

Next Steps