Start Workflow
curl --request POST \
--url https://svalync.com/api/workflow/runWorkflow \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"callId": "<string>"
}
'import requests
url = "https://svalync.com/api/workflow/runWorkflow"
payload = { "callId": "<string>" }
headers = {
"x-api-key": "<x-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': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({callId: '<string>'})
};
fetch('https://svalync.com/api/workflow/runWorkflow', 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://svalync.com/api/workflow/runWorkflow",
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([
'callId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-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://svalync.com/api/workflow/runWorkflow"
payload := strings.NewReader("{\n \"callId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-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://svalync.com/api/workflow/runWorkflow")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"callId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://svalync.com/api/workflow/runWorkflow")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"callId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"response": [
{
"nodeId": "<string>",
"input": {
"name": "<string>",
"imageURL": "<string>",
"description": "<string>",
"loading": true,
"isConnected": true,
"actions": [
[
{
"option": {
"label": "<string>",
"value": "<string>"
},
"inputs": [
[
{
"type": "<string>",
"required": true,
"name": "<string>",
"label": "<string>",
"defaultValue": "<string>",
"value": "<string>",
"options": [
[
{
"label": "<string>",
"value": "<string>"
}
]
]
}
]
],
"responses": {
"batch_id": "<string>",
"isTestMode": true,
"state": "<string>"
},
"action": "<string>",
"type": "<string>",
"msg": "<string>"
}
]
],
"actionEntityAction": "<string>"
},
"response": {
"batch_id": "<string>",
"state": "<string>"
}
}
]
}Workflows
Start Workflow
POST
/
workflow
/
runWorkflow
Start Workflow
curl --request POST \
--url https://svalync.com/api/workflow/runWorkflow \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"callId": "<string>"
}
'import requests
url = "https://svalync.com/api/workflow/runWorkflow"
payload = { "callId": "<string>" }
headers = {
"x-api-key": "<x-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': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({callId: '<string>'})
};
fetch('https://svalync.com/api/workflow/runWorkflow', 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://svalync.com/api/workflow/runWorkflow",
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([
'callId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-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://svalync.com/api/workflow/runWorkflow"
payload := strings.NewReader("{\n \"callId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-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://svalync.com/api/workflow/runWorkflow")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"callId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://svalync.com/api/workflow/runWorkflow")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"callId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"response": [
{
"nodeId": "<string>",
"input": {
"name": "<string>",
"imageURL": "<string>",
"description": "<string>",
"loading": true,
"isConnected": true,
"actions": [
[
{
"option": {
"label": "<string>",
"value": "<string>"
},
"inputs": [
[
{
"type": "<string>",
"required": true,
"name": "<string>",
"label": "<string>",
"defaultValue": "<string>",
"value": "<string>",
"options": [
[
{
"label": "<string>",
"value": "<string>"
}
]
]
}
]
],
"responses": {
"batch_id": "<string>",
"isTestMode": true,
"state": "<string>"
},
"action": "<string>",
"type": "<string>",
"msg": "<string>"
}
]
],
"actionEntityAction": "<string>"
},
"response": {
"batch_id": "<string>",
"state": "<string>"
}
}
]
}Authorization
string
required
Your Api Key
Params
string
required
The workflow id for the user initiating the flow. Click
here to know how to get workflow id.
Payload
The payload is dynamic and depends on the first node of the workflow. For instance, if the first node involves voice AI and Get Call Action, the payload should include the necessary input values for these actions.string
required
The unique identifier of the call
Response
array
Show properties
Show properties
string
The unique identifier for the workflow node.
object
Show properties
Show properties
string
The name of the app or service.
string
The URL of the image associated with the app or service.
string
A brief description of the app or service.
boolean
Indicates whether the app or service is currently loading.
boolean
Indicates whether the app or service is connected.
array[]
Show properties
Show properties
object
array[]
Show properties
Show properties
string
The type of input (e.g., text, select).
boolean
Indicates whether the input is required.
string
The name of the input field.
string
The label for the input field.
string
The default value for the input field.
string
The current value of the input field.
object
string
The type of action being performed.
string
The type of the action (e.g., action).
string
A message providing additional information about the action.
string
The action being performed by the entity.
⌘I