curl --request POST \
--url https://api.duvo.ai/v2/automations/{automation_id}/config-fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"question": "<string>",
"section": null,
"required": false,
"fill_mode": "interview",
"options": [
"<string>"
],
"bindings": [
"context"
]
}
'import requests
url = "https://api.duvo.ai/v2/automations/{automation_id}/config-fields"
payload = {
"label": "<string>",
"question": "<string>",
"section": None,
"required": False,
"fill_mode": "interview",
"options": ["<string>"],
"bindings": ["context"]
}
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({
label: '<string>',
question: '<string>',
section: null,
required: false,
fill_mode: 'interview',
options: ['<string>'],
bindings: ['context']
})
};
fetch('https://api.duvo.ai/v2/automations/{automation_id}/config-fields', 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.duvo.ai/v2/automations/{automation_id}/config-fields",
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([
'label' => '<string>',
'question' => '<string>',
'section' => null,
'required' => false,
'fill_mode' => 'interview',
'options' => [
'<string>'
],
'bindings' => [
'context'
]
]),
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.duvo.ai/v2/automations/{automation_id}/config-fields"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"question\": \"<string>\",\n \"section\": null,\n \"required\": false,\n \"fill_mode\": \"interview\",\n \"options\": [\n \"<string>\"\n ],\n \"bindings\": [\n \"context\"\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.duvo.ai/v2/automations/{automation_id}/config-fields")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"question\": \"<string>\",\n \"section\": null,\n \"required\": false,\n \"fill_mode\": \"interview\",\n \"options\": [\n \"<string>\"\n ],\n \"bindings\": [\n \"context\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.duvo.ai/v2/automations/{automation_id}/config-fields")
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 \"label\": \"<string>\",\n \"question\": \"<string>\",\n \"section\": null,\n \"required\": false,\n \"fill_mode\": \"interview\",\n \"options\": [\n \"<string>\"\n ],\n \"bindings\": [\n \"context\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"field": {
"id": "<string>",
"key": "<string>",
"section": "<string>",
"position": 123,
"label": "<string>",
"question": "<string>",
"type": "freeText",
"type_config": {},
"bindings": [
"context"
],
"required": true,
"locked": true,
"fill_mode": "interview",
"value": "<string>",
"default_value": "<string>",
"status": "default",
"provenance": {
"filled_via": "<string>",
"filled_by_user_id": "<string>",
"filled_by_name": "<string>",
"filled_at": "<string>",
"filled_by_email": null,
"source_capture_id": "<string>",
"source_file_name": null
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Add Config Field
Add a Policy question to this automation. Its key is custom_ plus the label in snake_case, with _2, _3 and so on appended when the key is taken, and it is placed at the end of its section. A module template reinstall never changes a field added here.
curl --request POST \
--url https://api.duvo.ai/v2/automations/{automation_id}/config-fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"question": "<string>",
"section": null,
"required": false,
"fill_mode": "interview",
"options": [
"<string>"
],
"bindings": [
"context"
]
}
'import requests
url = "https://api.duvo.ai/v2/automations/{automation_id}/config-fields"
payload = {
"label": "<string>",
"question": "<string>",
"section": None,
"required": False,
"fill_mode": "interview",
"options": ["<string>"],
"bindings": ["context"]
}
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({
label: '<string>',
question: '<string>',
section: null,
required: false,
fill_mode: 'interview',
options: ['<string>'],
bindings: ['context']
})
};
fetch('https://api.duvo.ai/v2/automations/{automation_id}/config-fields', 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.duvo.ai/v2/automations/{automation_id}/config-fields",
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([
'label' => '<string>',
'question' => '<string>',
'section' => null,
'required' => false,
'fill_mode' => 'interview',
'options' => [
'<string>'
],
'bindings' => [
'context'
]
]),
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.duvo.ai/v2/automations/{automation_id}/config-fields"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"question\": \"<string>\",\n \"section\": null,\n \"required\": false,\n \"fill_mode\": \"interview\",\n \"options\": [\n \"<string>\"\n ],\n \"bindings\": [\n \"context\"\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.duvo.ai/v2/automations/{automation_id}/config-fields")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"question\": \"<string>\",\n \"section\": null,\n \"required\": false,\n \"fill_mode\": \"interview\",\n \"options\": [\n \"<string>\"\n ],\n \"bindings\": [\n \"context\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.duvo.ai/v2/automations/{automation_id}/config-fields")
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 \"label\": \"<string>\",\n \"question\": \"<string>\",\n \"section\": null,\n \"required\": false,\n \"fill_mode\": \"interview\",\n \"options\": [\n \"<string>\"\n ],\n \"bindings\": [\n \"context\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"field": {
"id": "<string>",
"key": "<string>",
"section": "<string>",
"position": 123,
"label": "<string>",
"question": "<string>",
"type": "freeText",
"type_config": {},
"bindings": [
"context"
],
"required": true,
"locked": true,
"fill_mode": "interview",
"value": "<string>",
"default_value": "<string>",
"status": "default",
"provenance": {
"filled_via": "<string>",
"filled_by_user_id": "<string>",
"filled_by_name": "<string>",
"filled_at": "<string>",
"filled_by_email": null,
"source_capture_id": "<string>",
"source_file_name": null
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
API key authentication. Get your API key from the Duvo dashboard.
Path Parameters
The automation's unique identifier
Body
Short name for the field, shown as its row heading
1 - 200The setup question asked for this field
1 - 2000Value type; table, compound and sourcePointer are template-only
freeText, identifier, number, select, multiSelect, list, orderedList, personList Section to add the field to, or null for none
1 - 200Whether the field must be filled
How the field is filled (interview, setup)
interview, setup Required for select and multiSelect, refused otherwise
1 - 100 elements1 - 200How the value reaches the automation (context, tool)
1context, tool Response
Default Response
Show child attributes
Show child attributes
Was this page helpful?