Skip to content

Commit

Permalink
Added documentation on the return value of the start function
Browse files Browse the repository at this point in the history
  • Loading branch information
MattPoetker authored Nov 13, 2024
1 parent 8b8b034 commit 6edeb45
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fern/sdk/web.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 6edeb45

Please sign in to comment.