curl --request PATCH \
--url https://api.parley.so/v1/fields/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"automationInstructions": "<string>",
"options": {
"add": [
"<string>"
],
"rename": {},
"remove": [
"<string>"
],
"clearRemovedValues": false
}
}
'import requests
url = "https://api.parley.so/v1/fields/{id}"
payload = {
"name": "<string>",
"automationInstructions": "<string>",
"options": {
"add": ["<string>"],
"rename": {},
"remove": ["<string>"],
"clearRemovedValues": False
}
}
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({
name: '<string>',
automationInstructions: '<string>',
options: {add: ['<string>'], rename: {}, remove: ['<string>'], clearRemovedValues: false}
})
};
fetch('https://api.parley.so/v1/fields/{id}', 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.parley.so/v1/fields/{id}",
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([
'name' => '<string>',
'automationInstructions' => '<string>',
'options' => [
'add' => [
'<string>'
],
'rename' => [
],
'remove' => [
'<string>'
],
'clearRemovedValues' => false
]
]),
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.parley.so/v1/fields/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"automationInstructions\": \"<string>\",\n \"options\": {\n \"add\": [\n \"<string>\"\n ],\n \"rename\": {},\n \"remove\": [\n \"<string>\"\n ],\n \"clearRemovedValues\": false\n }\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.parley.so/v1/fields/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"automationInstructions\": \"<string>\",\n \"options\": {\n \"add\": [\n \"<string>\"\n ],\n \"rename\": {},\n \"remove\": [\n \"<string>\"\n ],\n \"clearRemovedValues\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parley.so/v1/fields/{id}")
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 \"name\": \"<string>\",\n \"automationInstructions\": \"<string>\",\n \"options\": {\n \"add\": [\n \"<string>\"\n ],\n \"rename\": {},\n \"remove\": [\n \"<string>\"\n ],\n \"clearRemovedValues\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"recordType": "project",
"type": "text",
"options": [
"<string>"
],
"automation": "off",
"automationInstructions": "<string>",
"system": true,
"readOnly": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "The request is invalid.",
"details": {
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing or invalid credentials."
}
}{
"error": {
"code": "FORBIDDEN",
"message": "You don't have permission to do this."
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Not found."
}
}{
"error": {
"code": "NAME_TAKEN",
"message": "The name is already taken."
}
}{
"error": {
"code": "TOO_MANY_REQUESTS",
"message": "Too many requests."
}
}Update a field
Rename a custom field, change its automation, or add, rename, and remove single_select options. Omitted properties are left unchanged, and the type can’t change. System fields can’t be updated. Requires the owner or admin role.
curl --request PATCH \
--url https://api.parley.so/v1/fields/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"automationInstructions": "<string>",
"options": {
"add": [
"<string>"
],
"rename": {},
"remove": [
"<string>"
],
"clearRemovedValues": false
}
}
'import requests
url = "https://api.parley.so/v1/fields/{id}"
payload = {
"name": "<string>",
"automationInstructions": "<string>",
"options": {
"add": ["<string>"],
"rename": {},
"remove": ["<string>"],
"clearRemovedValues": False
}
}
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({
name: '<string>',
automationInstructions: '<string>',
options: {add: ['<string>'], rename: {}, remove: ['<string>'], clearRemovedValues: false}
})
};
fetch('https://api.parley.so/v1/fields/{id}', 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.parley.so/v1/fields/{id}",
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([
'name' => '<string>',
'automationInstructions' => '<string>',
'options' => [
'add' => [
'<string>'
],
'rename' => [
],
'remove' => [
'<string>'
],
'clearRemovedValues' => false
]
]),
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.parley.so/v1/fields/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"automationInstructions\": \"<string>\",\n \"options\": {\n \"add\": [\n \"<string>\"\n ],\n \"rename\": {},\n \"remove\": [\n \"<string>\"\n ],\n \"clearRemovedValues\": false\n }\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.parley.so/v1/fields/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"automationInstructions\": \"<string>\",\n \"options\": {\n \"add\": [\n \"<string>\"\n ],\n \"rename\": {},\n \"remove\": [\n \"<string>\"\n ],\n \"clearRemovedValues\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parley.so/v1/fields/{id}")
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 \"name\": \"<string>\",\n \"automationInstructions\": \"<string>\",\n \"options\": {\n \"add\": [\n \"<string>\"\n ],\n \"rename\": {},\n \"remove\": [\n \"<string>\"\n ],\n \"clearRemovedValues\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"recordType": "project",
"type": "text",
"options": [
"<string>"
],
"automation": "off",
"automationInstructions": "<string>",
"system": true,
"readOnly": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "VALIDATION_FAILED",
"message": "The request is invalid.",
"details": {
"issues": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing or invalid credentials."
}
}{
"error": {
"code": "FORBIDDEN",
"message": "You don't have permission to do this."
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Not found."
}
}{
"error": {
"code": "NAME_TAKEN",
"message": "The name is already taken."
}
}{
"error": {
"code": "TOO_MANY_REQUESTS",
"message": "Too many requests."
}
}Authorizations
A Parley API key.
Path Parameters
The field ID.
1Body
Field name. Unique among the fields of one record type.
1 - 200Whether Parley fills the field from emails and documents: off, suggest (proposes values for someone to accept), or auto (sets values directly).
off, suggest, auto Guidance Parley follows when it fills the field. null removes it.
1 - 2000Changes to a single_select field's options, applied as rename, then remove, then add. Options you don't mention are left unchanged.
Show child attributes
Show child attributes
Response
OK
The field ID.
1Field name. Unique among the fields of one record type.
1 - 200The kind of record the field belongs to.
project, account, contact, task The field's value type. It can't be changed after the field is created.
text, long_text, number, boolean, datetime, email, url, address, single_select, collection, user Option labels of a single_select field, in order. Empty for other types.
Whether Parley fills the field from emails and documents: off, suggest (proposes values for someone to accept), or auto (sets values directly).
off, suggest, auto Guidance Parley follows when it fills the field, or null.
1 - 2000A built-in field. It can't be renamed, reconfigured, or deleted, but its values can be set like any other field's.
Parley maintains the field's values, so they can't be set through fields on a record.
When the field was created.
When the field definition was last updated. Setting values on records does not change it.
Was this page helpful?
