[Urgent] Header is not sent in API Request tool
# support
r
I have a tool call of API request type that was working fine on my Vapi account , when I deployed it on my client Vapi account and changed the server URL of this API request tool to his production server hosted on AWS , the header defined is not being sent although it was sent correctly on my Vapi account Call ID : 019a3002-f30d-7ff2-a987-e38586d54fc8
v
Thanks for sharing the details. To help diagnose why the header is not being sent after changing the server URL, could you confirm if you have set up and selected the correct credential (with the required header) in your client's Vapi account tool configuration? This will help determine if the issue is with credential setup or something else. Sources: - [Server authentication](https://docs.vapi.ai/server-url/server-authentication) - [Changelog: Enhanced Authentication & Custom Credentials](https://docs.vapi.ai/changelog/2025/8/30)
r
The tool is called during the Call/chat and sent from Vapi successfully and received successfully by the backend connected server but without the header defined in the API request tool in Vapi @Vapi Support Bot
The sent header is not for Authentication so far
v
To ensure your header is sent in the API Request tool, create a Custom Credential in your client's Vapi account and assign it to the tool using
credentialId
.
Example:
Copy code
json
{
  "server": {
    "url": "https://your-client-api.com/endpoint",
    "credentialId": "cred_your_custom_id"
  }
}
Make sure the credential includes your header name and value. This will ensure Vapi sends the header with every request. See: [Server authentication – Using credentials in tools](https://docs.vapi.ai/server-url/server-authentication) Source: - [Server authentication](https://docs.vapi.ai/server-url/server-authentication)
r
The header that is not being sent is not related to Authentication so far I am using it as a flag @Vapi Support Bot
v
Thanks for clarifying that the header is used as a flag. To help pinpoint the issue: Have you created a Custom Credential in your client's Vapi account that includes this specific header (with its name and value), and assigned it to the API Request tool using the
credentialId
field? This step is required for Vapi to send any custom header, even if it's not for authentication ([see documentation](https://docs.vapi.ai/server-url/server-authentication)). Source: - [Server authentication](https://docs.vapi.ai/server-url/server-authentication)
r
No i have not created custom credential in my client Vapi account altough in my Vapi account but it`s sent successfuly from my account without defining custom crednetial !! @Vapi Support Bot
v
To ensure your custom header (even if it's just a flag) is sent in your client's Vapi account, you must create a Custom Credential that includes the header and assign it to the API Request tool using the
credentialId
field. This is now required for all custom headers, regardless of their purpose. Example:
Copy code
json
{
  "server": {
    "url": "https://your-client-api.com/endpoint",
    "credentialId": "cred_your_custom_id"
  }
}
Be sure to define the header in the credential itself. This step is necessary even if it worked differently in your own account before. [See documentation](https://docs.vapi.ai/server-url/server-authentication) Source: - [Server authentication](https://docs.vapi.ai/server-url/server-authentication)
a
@Ramy use the Custom Function Tool rather than API Request if you're using it to make API calls for backend workflows/sending data.
r
Thanks dear @Adrian for your message but could you know the reason behind my problem or face similar situations ?
c
Hi Ramy, If you're experiencing that your tools aren't triggering, consider starting with these troubleshooting steps: 1. Check Prompting and Schema: Ensure your assistant's prompts are specific and refer to the exact tool name you intend to trigger, such as the full tool name in your instructions [more details here](https://docs.vapi.ai/tools/custom-tools-troubleshooting). 2. Response Format: Make sure your webhook returns the correct JSON structure. Responses should be within a
results
array and must use single-line strings. Always return an HTTP 200 status [details can be found here](https://docs.vapi.ai/tools/custom-tools-troubleshooting). 3. Parameter Verification: Ensure all required parameters are included and strictly validated in your tool schema. Add
strict: true
to catch validation errors early [read more here](https://docs.vapi.ai/tools/custom-tools-troubleshooting). 4. **ToolCallId**: Ensure the
toolCallId
in your response exactly matches the one in the request to avoid mismatch errors. 5. Token Limits: If your responses are getting cut off, increase the
maxTokens
parameter for complex tools up to 500 [further guidance here](https://docs.vapi.ai/tools/custom-tools-troubleshooting). Following the above steps should help diagnose common issues with your API tools. If specific error logs are available, they might provide additional insights.
5 Views