Create workflow run with prospect
curl --request POST \
--url https://v2-nova-api.prod.czmx.in/api/org/{org_id}/workflow-runs \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"prospect": {
"phone": "<string>",
"country": "<string>",
"custom_data": {},
"email": "<string>",
"external_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"timezone": "<string>"
},
"workflow_id": "<string>",
"scheduled_at": "<string>"
}
'import requests
url = "https://v2-nova-api.prod.czmx.in/api/org/{org_id}/workflow-runs"
payload = {
"prospect": {
"phone": "<string>",
"country": "<string>",
"custom_data": {},
"email": "<string>",
"external_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"timezone": "<string>"
},
"workflow_id": "<string>",
"scheduled_at": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prospect: {
phone: '<string>',
country: '<string>',
custom_data: {},
email: '<string>',
external_id: '<string>',
first_name: '<string>',
last_name: '<string>',
timezone: '<string>'
},
workflow_id: '<string>',
scheduled_at: '<string>'
})
};
fetch('https://v2-nova-api.prod.czmx.in/api/org/{org_id}/workflow-runs', 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://v2-nova-api.prod.czmx.in/api/org/{org_id}/workflow-runs",
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([
'prospect' => [
'phone' => '<string>',
'country' => '<string>',
'custom_data' => [
],
'email' => '<string>',
'external_id' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'timezone' => '<string>'
],
'workflow_id' => '<string>',
'scheduled_at' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://v2-nova-api.prod.czmx.in/api/org/{org_id}/workflow-runs"
payload := strings.NewReader("{\n \"prospect\": {\n \"phone\": \"<string>\",\n \"country\": \"<string>\",\n \"custom_data\": {},\n \"email\": \"<string>\",\n \"external_id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"workflow_id\": \"<string>\",\n \"scheduled_at\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://v2-nova-api.prod.czmx.in/api/org/{org_id}/workflow-runs")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"prospect\": {\n \"phone\": \"<string>\",\n \"country\": \"<string>\",\n \"custom_data\": {},\n \"email\": \"<string>\",\n \"external_id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"workflow_id\": \"<string>\",\n \"scheduled_at\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v2-nova-api.prod.czmx.in/api/org/{org_id}/workflow-runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prospect\": {\n \"phone\": \"<string>\",\n \"country\": \"<string>\",\n \"custom_data\": {},\n \"email\": \"<string>\",\n \"external_id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"workflow_id\": \"<string>\",\n \"scheduled_at\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"external_id": "<string>",
"workflow_run_id": "<string>"
}{
"data": "<unknown>",
"error": "<unknown>",
"message": "<string>",
"status": true
}{
"data": "<unknown>",
"error": "<unknown>",
"message": "<string>",
"status": true
}{
"data": "<unknown>",
"error": "<unknown>",
"message": "<string>",
"status": true
}{
"data": "<unknown>",
"error": "<unknown>",
"message": "<string>",
"status": true
}Workflow Runs
Create workflow run with prospect
Create a new workflow run with prospect creation in a single operation (API endpoint)
POST
/
org
/
{org_id}
/
workflow-runs
Create workflow run with prospect
curl --request POST \
--url https://v2-nova-api.prod.czmx.in/api/org/{org_id}/workflow-runs \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"prospect": {
"phone": "<string>",
"country": "<string>",
"custom_data": {},
"email": "<string>",
"external_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"timezone": "<string>"
},
"workflow_id": "<string>",
"scheduled_at": "<string>"
}
'import requests
url = "https://v2-nova-api.prod.czmx.in/api/org/{org_id}/workflow-runs"
payload = {
"prospect": {
"phone": "<string>",
"country": "<string>",
"custom_data": {},
"email": "<string>",
"external_id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"timezone": "<string>"
},
"workflow_id": "<string>",
"scheduled_at": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prospect: {
phone: '<string>',
country: '<string>',
custom_data: {},
email: '<string>',
external_id: '<string>',
first_name: '<string>',
last_name: '<string>',
timezone: '<string>'
},
workflow_id: '<string>',
scheduled_at: '<string>'
})
};
fetch('https://v2-nova-api.prod.czmx.in/api/org/{org_id}/workflow-runs', 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://v2-nova-api.prod.czmx.in/api/org/{org_id}/workflow-runs",
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([
'prospect' => [
'phone' => '<string>',
'country' => '<string>',
'custom_data' => [
],
'email' => '<string>',
'external_id' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'timezone' => '<string>'
],
'workflow_id' => '<string>',
'scheduled_at' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://v2-nova-api.prod.czmx.in/api/org/{org_id}/workflow-runs"
payload := strings.NewReader("{\n \"prospect\": {\n \"phone\": \"<string>\",\n \"country\": \"<string>\",\n \"custom_data\": {},\n \"email\": \"<string>\",\n \"external_id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"workflow_id\": \"<string>\",\n \"scheduled_at\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://v2-nova-api.prod.czmx.in/api/org/{org_id}/workflow-runs")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"prospect\": {\n \"phone\": \"<string>\",\n \"country\": \"<string>\",\n \"custom_data\": {},\n \"email\": \"<string>\",\n \"external_id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"workflow_id\": \"<string>\",\n \"scheduled_at\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v2-nova-api.prod.czmx.in/api/org/{org_id}/workflow-runs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prospect\": {\n \"phone\": \"<string>\",\n \"country\": \"<string>\",\n \"custom_data\": {},\n \"email\": \"<string>\",\n \"external_id\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"workflow_id\": \"<string>\",\n \"scheduled_at\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"external_id": "<string>",
"workflow_run_id": "<string>"
}{
"data": "<unknown>",
"error": "<unknown>",
"message": "<string>",
"status": true
}{
"data": "<unknown>",
"error": "<unknown>",
"message": "<string>",
"status": true
}{
"data": "<unknown>",
"error": "<unknown>",
"message": "<string>",
"status": true
}{
"data": "<unknown>",
"error": "<unknown>",
"message": "<string>",
"status": true
}⌘I

