Workflow Webhooks
Test Workflow Webhook API
Send one sample execution webhook to the workflow’s configured destination and see exactly what your server did with it.
POST
/
workflows
/
{workflow_id}
/
webhook:test
cURL
curl --request POST \
--url https://api.bolna.ai/workflows/{workflow_id}/webhook:test \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bolna.ai/workflows/{workflow_id}/webhook:test"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bolna.ai/workflows/{workflow_id}/webhook:test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bolna.ai/workflows/{workflow_id}/webhook:test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bolna.ai/workflows/{workflow_id}/webhook:test"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bolna.ai/workflows/{workflow_id}/webhook:test")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bolna.ai/workflows/{workflow_id}/webhook:test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"webhook_url": "<string>",
"workflow_version": 123,
"sample_path": [
"n_start",
"n_call1",
"n_extract",
"n_end"
],
"sample_outcome": "success",
"result": {
"delivered": true,
"http_status": 123,
"response_body": "<string>",
"error_type": "http_error",
"error": "<string>"
}
}{
"detail": {
"code": "revision_conflict",
"message": "<string>"
}
}{
"detail": {
"code": "revision_conflict",
"message": "<string>"
}
}{
"detail": {
"code": "revision_conflict",
"message": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique id of the workflow
Response
The test ran. Check result for what your server did with it.
The destination the sample was sent to.
The published version whose graph the sample was built from.
The node ids the sample trail walked, in order.
Example:
["n_start", "n_call1", "n_extract", "n_end"]
The outcome of the end node the sample path reached.
Available options:
success, failure, neutral Show child attributes
Show child attributes
Was this page helpful?
⌘I
cURL
curl --request POST \
--url https://api.bolna.ai/workflows/{workflow_id}/webhook:test \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bolna.ai/workflows/{workflow_id}/webhook:test"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bolna.ai/workflows/{workflow_id}/webhook:test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bolna.ai/workflows/{workflow_id}/webhook:test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bolna.ai/workflows/{workflow_id}/webhook:test"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bolna.ai/workflows/{workflow_id}/webhook:test")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bolna.ai/workflows/{workflow_id}/webhook:test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"webhook_url": "<string>",
"workflow_version": 123,
"sample_path": [
"n_start",
"n_call1",
"n_extract",
"n_end"
],
"sample_outcome": "success",
"result": {
"delivered": true,
"http_status": 123,
"response_body": "<string>",
"error_type": "http_error",
"error": "<string>"
}
}{
"detail": {
"code": "revision_conflict",
"message": "<string>"
}
}{
"detail": {
"code": "revision_conflict",
"message": "<string>"
}
}{
"detail": {
"code": "revision_conflict",
"message": "<string>"
}
}
