Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions fern/server-url/server-authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,25 @@ If you supply the server URL in your API request, your endpoint must authenticat

For webhooks sent to a server URL supplied in the API request, Vapi also strips credential fields from the payload. Any `apiKey`, `secret`, `password`, `authToken`, or similar field on the embedded `assistant`, `session`, or `chat` object arrives as the string `"[REDACTED]"` rather than its real value. The rest of the payload is unchanged.

#### Subsystem server URLs

Some webhooks go to a URL owned by a subsystem rather than to your assistant's webhook URL. Tools, knowledge bases, custom voices, dynamic handoff and transfer destinations, and custom endpointing providers each carry their own `server` block:

| Webhook | Server it is sent to |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider a one-dimensional list here, unless you feel that makes the behavior of function-call unclear

| --- | --- |
| `tool-calls`, `function-call` | the tool's |
| `knowledge-base-request` | the knowledge base's |
| `voice-request` | the custom voice's |
| `handoff-destination-request` | the handoff destination's |
| `transfer-destination-request` | the transfer destination's |
| `call.endpointing.request` | the endpointing provider's |

**These follow the assistant that carried them.** A tool on a saved assistant is org-configured and keeps your credentials. The same tool on a transient assistant or in `assistantOverrides` is caller-authored, and Vapi sends to its URL without them.

<Warning>
A saved assistant can carry a caller-authored subsystem server: if `assistantOverrides` replaces the voice, the tools, or the knowledge base, those replacements are caller-authored even though the assistant itself is saved. Give any subsystem server you supply in a request its own authentication in that block's `headers`.
</Warning>

#### Confirming a withheld send in your logs

When Vapi withholds credentials, it also writes an entry to the call's webhook logs:
Expand Down
9 changes: 8 additions & 1 deletion fern/squads/handoff/destinations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ Best for Anthropic models -- single tool with multiple destination options:

The destination is determined at runtime via the `handoff-destination-request` webhook:

<Warning>
A destination's `server` block follows the assistant carrying it. On a saved assistant it keeps your org's webhook credentials; supplied through a transient assistant or `assistantOverrides` it is caller-authored, and Vapi sends to it without them. Give it its own authentication in `server.headers`, as the examples below do. See [Server authentication](/server-url/server-authentication#subsystem-server-urls).
</Warning>

```json
{
"tools": [
Expand Down Expand Up @@ -217,7 +221,10 @@ Pass additional context to your webhook for intelligent routing:
{
"type": "dynamic",
"server": {
"url": "https://api.example.com/intelligent-routing"
"url": "https://api.example.com/intelligent-routing",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
],
Expand Down
Loading