How Webhook works
Your external system sends an authenticatedPOST request to the generated webhook URL. Phonely stores the payload for the specified agent and caller phone number.
When an incoming call matches that agent and phone number, the Webhook block loads the payload before the flow trigger runs. Fields discovered during a successful block test become variables for the trigger and later blocks.
Send the request before the call reaches Phonely whenever possible. If the request and call may arrive at nearly the same time, configure a short fallback wait.
Send data to the webhook
Open the block’s Configure step to copy its webhook URL, API key, or sample cURL command. Send aPOST request with a JSON body and the API key in the X-Authorization header.
The request body requires:
Add each value you want to use in the flow as another top-level field:
null; nested objects and arrays are not accepted.
Test and create variables
The block test discovers the payload fields and creates variables for later blocks to use.- Open the Test step and select Test.
- Within one minute, send a
POSTrequest to the webhook using representative field names and safe sample values. - Confirm that the fields appear under Fields from the webhook.
Configure the fallback wait
Under Advanced Settings, Time Wait Before Fallback controls how long the block checks for data after the call begins:- At
0seconds, the block checks once and continues immediately if no matching payload is available. - From
1to5seconds, the block continues checking for the payload until the configured time expires.
Verify the live behavior
Use a phone number you control:- Send the payload with the agent’s ID and the phone number you will call from.
- Place an inbound call to the agent from that number.
- Confirm that the flow follows the expected route and that later blocks receive the Webhook values.
Troubleshooting
The test does not detect any fields
The test does not detect any fields
Select Test before sending the request and send it within one minute. Confirm that the request uses
POST, includes the copied API key in X-Authorization, and contains both agentId and phoneNumber.A payload field is not available as a variable
A payload field is not available as a variable
Include the field in a successful block test. Use a top-level field with a text, number, boolean, or
null value; nested objects and arrays are not accepted. If the field set changed, test again and update any affected references.The call does not receive the webhook data
The call does not receive the webhook data
Confirm that
agentId identifies the agent receiving the call and that phoneNumber matches the number used to place it. Send the payload before the call, or increase Time Wait Before Fallback slightly when the two events can occur at nearly the same time.The call takes too long to begin
The call takes too long to begin
Reduce Time Wait Before Fallback or send the payload earlier. Use a nonzero wait only when the external system cannot reliably send the data before the call starts.

