Skip to content

Commit abc21ec

Browse files
authored
Added documentation on the return value of the start function (#34)
1 parent e25cf7f commit abc21ec

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

fern/sdk/web.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ You can start a web call by calling the `.start()` function. The `start` functio
2525
1. **a string**, representing an assistant ID
2626
2. **an object**, representing a set of assistant configs (see [Create Assistant](/api-reference/assistants/create-assistant))
2727

28+
The `start` function returns a promise that resolves to a call object. For example:
29+
30+
```javascript
31+
const call = await vapi.start(assistantId);
32+
// { "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", ... }
33+
```
34+
2835
#### Passing an Assistant ID
2936

3037
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:

0 commit comments

Comments
 (0)