curl --request POST \
--url https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/condition-code/dry-run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enrollment_id": 123,
"branch_code": {
"language": "python",
"code": "",
"include_call_variables": false
},
"branches": [
{}
]
}
'import requests
url = "https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/condition-code/dry-run"
payload = {
"enrollment_id": 123,
"branch_code": {
"language": "python",
"code": "",
"include_call_variables": False
},
"branches": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enrollment_id: 123,
branch_code: {language: 'python', code: '', include_call_variables: false},
branches: [{}]
})
};
fetch('https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/condition-code/dry-run', 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.peachdeskai.com/api/v1/sequences/{sequence_id}/condition-code/dry-run",
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([
'enrollment_id' => 123,
'branch_code' => [
'language' => 'python',
'code' => '',
'include_call_variables' => false
],
'branches' => [
[
]
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/condition-code/dry-run"
payload := strings.NewReader("{\n \"enrollment_id\": 123,\n \"branch_code\": {\n \"language\": \"python\",\n \"code\": \"\",\n \"include_call_variables\": false\n },\n \"branches\": [\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))
}HttpResponse<String> response = Unirest.post("https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/condition-code/dry-run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enrollment_id\": 123,\n \"branch_code\": {\n \"language\": \"python\",\n \"code\": \"\",\n \"include_call_variables\": false\n },\n \"branches\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/condition-code/dry-run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enrollment_id\": 123,\n \"branch_code\": {\n \"language\": \"python\",\n \"code\": \"\",\n \"include_call_variables\": false\n },\n \"branches\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"branch_key": "<string>",
"branch_label": "<string>",
"returned_branch": "<string>",
"fell_to_default": false,
"duration_ms": 0,
"error": "<string>",
"inputs": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Dry Run Condition Code
Report which branch one real lead would take, changing nothing.
Returns the inputs as well as the answer: an operator debugging a branch needs to see what the snippet saw, and a missing CSV column is the single commonest cause of a lead landing somewhere surprising. Values are returned because the operator chose this row; the persisted record carries none.
curl --request POST \
--url https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/condition-code/dry-run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enrollment_id": 123,
"branch_code": {
"language": "python",
"code": "",
"include_call_variables": false
},
"branches": [
{}
]
}
'import requests
url = "https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/condition-code/dry-run"
payload = {
"enrollment_id": 123,
"branch_code": {
"language": "python",
"code": "",
"include_call_variables": False
},
"branches": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enrollment_id: 123,
branch_code: {language: 'python', code: '', include_call_variables: false},
branches: [{}]
})
};
fetch('https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/condition-code/dry-run', 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.peachdeskai.com/api/v1/sequences/{sequence_id}/condition-code/dry-run",
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([
'enrollment_id' => 123,
'branch_code' => [
'language' => 'python',
'code' => '',
'include_call_variables' => false
],
'branches' => [
[
]
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/condition-code/dry-run"
payload := strings.NewReader("{\n \"enrollment_id\": 123,\n \"branch_code\": {\n \"language\": \"python\",\n \"code\": \"\",\n \"include_call_variables\": false\n },\n \"branches\": [\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))
}HttpResponse<String> response = Unirest.post("https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/condition-code/dry-run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enrollment_id\": 123,\n \"branch_code\": {\n \"language\": \"python\",\n \"code\": \"\",\n \"include_call_variables\": false\n },\n \"branches\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/condition-code/dry-run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enrollment_id\": 123,\n \"branch_code\": {\n \"language\": \"python\",\n \"code\": \"\",\n \"include_call_variables\": false\n },\n \"branches\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"branch_key": "<string>",
"branch_label": "<string>",
"returned_branch": "<string>",
"fell_to_default": false,
"duration_ms": 0,
"error": "<string>",
"inputs": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Interactive user session: the login JWT, sent as Authorization: Bearer <token>.
Path Parameters
Body
Try a candidate branch snippet against one real enrollment.
branches comes from the builder rather than storage because the
operator may be editing labels and the snippet together, and previewing
against the saved branches would report a stale answer.
A code-mode CONDITION's snippet.
No strict field, deliberately: a condition places no call, so there is
nothing to protect by blocking the lead. Every failure routes to Default,
exactly as an unmatched catalog condition already does.
Show child attributes
Show child attributes

