Call a webhook and wait
curl --request POST \
--url https://api.example.com/api/v1/automation/webhooks/{flowId}/sync \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/automation/webhooks/{flowId}/sync"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/automation/webhooks/{flowId}/sync', 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.example.com/api/v1/automation/webhooks/{flowId}/sync",
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.example.com/api/v1/automation/webhooks/{flowId}/sync"
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.example.com/api/v1/automation/webhooks/{flowId}/sync")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/automation/webhooks/{flowId}/sync")
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_bodyCall a webhook and wait
Start a flow and wait up to 30 seconds for its answer, which the Respond to webhook step sets with its own status and body.
POST
/
api
/
v1
/
automation
/
webhooks
/
{flowId}
/
sync
Call a webhook and wait
curl --request POST \
--url https://api.example.com/api/v1/automation/webhooks/{flowId}/sync \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/automation/webhooks/{flowId}/sync"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/automation/webhooks/{flowId}/sync', 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.example.com/api/v1/automation/webhooks/{flowId}/sync",
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.example.com/api/v1/automation/webhooks/{flowId}/sync"
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.example.com/api/v1/automation/webhooks/{flowId}/sync")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/automation/webhooks/{flowId}/sync")
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_bodyStarts a run like Call a webhook and waits for the answer.
The body of the answer is limited to 1 MB. The other statuses are the same as for the call without waiting:
See Webhooks for the step that sets the answer.
GET works the same way. No token is needed; the flow id in the address is the credential.
Answers
| Case | Answer |
|---|---|
| The flow runs a Respond to webhook step | The status of that step, with { "data": <body> }. |
| The run ends without that step | 200 with { "data": { "runId": "...", "status": "SUCCEEDED" } }. |
| The run is still going after 30 seconds | 202 with { "data": { "runId": "...", "state": "PENDING" } }. The run goes on. |
404, 410, 413 and 429.
curl -X POST "https://your-instance/api/v1/automation/webhooks/cm1abc/sync" \
-H "Content-Type: application/json" \
-d '{"order": 4711}'
Last modified on October 26, 2026