VapiAI/server-sdk-typescript

`CreateAssistantDto` missing `forwardingPhoneNumber` field specified on docs

Closed this issue · 1 comments

https://docs.vapi.ai/assistants/function-calling#transfer-call says

image

Yet forwardingPhoneNumber is not supported when creating an assistant.

image

Minimal code example (to replicate syntax error and for manual testing):

import { VapiClient } from "@vapi-ai/server-sdk";

const API_TOKEN = "";
const HUMAN_AGENT_NUMBER = "";

async function main() {
  const client = new VapiClient({
    token: API_TOKEN,
  });

  await client.assistants.create({
    name: "test transferCall tool", 
    model: {
      provider: "openai",
      model: "gpt-4o-mini",
      messages: [
        {
          role: "system",
          content: "hi"
        }
      ],
      // tools: [
      //   {
      //     type: "transferCall", 
      //     destinations: [
      //       {
      //         type: "number",
      //         number: HUMAN_AGENT_NUMBER
      //       }
      //     ]
      //   }
      // ]
    },
    forwardingPhoneNumber: HUMAN_AGENT_NUMBER,
    firstMessage: "hi",
  });
}

The docs have been corrected to no longer use forwardingPhoneNumber