curl --request PATCH \
--url https://api.duvo.ai/v2/automations/{automationId}/config-fields/{fieldId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "<string>",
"expected_value": "<string>"
}
'import requests
url = "https://api.duvo.ai/v2/automations/{automationId}/config-fields/{fieldId}"
payload = {
"value": "<string>",
"expected_value": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({value: '<string>', expected_value: '<string>'})
};
fetch('https://api.duvo.ai/v2/automations/{automationId}/config-fields/{fieldId}', 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/{automationId}/config-fields/{fieldId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'value' => '<string>',
'expected_value' => '<string>'
]),
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/{automationId}/config-fields/{fieldId}"
payload := strings.NewReader("{\n \"value\": \"<string>\",\n \"expected_value\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.duvo.ai/v2/automations/{automationId}/config-fields/{fieldId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"value\": \"<string>\",\n \"expected_value\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.duvo.ai/v2/automations/{automationId}/config-fields/{fieldId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"value\": \"<string>\",\n \"expected_value\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"key": "<string>",
"section": "<string>",
"position": 123,
"label": "<string>",
"question": "<string>",
"guidance": null,
"example": null,
"type": "freeText",
"typeConfig": {},
"labels": null,
"bindings": [
"context"
],
"required": true,
"fillMode": "interview",
"roles": [],
"value": "<string>",
"defaultValue": "<string>",
"status": "default",
"provenance": {
"filledVia": "<string>",
"filledByUserId": "<string>",
"filledByName": "<string>",
"filledByEmail": null,
"filledAt": "<string>",
"sourceCaptureId": "<string>",
"sourceFileName": null
}
}{
"error": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}Update Config Field
Set or clear a config field’s value. value: null removes the answer and does not restore the module default, so a Run that reads the field is refused until it is answered again. To use the default, send default_value as value. On a running automation (running in readAutomationPolicy) the change reaches its Agents from their next run: name the question, its current answer and the new one, change it only after the user says yes, and pass the current answer you showed, not the new one, as expected_value so a change someone made in between is not overwritten. A compound question takes every part in one write. When the field’s bindings include structural, the module’s Agents also need a matching change; propose it.
curl --request PATCH \
--url https://api.duvo.ai/v2/automations/{automationId}/config-fields/{fieldId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "<string>",
"expected_value": "<string>"
}
'import requests
url = "https://api.duvo.ai/v2/automations/{automationId}/config-fields/{fieldId}"
payload = {
"value": "<string>",
"expected_value": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({value: '<string>', expected_value: '<string>'})
};
fetch('https://api.duvo.ai/v2/automations/{automationId}/config-fields/{fieldId}', 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/{automationId}/config-fields/{fieldId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'value' => '<string>',
'expected_value' => '<string>'
]),
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/{automationId}/config-fields/{fieldId}"
payload := strings.NewReader("{\n \"value\": \"<string>\",\n \"expected_value\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.duvo.ai/v2/automations/{automationId}/config-fields/{fieldId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"value\": \"<string>\",\n \"expected_value\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.duvo.ai/v2/automations/{automationId}/config-fields/{fieldId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"value\": \"<string>\",\n \"expected_value\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"key": "<string>",
"section": "<string>",
"position": 123,
"label": "<string>",
"question": "<string>",
"guidance": null,
"example": null,
"type": "freeText",
"typeConfig": {},
"labels": null,
"bindings": [
"context"
],
"required": true,
"fillMode": "interview",
"roles": [],
"value": "<string>",
"defaultValue": "<string>",
"status": "default",
"provenance": {
"filledVia": "<string>",
"filledByUserId": "<string>",
"filledByName": "<string>",
"filledByEmail": null,
"filledAt": "<string>",
"sourceCaptureId": "<string>",
"sourceFileName": null
}
}{
"error": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"validationErrors": [
{
"field": "<string>",
"message": "<string>"
}
]
}Authorizations
Path Parameters
Body
Response
Default Response
Was this page helpful?