CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-elevenlabs--elevenlabs-js

Official Node.js SDK for ElevenLabs text-to-speech API with voice synthesis, real-time transcription, music generation, and conversational AI

Overall
score

86%

Evaluation86%

1.06x

Agent success when using this tile

Overview
Eval results
Files

whatsapp.mddocs/conversational/

WhatsApp Integration

Manage WhatsApp accounts and connect agents to WhatsApp.

Quick Reference

import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";

const client = new ElevenLabsClient({ apiKey: "your-api-key" });
// Access this API via: client.conversationalAi.whatsappAccounts

WhatsApp Account Management

/**
 * List WhatsApp accounts
 */
client.conversationalAi.whatsappAccounts.list(
  requestOptions?: RequestOptions
): HttpResponsePromise<GetWhatsappAccountsResponseModel>;

/**
 * Import a WhatsApp account
 * @param request - WhatsApp account credentials
 * @param requestOptions - Optional request configuration
 * @returns Imported WhatsApp account details
 * @throws UnprocessableEntityError if request fails
 */
client.conversationalAi.whatsappAccounts.import(
  request: ImportWhatsAppAccountRequest,
  requestOptions?: RequestOptions
): HttpResponsePromise<ImportWhatsAppAccountResponse>;

/**
 * Get WhatsApp account details
 * @param phone_number_id - The WhatsApp phone number ID
 * @param requestOptions - Optional request configuration
 * @returns WhatsApp account details
 * @throws UnprocessableEntityError if request fails
 */
client.conversationalAi.whatsappAccounts.get(
  phone_number_id: string,
  requestOptions?: RequestOptions
): HttpResponsePromise<GetWhatsAppAccountResponse>;

/**
 * Delete WhatsApp account
 * @param phone_number_id - The WhatsApp phone number ID to delete
 * @param requestOptions - Optional request configuration
 * @returns Promise resolving to unknown
 * @throws UnprocessableEntityError if request fails
 */
client.conversationalAi.whatsappAccounts.delete(
  phone_number_id: string,
  requestOptions?: RequestOptions
): HttpResponsePromise<unknown>;

/**
 * Update WhatsApp account
 * @param phone_number_id - The WhatsApp phone number ID to update
 * @param request - Update request with optional agent_id
 * @param requestOptions - Optional request configuration
 * @returns Promise resolving to unknown
 * @throws UnprocessableEntityError if request fails
 */
client.conversationalAi.whatsappAccounts.update(
  phone_number_id: string,
  request?: UpdateWhatsAppAccountRequest,
  requestOptions?: RequestOptions
): HttpResponsePromise<unknown>;

interface ImportWhatsAppAccountRequest {
  /** Business account ID from WhatsApp */
  businessAccountId: string;
  /** Phone number ID from WhatsApp */
  phoneNumberId: string;
  /** Token code for authentication */
  tokenCode: string;
}

interface ImportWhatsAppAccountResponse {
  /** Imported account ID */
  account_id: string;
  /** Phone number */
  phone_number: string;
  /** Account status */
  status: string;
}

interface UpdateWhatsAppAccountRequest {
  /** Optional agent ID to assign to this WhatsApp account */
  agent_id?: string;
}

WhatsApp Calling

/**
 * Make an outbound call via WhatsApp
 * @param request - Outbound call configuration
 * @param requestOptions - Optional request configuration
 * @returns WhatsApp outbound call response
 * @throws UnprocessableEntityError if request fails
 */
client.conversationalAi.whatsapp.outboundCall(
  request: WhatsAppOutboundCallRequest,
  requestOptions?: RequestOptions
): HttpResponsePromise<WhatsAppOutboundCallResponse>;

interface WhatsAppOutboundCallRequest {
  /** WhatsApp phone number ID */
  whatsappPhoneNumberId: string;
  /** WhatsApp user ID to call */
  whatsappUserId: string;
  /** WhatsApp call permission request template name */
  whatsappCallPermissionRequestTemplateName: string;
  /** WhatsApp call permission request template language code */
  whatsappCallPermissionRequestTemplateLanguageCode: string;
  /** Agent ID to use for the call */
  agentId: string;
}

Install with Tessl CLI

npx tessl i tessl/npm-elevenlabs--elevenlabs-js

docs

index.md

tile.json