Update a field
curl --request PUT \
--url http://localhost:4000/v1/fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": 2,
"name": "<string>",
"identifier": "<string>",
"description": "<string>",
"defaultStatement": "<string>",
"configuration": {
"includedTime": true
},
"options": [
{
"name": "<string>",
"id": 123,
"color": "<string>",
"isArchived": true,
"displayIndex": 123,
"actionId": 123,
"category": "<string>",
"icon": "<string>",
"isDefault": true,
"badge": "<string>",
"tooltip": "<string>"
}
],
"hidden": true
}
'import requests
url = "http://localhost:4000/v1/fields"
payload = {
"id": 2,
"name": "<string>",
"identifier": "<string>",
"description": "<string>",
"defaultStatement": "<string>",
"configuration": { "includedTime": True },
"options": [
{
"name": "<string>",
"id": 123,
"color": "<string>",
"isArchived": True,
"displayIndex": 123,
"actionId": 123,
"category": "<string>",
"icon": "<string>",
"isDefault": True,
"badge": "<string>",
"tooltip": "<string>"
}
],
"hidden": True
}
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({
id: 2,
name: '<string>',
identifier: '<string>',
description: '<string>',
defaultStatement: '<string>',
configuration: {includedTime: true},
options: [
{
name: '<string>',
id: 123,
color: '<string>',
isArchived: true,
displayIndex: 123,
actionId: 123,
category: '<string>',
icon: '<string>',
isDefault: true,
badge: '<string>',
tooltip: '<string>'
}
],
hidden: true
})
};
fetch('http://localhost:4000/v1/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_PORT => "4000",
CURLOPT_URL => "http://localhost:4000/v1/fields",
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([
'id' => 2,
'name' => '<string>',
'identifier' => '<string>',
'description' => '<string>',
'defaultStatement' => '<string>',
'configuration' => [
'includedTime' => true
],
'options' => [
[
'name' => '<string>',
'id' => 123,
'color' => '<string>',
'isArchived' => true,
'displayIndex' => 123,
'actionId' => 123,
'category' => '<string>',
'icon' => '<string>',
'isDefault' => true,
'badge' => '<string>',
'tooltip' => '<string>'
]
],
'hidden' => true
]),
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 := "http://localhost:4000/v1/fields"
payload := strings.NewReader("{\n \"id\": 2,\n \"name\": \"<string>\",\n \"identifier\": \"<string>\",\n \"description\": \"<string>\",\n \"defaultStatement\": \"<string>\",\n \"configuration\": {\n \"includedTime\": true\n },\n \"options\": [\n {\n \"name\": \"<string>\",\n \"id\": 123,\n \"color\": \"<string>\",\n \"isArchived\": true,\n \"displayIndex\": 123,\n \"actionId\": 123,\n \"category\": \"<string>\",\n \"icon\": \"<string>\",\n \"isDefault\": true,\n \"badge\": \"<string>\",\n \"tooltip\": \"<string>\"\n }\n ],\n \"hidden\": true\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("http://localhost:4000/v1/fields")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 2,\n \"name\": \"<string>\",\n \"identifier\": \"<string>\",\n \"description\": \"<string>\",\n \"defaultStatement\": \"<string>\",\n \"configuration\": {\n \"includedTime\": true\n },\n \"options\": [\n {\n \"name\": \"<string>\",\n \"id\": 123,\n \"color\": \"<string>\",\n \"isArchived\": true,\n \"displayIndex\": 123,\n \"actionId\": 123,\n \"category\": \"<string>\",\n \"icon\": \"<string>\",\n \"isDefault\": true,\n \"badge\": \"<string>\",\n \"tooltip\": \"<string>\"\n }\n ],\n \"hidden\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:4000/v1/fields")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 2,\n \"name\": \"<string>\",\n \"identifier\": \"<string>\",\n \"description\": \"<string>\",\n \"defaultStatement\": \"<string>\",\n \"configuration\": {\n \"includedTime\": true\n },\n \"options\": [\n {\n \"name\": \"<string>\",\n \"id\": 123,\n \"color\": \"<string>\",\n \"isArchived\": true,\n \"displayIndex\": 123,\n \"actionId\": 123,\n \"category\": \"<string>\",\n \"icon\": \"<string>\",\n \"isDefault\": true,\n \"badge\": \"<string>\",\n \"tooltip\": \"<string>\"\n }\n ],\n \"hidden\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"name": "<string>",
"inputType": "<string>",
"type": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"identifier": "<string>",
"description": "<string>",
"options": "<string>",
"optionsAttributes": "<string>",
"defaultStatement": "<string>",
"configuration": {
"includedTime": true
},
"isSystemField": true,
"hidden": true,
"accountId": 123,
"userId": 123,
"deletedAt": "2023-11-07T05:31:56Z",
"associationCount": 123,
"CustomFieldOptions": [
{
"name": "<string>",
"id": 123,
"color": "<string>",
"isArchived": true,
"displayIndex": 123,
"actionId": 123,
"category": "<string>",
"icon": "<string>",
"isDefault": true,
"badge": "<string>",
"tooltip": "<string>"
}
],
"CustomFieldEventMap": [
{
"event": {
"name": "<string>",
"color": "<string>",
"linkPrefix": "<string>",
"internalDescription": "<string>"
}
}
],
"user": {
"firstName": "<string>",
"lastName": "<string>"
}
},
"message": "<string>"
}Fields
Update Custom Field
Update an existing custom field
PUT
/
v1
/
fields
Update a field
curl --request PUT \
--url http://localhost:4000/v1/fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": 2,
"name": "<string>",
"identifier": "<string>",
"description": "<string>",
"defaultStatement": "<string>",
"configuration": {
"includedTime": true
},
"options": [
{
"name": "<string>",
"id": 123,
"color": "<string>",
"isArchived": true,
"displayIndex": 123,
"actionId": 123,
"category": "<string>",
"icon": "<string>",
"isDefault": true,
"badge": "<string>",
"tooltip": "<string>"
}
],
"hidden": true
}
'import requests
url = "http://localhost:4000/v1/fields"
payload = {
"id": 2,
"name": "<string>",
"identifier": "<string>",
"description": "<string>",
"defaultStatement": "<string>",
"configuration": { "includedTime": True },
"options": [
{
"name": "<string>",
"id": 123,
"color": "<string>",
"isArchived": True,
"displayIndex": 123,
"actionId": 123,
"category": "<string>",
"icon": "<string>",
"isDefault": True,
"badge": "<string>",
"tooltip": "<string>"
}
],
"hidden": True
}
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({
id: 2,
name: '<string>',
identifier: '<string>',
description: '<string>',
defaultStatement: '<string>',
configuration: {includedTime: true},
options: [
{
name: '<string>',
id: 123,
color: '<string>',
isArchived: true,
displayIndex: 123,
actionId: 123,
category: '<string>',
icon: '<string>',
isDefault: true,
badge: '<string>',
tooltip: '<string>'
}
],
hidden: true
})
};
fetch('http://localhost:4000/v1/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_PORT => "4000",
CURLOPT_URL => "http://localhost:4000/v1/fields",
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([
'id' => 2,
'name' => '<string>',
'identifier' => '<string>',
'description' => '<string>',
'defaultStatement' => '<string>',
'configuration' => [
'includedTime' => true
],
'options' => [
[
'name' => '<string>',
'id' => 123,
'color' => '<string>',
'isArchived' => true,
'displayIndex' => 123,
'actionId' => 123,
'category' => '<string>',
'icon' => '<string>',
'isDefault' => true,
'badge' => '<string>',
'tooltip' => '<string>'
]
],
'hidden' => true
]),
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 := "http://localhost:4000/v1/fields"
payload := strings.NewReader("{\n \"id\": 2,\n \"name\": \"<string>\",\n \"identifier\": \"<string>\",\n \"description\": \"<string>\",\n \"defaultStatement\": \"<string>\",\n \"configuration\": {\n \"includedTime\": true\n },\n \"options\": [\n {\n \"name\": \"<string>\",\n \"id\": 123,\n \"color\": \"<string>\",\n \"isArchived\": true,\n \"displayIndex\": 123,\n \"actionId\": 123,\n \"category\": \"<string>\",\n \"icon\": \"<string>\",\n \"isDefault\": true,\n \"badge\": \"<string>\",\n \"tooltip\": \"<string>\"\n }\n ],\n \"hidden\": true\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("http://localhost:4000/v1/fields")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 2,\n \"name\": \"<string>\",\n \"identifier\": \"<string>\",\n \"description\": \"<string>\",\n \"defaultStatement\": \"<string>\",\n \"configuration\": {\n \"includedTime\": true\n },\n \"options\": [\n {\n \"name\": \"<string>\",\n \"id\": 123,\n \"color\": \"<string>\",\n \"isArchived\": true,\n \"displayIndex\": 123,\n \"actionId\": 123,\n \"category\": \"<string>\",\n \"icon\": \"<string>\",\n \"isDefault\": true,\n \"badge\": \"<string>\",\n \"tooltip\": \"<string>\"\n }\n ],\n \"hidden\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:4000/v1/fields")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 2,\n \"name\": \"<string>\",\n \"identifier\": \"<string>\",\n \"description\": \"<string>\",\n \"defaultStatement\": \"<string>\",\n \"configuration\": {\n \"includedTime\": true\n },\n \"options\": [\n {\n \"name\": \"<string>\",\n \"id\": 123,\n \"color\": \"<string>\",\n \"isArchived\": true,\n \"displayIndex\": 123,\n \"actionId\": 123,\n \"category\": \"<string>\",\n \"icon\": \"<string>\",\n \"isDefault\": true,\n \"badge\": \"<string>\",\n \"tooltip\": \"<string>\"\n }\n ],\n \"hidden\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"name": "<string>",
"inputType": "<string>",
"type": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"identifier": "<string>",
"description": "<string>",
"options": "<string>",
"optionsAttributes": "<string>",
"defaultStatement": "<string>",
"configuration": {
"includedTime": true
},
"isSystemField": true,
"hidden": true,
"accountId": 123,
"userId": 123,
"deletedAt": "2023-11-07T05:31:56Z",
"associationCount": 123,
"CustomFieldOptions": [
{
"name": "<string>",
"id": 123,
"color": "<string>",
"isArchived": true,
"displayIndex": 123,
"actionId": 123,
"category": "<string>",
"icon": "<string>",
"isDefault": true,
"badge": "<string>",
"tooltip": "<string>"
}
],
"CustomFieldEventMap": [
{
"event": {
"name": "<string>",
"color": "<string>",
"linkPrefix": "<string>",
"internalDescription": "<string>"
}
}
],
"user": {
"firstName": "<string>",
"lastName": "<string>"
}
},
"message": "<string>"
}Authorizations
API key required in Authorization header. Format: iclosed-<token>
Body
application/json
Required range:
x >= 1Maximum string length:
1000Maximum string length:
1000Maximum string length:
1000Maximum string length:
1000Available options:
NUMBER, TEXT, TEXT_AREA, DATE, USER, USERS_MULTIPLE, URL, SINGLE_SELECT, MULTIPLE_SELECT, EMAIL, RATING Available options:
CONTACT, CALL, EVENT, DEAL, USER, ISCORE, UNIFIED_INBOX, INVITEE_QUESTION Date field configuration when time is selected.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I