endCallFunctionEnabled
# support
j
Hi team, my team creates agents via API but are running into issues enabling the default End Call Function. The agent looks like it uses the endCallFunctionEnabled flag however this is not in the API docs, and it doens't appear to be another way of enabling this toggle. I have this already: "model": { "model": "gpt-4.1", "tools": [ { "type": "endCall" } ], Is endCallFunctionEnabled a secret field that can still be used?
v
To enable the End Call function, simply include the following in your assistant's model configuration:
Copy code
json
"tools": [
  { "type": "endCall" }
]
The
endCallFunctionEnabled
field is deprecated and not required—using the
tools
array as shown above is the current, supported approach.
For more details, see the [Default Tools documentation](https://docs.vapi.ai/tools/default-tools). Source: - [Default Tools documentation](https://docs.vapi.ai/tools/default-tools)
c
Hi bobbychick, To programmatically end a call using the Vapi API, you can use the
end-call
message type in the
ClientInboundMessage
. Simply set the
type
property to
"end-call"
when sending inbound messages to end the call. For more details, you can refer to the [update documentation](https://docs.vapi.ai/changelog/2025/1/14). If you encounter a specific call end reason you want to handle, such as the new
pipeline-error-eleven-labs-vapi-voice-disabled-by-owner
, your application can be updated to react appropriately. This is detailed in the [June 9, 2025 update](https://docs.vapi.ai/changelog/2025/6/9). For a comprehensive list of possible call end reasons, you can check the [end reason codes documentation](https://docs.vapi.ai/calls/call-ended-reason).
j
Hey Aniah, for clarity we don't want to end the call upon a specific message spoken but rather enable the tool for the agent. The agent is prompted information for when to end the call
c
Attaching an
endCall
tool is essentially the same as enabling the
endCallFunctionEnabled
property. The current best practice is to attach the tool directly in your assistant’s configuration, and then configure it as needed for your use case. This ensures compatibility with the latest API updates and gives you more flexibility in managing when and how the call should be ended.
2 Views