For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
WebsiteStatusSupportDashboard
DocumentationAPI ReferenceMCPSDKsCLI (new)What's New?
DocumentationAPI ReferenceMCPSDKsCLI (new)What's New?
  • Get started
    • Introduction
    • Phone calls
    • Web calls
    • Vapi Guides
    • Composer
    • CLI quickstart
  • Assistants
    • Quickstart
    • Tools
    • Custom keywords
    • Custom voices
    • Custom transcriber
    • Custom TTS
  • Observability
    • Boards
  • Squads
    • Quickstart
    • Overview
    • Handoff tool
    • Passing data between assistants
  • Best practices
    • Prompting guide
    • Debugging voice agents
    • Enterprise environments (DEV/UAT/PROD)
    • IVR navigation
  • Phone numbers
    • Free Vapi number
    • Inbound SMS
    • Phone Number Hooks
  • Calls
    • Call end reasons
    • Troubleshoot call errors
  • Outbound Campaigns
    • Quickstart
    • Overview
  • Chat
    • Quickstart
    • Streaming
    • Non-streaming
    • OpenAI compatibility
    • Session management
    • Variable substitution
    • SMS chat
    • Web widget
    • Webhooks
      • Setting server URLs
      • Server events
      • Spam call rejection
      • Developing locally
      • Server authentication
  • Workflows
    • Quickstart
    • Overview
LogoLogo
WebsiteStatusSupportDashboard
On this page
  • Setting Server URLs
  • URL Priority
Webhooks

Setting server URLs

Learn about where you can set server URLs to handle call events.
Was this page helpful?
Edit this page
Previous

Server events

Learn about different events that can be sent to a Server URL.
Next
Built with

Server URLs can be set at multiple levels in Vapi.

Server URLs can be set in multiple places in Vapi. Each level has a different priority.

The server URL with the highest priority for a relevant event will be the one that Vapi uses to send the event to.

Server URLs can be set at 4 levels in Vapi:

  • Account-wide: you can set a server URL for your broader account
  • Phone Number: server URLs can be attached to phone numbers themselves
  • Assistant: assistants can be configured with a server URL
  • Function: function calls themselves (under an assistant) can have a corresponding server URL

Setting Server URLs

Here’s a breakdown of where you can set server URLs in Vapi:

Organization

You can set an organization-wide server URL in the organization section of your dashboard.

Setting your organization-wide server URL.

If no other server URL is set, Vapi will use this one.

Phone Number

Phone numbers can have a server URL attached to them via the phone number API.

The server URL for phone numbers can be set 3 ways:

  • At Time of Creation: when you create a free number through Vapi
  • At Import: when you import from Twilio or Vonage
  • Via Update: you can update a number already in your account

The phone number’s server configuration includes both the URL and optional authentication:

  • phoneNumber.server.url: The webhook endpoint URL
  • phoneNumber.server.credentialId: Authentication credential ID (optional)

For secured webhooks, create Custom Credentials and reference them using credentialId.

Assistant

Assistants themselves can have a server URL attached to them.

There are 2 ways this can be done:

In the Dashboard

If you go to the assistant section of your dashboard, in the “Advanced” tab you will see a setting to set the assistant’s server URL:

Setting server URL at the assistant level.
Via the API

At assistant creation (or via an update) you can set the assistant’s server configuration.

The assistant’s server configuration includes:

  • assistant.server.url: The webhook endpoint URL
  • assistant.server.credentialId: Authentication credential ID (optional)

For secured webhooks, use Custom Credentials with credentialId instead of inline authentication.

Function Call

The most granular level server URLs can be set is at the function call level. This can also be done either in the dashboard, or via code.

In the Dashboard

In the assistant section of your dashboard, in the “Functions” tab you can add function calls & optionally give each a specific server URL:

Setting server URL at the function call level.
Via the API

Function tools can be configured with server endpoints via the tools API or within assistant configurations.

The server configuration for function tools includes:

  • tool.server.url: The function endpoint URL
  • tool.server.credentialId: Authentication credential ID (optional)

You can configure function tool servers at tool creation, assistant creation, or in updates.

Use Custom Credentials to secure your function endpoints with credentialId.

URL Priority

Events are only sent/assigned to 1 server URL in the priority stack. Here’s the order of priority:

  1. Function: if a function call has a server URL, the function call event will be sent to that URL
  2. Assistant: assistant server URLs are the next highest priority
  3. Phone Number: if a phone number has a server URL, it will be used over the account-wide URL
  4. Account-wide: Default / “lowest” importance. It will be used if no other server URL is set.

You will most commonly set a server URL on your account, and/or on specific assistants.