curl --request POST \
--url https://api.parley.so/v1/fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"options": [
"<string>"
],
"automationInstructions": "<string>"
}
'import requests
url = "https://api.parley.so/v1/fields"
payload = {
"name": "<string>",
"options": ["<string>"],
"automationInstructions": "<string>"
}
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({name: '<string>', options: ['<string>'], automationInstructions: '<string>'})
};
fetch('https://api.parley.so/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_URL => "https://api.parley.so/v1/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([
'name' => '<string>',
'options' => [
'<string>'
],
'automationInstructions' => '<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.parley.so/v1/fields"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"automationInstructions\": \"<string>\"\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.parley.so/v1/fields")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"automationInstructions\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parley.so/v1/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 \"name\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"automationInstructions\": \"<string>\"\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": "NAME_TAKEN",
"message": "The name is already taken."
}
}{
"error": {
"code": "TOO_MANY_REQUESTS",
"message": "Too many requests."
}
}Create a field
Define a custom field for projects, accounts, contacts, or tasks. Set its values through the fields of that record type’s create and update operations, keyed by field name or ID. Parley doesn’t fill task fields, so their automation is off. Requires the owner or admin role.
curl --request POST \
--url https://api.parley.so/v1/fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"options": [
"<string>"
],
"automationInstructions": "<string>"
}
'import requests
url = "https://api.parley.so/v1/fields"
payload = {
"name": "<string>",
"options": ["<string>"],
"automationInstructions": "<string>"
}
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({name: '<string>', options: ['<string>'], automationInstructions: '<string>'})
};
fetch('https://api.parley.so/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_URL => "https://api.parley.so/v1/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([
'name' => '<string>',
'options' => [
'<string>'
],
'automationInstructions' => '<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.parley.so/v1/fields"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"automationInstructions\": \"<string>\"\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.parley.so/v1/fields")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"automationInstructions\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parley.so/v1/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 \"name\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"automationInstructions\": \"<string>\"\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": "NAME_TAKEN",
"message": "The name is already taken."
}
}{
"error": {
"code": "TOO_MANY_REQUESTS",
"message": "Too many requests."
}
}Authorizations
A Parley API key.
Body
The kind of record the field belongs to.
project, account, contact, task Field name. Unique among the fields of one record type.
1 - 200The field's value type. It can't be changed after the field is created.
text, number, boolean, datetime, email, url, address, single_select, collection, user Option labels, in order. Required for single_select, and not allowed for other types. At most 100.
1001 - 200Whether Parley fills the field from emails and documents: off, suggest (proposes values for someone to accept), or auto (sets values directly). Defaults to suggest, or to off for a task field, since Parley doesn't fill task fields.
off, suggest, auto Guidance Parley follows when it fills the field.
1 - 2000Response
Created.
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?
