curl --request PUT \
--url https://api.nuvia.ai/v1/custom-fields/{id}/value \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"field_data": "<string>",
"conversationId": "<string>"
}
'import requests
url = "https://api.nuvia.ai/v1/custom-fields/{id}/value"
payload = {
"field_data": "<string>",
"conversationId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({field_data: '<string>', conversationId: '<string>'})
};
fetch('https://api.nuvia.ai/v1/custom-fields/{id}/value', 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.nuvia.ai/v1/custom-fields/{id}/value",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'field_data' => '<string>',
'conversationId' => '<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.nuvia.ai/v1/custom-fields/{id}/value"
payload := strings.NewReader("{\n \"field_data\": \"<string>\",\n \"conversationId\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.nuvia.ai/v1/custom-fields/{id}/value")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"field_data\": \"<string>\",\n \"conversationId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nuvia.ai/v1/custom-fields/{id}/value")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"field_data\": \"<string>\",\n \"conversationId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyUpdate the value of a custom field
Updates the value of a specific custom field on a conversation. Depending on the field’s context (conversation, contact, or business), it updates the conversation, the contact, or the contact’s company — the contact and the company are resolved from the given conversation, which is why conversationId is required even for a contact field. Accepts all types: text, number, and date receive the value directly; select/multi_select receive the option_id (or a list of them), which comes from GET /v1/custom-fields/{id}/options. An invalid value returns 422 with accepted_values. A field or conversation from another company returns 403/404.
curl --request PUT \
--url https://api.nuvia.ai/v1/custom-fields/{id}/value \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"field_data": "<string>",
"conversationId": "<string>"
}
'import requests
url = "https://api.nuvia.ai/v1/custom-fields/{id}/value"
payload = {
"field_data": "<string>",
"conversationId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({field_data: '<string>', conversationId: '<string>'})
};
fetch('https://api.nuvia.ai/v1/custom-fields/{id}/value', 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.nuvia.ai/v1/custom-fields/{id}/value",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'field_data' => '<string>',
'conversationId' => '<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.nuvia.ai/v1/custom-fields/{id}/value"
payload := strings.NewReader("{\n \"field_data\": \"<string>\",\n \"conversationId\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.nuvia.ai/v1/custom-fields/{id}/value")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"field_data\": \"<string>\",\n \"conversationId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nuvia.ai/v1/custom-fields/{id}/value")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"field_data\": \"<string>\",\n \"conversationId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
JWT authentication token
Path Parameters
ID of the custom field to update
Body
Field value. text, number and date take the value directly; select takes the option_id; multi_select takes the list of option_id. null clears the field.
Conversation ID. It also identifies the contact and the contact's company, for fields in those contexts.
1Response
Custom field value updated successfully