Fonio

Webhooks, HTTP Request and Outbound API: Common errors

Solutions for missing webhook data, HTTP Requests that don't run and errors when starting outbound calls.

Webhooks and API requests can run at different points of a call:

FeatureWhenTypical use
Inbound WebhookBefore an incoming conversationLoad customer data based on the phone number
HTTP RequestBefore, during or after a conversationQuery data, trigger actions or transfer conversation data
Outbound APIBefore the conversationStart an outbound call from an external system

Inbound Webhook data does not appear in the call

Possible causes

  • The endpoint was not reached.
  • The response took longer than five seconds.
  • The endpoint did not return valid JSON.
  • The variable name does not match the field in the response.
  • The variable was not inserted correctly in the prompt or the start message.

Solution

First check your endpoint's logs to see whether the request arrived. The response must come back within five seconds and contain valid JSON.

Example:

{
  "name": "Isabella",
  "customerId": "K-1042",
  "contractStatus": "Active"
}

You can then use these values like this:

Hello {{name}}, great to hear from you again.

Make sure the spelling matches exactly. If your endpoint returns customerId, the variable must also be called {{customerId}}.

Important

The returned data comes from your endpoint's JSON response. The header is not responsible for this. Only use the header for information such as authorization or the Content-Type.

Example of a header:

{
  "Authorization": "Bearer YOUR_API_KEY",
  "Content-Type": "application/json"
}

The Inbound Webhook is not called at all

Check these points:

  • Is the Inbound Webhook enabled and saved?
  • Is the webhook URL complete and publicly accessible?
  • Is the correct method selected? The Inbound Webhook supports GET and POST.
  • Does your endpoint accept requests from fonio?
  • Are you testing with a real incoming call?

If you use a firewall or IP allowlist, allow these IP addresses:

  • 128.140.42.143
  • 128.140.34.113
  • 167.233.91.1
  • 167.233.75.149
  • 178.105.222.76

Tip

Check your endpoint's logs first. If no request appears there, the problem is usually the URL, the firewall or the activation in fonio.

Inbound data is missing in a later HTTP Request

Values from the Inbound Webhook are kept for the entire call. For an HTTP Request after the conversation, you use the Inbound Context for this.

Example:

{{inboundContext.customerId}}

This lets you pass IDs, contract data or other values back to your CRM unchanged.

Inbound Context or custom variable?

Use {{inboundContext.*}} for values from your own system. Custom variables in an integration, on the other hand, are determined from the conversation and can be interpreted by the AI.

HTTP Request during the conversation does not run

The former during-call webhooks are now set up as an HTTP Request.

First check the execution:

  • Under Run, During the conversation must be selected.
  • The condition goes directly into the field When should the AI use this?
  • The integration must be enabled and saved.
  • Check whether the selected opening hours allow it to run.

A good condition is short and unambiguous:

Run this HTTP Request if the caller asks about the current status of their order and has given an order number.

An unclear condition can cause the function not to be used at all or to be used too early:

Use for questions about orders.

The condition does not belong in the prompt

The prompt controls the conversation. You set when the HTTP Request runs directly in the integration.

Then check your endpoint's logs. For a smooth conversation, the response should ideally come back in less than two seconds.

Under Advanced, you can set what your assistant should say in the meantime:

Please hold on a moment, I'll look that up for you.

The HTTP Request runs but returns no usable data

Check your endpoint's response. It should return a successful HTTP status and valid JSON.

Example:

{
  "orderStatus": "Out for delivery",
  "deliveryDate": "02.10.2026"
}

Also check:

  • Do the field names match the variables used?
  • Is the response actually JSON and not HTML or plain text?
  • Does the endpoint require an API key or additional headers?
  • Is the response smaller than 96,000 characters?

HTTP Request after the conversation contains empty variables

Custom variables are created directly in the HTTP Request, not in the prompt and no longer under Technical.

Insert the variable using Add Variable and then set:

  • What the variable is called
  • Whether it is of type String, Number or Boolean
  • Which information from the conversation should be captured

Example:

Variable: {{order_number}}
Type: String
Description: The order number the caller mentioned during the conversation.

For existing system values, use the matching standard variables. For example, you don't need to extract the caller's phone number from the conversation again.

{{personNumber}}
{{conversationId}}
{{conversationLink}}

Then make a test call and check in the call history whether the variable was captured.

HTTP Request after the conversation does not run

Under Run, check whether After the conversation is selected.

Then check the condition:

Run this request if the caller has arranged a callback.

If the condition field is left empty, the request runs after every matching call.

Also check:

  • Is the integration enabled and saved?
  • Is the URL reachable?
  • Are the header and body valid JSON?
  • Are all variables used available?
  • Is execution restricted by opening hours?

Outbound API returns an error when starting the call

For outbound calls, a POST request is sent to this endpoint:

https://app.fonio.ai/api/public/v1/outbound_call

Example:

{
  "apiKey": "YOUR_API_KEY",
  "fromNumber": "+43123456789",
  "toNumber": "+436641234567",
  "agentId": "YOUR_AGENT_ID",
  "context": {
    "name": "John Smith",
    "customerId": "K-1042"
  }
}

Pay particular attention to these details:

  • apiKey contains a valid API key.
  • fromNumber is set up for outbound calls.
  • toNumber contains the complete destination number.
  • agentId belongs to the correct assistant.
  • Both phone numbers are in international E.164 format.
  • Your account is enabled for outbound calls and verification has been completed.

Alternatively, you can send the API key in the header:

{
  "Authorization": "Bearer YOUR_API_KEY"
}

Protect your API key

Never include your API key in screenshots, public logs or support articles. If a key has been exposed, create a new one under API Keys.

You can find the full endpoints and payloads in our API documentation.

Context variables from the Outbound API do not appear

You can use values from context in the prompt or the start message.

If you send this context:

{
  "context": {
    "name": "John Smith",
    "appointmentDate": "02.10.2026"
  }
}

you use the values like this:

Hello {{name}}, I'm calling about your appointment on {{appointmentDate}}.

Pay attention to the exact spelling of the variables. appointmentDate and appointment_date are two different field names.

For a test call without the API, you can store the same values under Test Context.

How to test the connection

  1. Run a test with as few variables as possible.
  2. Check whether the request appears in your endpoint's logs.
  3. Check the HTTP status, response time and response body.
  4. Then test with a real call.
  5. Only add more variables once the simple request works.

If you contact us

Send us these details directly at support@fonio.ai:

  • Email address of your fonio account
  • Name of the assistant
  • Date and exact time of the test call
  • Conversation link or Conversation ID
  • Method used and domain of the endpoint
  • HTTP status and cleaned-up response from your logs
  • Whether it concerns the Inbound Webhook, HTTP Request or Outbound API

Remove sensitive data

Do not send us API keys, passwords or complete login credentials. Remove this information from screenshots, payloads and logs.