diff --git a/fern/sdk/web.mdx b/fern/sdk/web.mdx index 609151b..d5c7a7f 100644 --- a/fern/sdk/web.mdx +++ b/fern/sdk/web.mdx @@ -25,6 +25,13 @@ You can start a web call by calling the `.start()` function. The `start` functio 1. **a string**, representing an assistant ID 2. **an object**, representing a set of assistant configs (see [Create Assistant](/api-reference/assistants/create-assistant)) +The `start` function returns a promise that resolves to a call object. For example: + +```javascript +const call = await vapi.start(assistantId); +// { "id": "bd2184a1-bdea-4d4f-9503-b09ca8b185e6", "orgId": "6da6841c-0fca-4604-8941-3d5d65f43a17", "createdAt": "2024-11-13T19:20:24.606Z", "updatedAt": "2024-11-13T19:20:24.606Z", "type": "webCall", ... } +``` + #### Passing an Assistant ID If you already have an assistant that you created (either via [the Dashboard](/quickstart/dashboard) or [the API](/api-reference/assistants/create-assistant)), you can start the call with the assistant's ID: