curl --request POST \
--url https://api.leadping.ai/automations/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"automation": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"enabled": true,
"organizationId": "<string>",
"createdByUserId": "<string>",
"scope": "<string>",
"visibility": "<string>",
"managementLevel": "<string>",
"isSystemManaged": true,
"triggers": [
{
"id": "<string>",
"type": "<string>",
"displayName": "<string>",
"isEnabled": true,
"settings": {}
}
],
"conditionGroups": [
{
"id": "<string>",
"mode": "<string>",
"conditions": [
{
"id": "<string>",
"type": "<string>",
"operator": "<string>",
"isEnabled": true,
"settings": {}
}
]
}
],
"actions": [
{
"id": "<string>",
"type": "<string>",
"order": 123,
"isEnabled": true,
"settings": {}
}
],
"connections": [
{
"id": "<string>",
"sourceNodeId": "<string>",
"targetNodeId": "<string>",
"weight": 123
}
]
}
}
'import requests
url = "https://api.leadping.ai/automations/preview"
payload = { "automation": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"enabled": True,
"organizationId": "<string>",
"createdByUserId": "<string>",
"scope": "<string>",
"visibility": "<string>",
"managementLevel": "<string>",
"isSystemManaged": True,
"triggers": [
{
"id": "<string>",
"type": "<string>",
"displayName": "<string>",
"isEnabled": True,
"settings": {}
}
],
"conditionGroups": [
{
"id": "<string>",
"mode": "<string>",
"conditions": [
{
"id": "<string>",
"type": "<string>",
"operator": "<string>",
"isEnabled": True,
"settings": {}
}
]
}
],
"actions": [
{
"id": "<string>",
"type": "<string>",
"order": 123,
"isEnabled": True,
"settings": {}
}
],
"connections": [
{
"id": "<string>",
"sourceNodeId": "<string>",
"targetNodeId": "<string>",
"weight": 123
}
]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.leadping.ai/automations/preview");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"automation\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"organizationId\": \"<string>\",\n \"createdByUserId\": \"<string>\",\n \"scope\": \"<string>\",\n \"visibility\": \"<string>\",\n \"managementLevel\": \"<string>\",\n \"isSystemManaged\": true,\n \"triggers\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"displayName\": \"<string>\",\n \"isEnabled\": true,\n \"settings\": {}\n }\n ],\n \"conditionGroups\": [\n {\n \"id\": \"<string>\",\n \"mode\": \"<string>\",\n \"conditions\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"operator\": \"<string>\",\n \"isEnabled\": true,\n \"settings\": {}\n }\n ]\n }\n ],\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"order\": 123,\n \"isEnabled\": true,\n \"settings\": {}\n }\n ],\n \"connections\": [\n {\n \"id\": \"<string>\",\n \"sourceNodeId\": \"<string>\",\n \"targetNodeId\": \"<string>\",\n \"weight\": 123\n }\n ]\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://api.leadping.ai/automations/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"automation\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"organizationId\": \"<string>\",\n \"createdByUserId\": \"<string>\",\n \"scope\": \"<string>\",\n \"visibility\": \"<string>\",\n \"managementLevel\": \"<string>\",\n \"isSystemManaged\": true,\n \"triggers\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"displayName\": \"<string>\",\n \"isEnabled\": true,\n \"settings\": {}\n }\n ],\n \"conditionGroups\": [\n {\n \"id\": \"<string>\",\n \"mode\": \"<string>\",\n \"conditions\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"operator\": \"<string>\",\n \"isEnabled\": true,\n \"settings\": {}\n }\n ]\n }\n ],\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"order\": 123,\n \"isEnabled\": true,\n \"settings\": {}\n }\n ],\n \"connections\": [\n {\n \"id\": \"<string>\",\n \"sourceNodeId\": \"<string>\",\n \"targetNodeId\": \"<string>\",\n \"weight\": 123\n }\n ]\n }\n}")
.asString();const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
automation: {
id: '<string>',
name: '<string>',
description: '<string>',
enabled: true,
organizationId: '<string>',
createdByUserId: '<string>',
scope: '<string>',
visibility: '<string>',
managementLevel: '<string>',
isSystemManaged: true,
triggers: [
{
id: '<string>',
type: '<string>',
displayName: '<string>',
isEnabled: true,
settings: {}
}
],
conditionGroups: [
{
id: '<string>',
mode: '<string>',
conditions: [
{
id: '<string>',
type: '<string>',
operator: '<string>',
isEnabled: true,
settings: {}
}
]
}
],
actions: [{id: '<string>', type: '<string>', order: 123, isEnabled: true, settings: {}}],
connections: [
{
id: '<string>',
sourceNodeId: '<string>',
targetNodeId: '<string>',
weight: 123
}
]
}
})
};
fetch('https://api.leadping.ai/automations/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.leadping.ai/automations/preview"
payload := strings.NewReader("{\n \"automation\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"organizationId\": \"<string>\",\n \"createdByUserId\": \"<string>\",\n \"scope\": \"<string>\",\n \"visibility\": \"<string>\",\n \"managementLevel\": \"<string>\",\n \"isSystemManaged\": true,\n \"triggers\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"displayName\": \"<string>\",\n \"isEnabled\": true,\n \"settings\": {}\n }\n ],\n \"conditionGroups\": [\n {\n \"id\": \"<string>\",\n \"mode\": \"<string>\",\n \"conditions\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"operator\": \"<string>\",\n \"isEnabled\": true,\n \"settings\": {}\n }\n ]\n }\n ],\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"order\": 123,\n \"isEnabled\": true,\n \"settings\": {}\n }\n ],\n \"connections\": [\n {\n \"id\": \"<string>\",\n \"sourceNodeId\": \"<string>\",\n \"targetNodeId\": \"<string>\",\n \"weight\": 123\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leadping.ai/automations/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'automation' => [
'id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'enabled' => true,
'organizationId' => '<string>',
'createdByUserId' => '<string>',
'scope' => '<string>',
'visibility' => '<string>',
'managementLevel' => '<string>',
'isSystemManaged' => true,
'triggers' => [
[
'id' => '<string>',
'type' => '<string>',
'displayName' => '<string>',
'isEnabled' => true,
'settings' => [
]
]
],
'conditionGroups' => [
[
'id' => '<string>',
'mode' => '<string>',
'conditions' => [
[
'id' => '<string>',
'type' => '<string>',
'operator' => '<string>',
'isEnabled' => true,
'settings' => [
]
]
]
]
],
'actions' => [
[
'id' => '<string>',
'type' => '<string>',
'order' => 123,
'isEnabled' => true,
'settings' => [
]
]
],
'connections' => [
[
'id' => '<string>',
'sourceNodeId' => '<string>',
'targetNodeId' => '<string>',
'weight' => 123
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"triggerType": "<string>",
"samplePayload": {},
"validation": {
"errors": [
"<string>"
],
"warnings": [
"<string>"
]
},
"conditionResults": [
{
"conditionId": "<string>",
"summary": "<string>",
"passed": true
}
],
"actionResults": [
{
"actionId": "<string>",
"summary": "<string>",
"renderedOutput": "<string>",
"wouldHaveSideEffect": true,
"warnings": [
"<string>"
]
}
],
"warnings": [
"<string>"
]
}{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Forbidden",
"status": 403,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "The request could not be completed."
}Preview a lead follow-up automation
Previews automation execution for a sample lead, showing matched steps and messages without creating follow-up events.
Set validate_only to return configuration validation without evaluating conditions or actions and without writing a test audit event.
curl --request POST \
--url https://api.leadping.ai/automations/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"automation": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"enabled": true,
"organizationId": "<string>",
"createdByUserId": "<string>",
"scope": "<string>",
"visibility": "<string>",
"managementLevel": "<string>",
"isSystemManaged": true,
"triggers": [
{
"id": "<string>",
"type": "<string>",
"displayName": "<string>",
"isEnabled": true,
"settings": {}
}
],
"conditionGroups": [
{
"id": "<string>",
"mode": "<string>",
"conditions": [
{
"id": "<string>",
"type": "<string>",
"operator": "<string>",
"isEnabled": true,
"settings": {}
}
]
}
],
"actions": [
{
"id": "<string>",
"type": "<string>",
"order": 123,
"isEnabled": true,
"settings": {}
}
],
"connections": [
{
"id": "<string>",
"sourceNodeId": "<string>",
"targetNodeId": "<string>",
"weight": 123
}
]
}
}
'import requests
url = "https://api.leadping.ai/automations/preview"
payload = { "automation": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"enabled": True,
"organizationId": "<string>",
"createdByUserId": "<string>",
"scope": "<string>",
"visibility": "<string>",
"managementLevel": "<string>",
"isSystemManaged": True,
"triggers": [
{
"id": "<string>",
"type": "<string>",
"displayName": "<string>",
"isEnabled": True,
"settings": {}
}
],
"conditionGroups": [
{
"id": "<string>",
"mode": "<string>",
"conditions": [
{
"id": "<string>",
"type": "<string>",
"operator": "<string>",
"isEnabled": True,
"settings": {}
}
]
}
],
"actions": [
{
"id": "<string>",
"type": "<string>",
"order": 123,
"isEnabled": True,
"settings": {}
}
],
"connections": [
{
"id": "<string>",
"sourceNodeId": "<string>",
"targetNodeId": "<string>",
"weight": 123
}
]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.leadping.ai/automations/preview");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"automation\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"organizationId\": \"<string>\",\n \"createdByUserId\": \"<string>\",\n \"scope\": \"<string>\",\n \"visibility\": \"<string>\",\n \"managementLevel\": \"<string>\",\n \"isSystemManaged\": true,\n \"triggers\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"displayName\": \"<string>\",\n \"isEnabled\": true,\n \"settings\": {}\n }\n ],\n \"conditionGroups\": [\n {\n \"id\": \"<string>\",\n \"mode\": \"<string>\",\n \"conditions\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"operator\": \"<string>\",\n \"isEnabled\": true,\n \"settings\": {}\n }\n ]\n }\n ],\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"order\": 123,\n \"isEnabled\": true,\n \"settings\": {}\n }\n ],\n \"connections\": [\n {\n \"id\": \"<string>\",\n \"sourceNodeId\": \"<string>\",\n \"targetNodeId\": \"<string>\",\n \"weight\": 123\n }\n ]\n }\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.post("https://api.leadping.ai/automations/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"automation\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"organizationId\": \"<string>\",\n \"createdByUserId\": \"<string>\",\n \"scope\": \"<string>\",\n \"visibility\": \"<string>\",\n \"managementLevel\": \"<string>\",\n \"isSystemManaged\": true,\n \"triggers\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"displayName\": \"<string>\",\n \"isEnabled\": true,\n \"settings\": {}\n }\n ],\n \"conditionGroups\": [\n {\n \"id\": \"<string>\",\n \"mode\": \"<string>\",\n \"conditions\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"operator\": \"<string>\",\n \"isEnabled\": true,\n \"settings\": {}\n }\n ]\n }\n ],\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"order\": 123,\n \"isEnabled\": true,\n \"settings\": {}\n }\n ],\n \"connections\": [\n {\n \"id\": \"<string>\",\n \"sourceNodeId\": \"<string>\",\n \"targetNodeId\": \"<string>\",\n \"weight\": 123\n }\n ]\n }\n}")
.asString();const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
automation: {
id: '<string>',
name: '<string>',
description: '<string>',
enabled: true,
organizationId: '<string>',
createdByUserId: '<string>',
scope: '<string>',
visibility: '<string>',
managementLevel: '<string>',
isSystemManaged: true,
triggers: [
{
id: '<string>',
type: '<string>',
displayName: '<string>',
isEnabled: true,
settings: {}
}
],
conditionGroups: [
{
id: '<string>',
mode: '<string>',
conditions: [
{
id: '<string>',
type: '<string>',
operator: '<string>',
isEnabled: true,
settings: {}
}
]
}
],
actions: [{id: '<string>', type: '<string>', order: 123, isEnabled: true, settings: {}}],
connections: [
{
id: '<string>',
sourceNodeId: '<string>',
targetNodeId: '<string>',
weight: 123
}
]
}
})
};
fetch('https://api.leadping.ai/automations/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.leadping.ai/automations/preview"
payload := strings.NewReader("{\n \"automation\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"enabled\": true,\n \"organizationId\": \"<string>\",\n \"createdByUserId\": \"<string>\",\n \"scope\": \"<string>\",\n \"visibility\": \"<string>\",\n \"managementLevel\": \"<string>\",\n \"isSystemManaged\": true,\n \"triggers\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"displayName\": \"<string>\",\n \"isEnabled\": true,\n \"settings\": {}\n }\n ],\n \"conditionGroups\": [\n {\n \"id\": \"<string>\",\n \"mode\": \"<string>\",\n \"conditions\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"operator\": \"<string>\",\n \"isEnabled\": true,\n \"settings\": {}\n }\n ]\n }\n ],\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"order\": 123,\n \"isEnabled\": true,\n \"settings\": {}\n }\n ],\n \"connections\": [\n {\n \"id\": \"<string>\",\n \"sourceNodeId\": \"<string>\",\n \"targetNodeId\": \"<string>\",\n \"weight\": 123\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leadping.ai/automations/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'automation' => [
'id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'enabled' => true,
'organizationId' => '<string>',
'createdByUserId' => '<string>',
'scope' => '<string>',
'visibility' => '<string>',
'managementLevel' => '<string>',
'isSystemManaged' => true,
'triggers' => [
[
'id' => '<string>',
'type' => '<string>',
'displayName' => '<string>',
'isEnabled' => true,
'settings' => [
]
]
],
'conditionGroups' => [
[
'id' => '<string>',
'mode' => '<string>',
'conditions' => [
[
'id' => '<string>',
'type' => '<string>',
'operator' => '<string>',
'isEnabled' => true,
'settings' => [
]
]
]
]
],
'actions' => [
[
'id' => '<string>',
'type' => '<string>',
'order' => 123,
'isEnabled' => true,
'settings' => [
]
]
],
'connections' => [
[
'id' => '<string>',
'sourceNodeId' => '<string>',
'targetNodeId' => '<string>',
'weight' => 123
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"triggerType": "<string>",
"samplePayload": {},
"validation": {
"errors": [
"<string>"
],
"warnings": [
"<string>"
]
},
"conditionResults": [
{
"conditionId": "<string>",
"summary": "<string>",
"passed": true
}
],
"actionResults": [
{
"actionId": "<string>",
"summary": "<string>",
"renderedOutput": "<string>",
"wouldHaveSideEffect": true,
"warnings": [
"<string>"
]
}
],
"warnings": [
"<string>"
]
}{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Forbidden",
"status": 403,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "The request could not be completed."
}Authorizations
Authorization header using the Bearer scheme. Accepted values are Leadping user JWT access tokens and WorkOS organization API keys beginning with sk_.
Query Parameters
When true, validates the automation without evaluating actions or writing an audit event.
Body
The automation preview request payload for the operation.
Response
Returns the automation preview response.
Describes automation preview data returned by Leadping.
Automation trigger type that starts the workflow.
Example payload clients can use to understand this automation preview response format.
Show child attributes
Show child attributes
Validation result returned for the automation configuration.
Show child attributes
Show child attributes
Condition evaluation results returned by the automation preview.
Show child attributes
Show child attributes
Action preview results showing what the automation would do.
Show child attributes
Show child attributes
Warnings returned for this automation preview response that do not necessarily block processing.

