curl --request PUT \
--url https://api.statisfy.com/v1/objects/account/records/{account_id}/ai-fields/{field_key} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_value": null,
"lock_days": 182,
"locked_until": "2023-11-07T05:31:56Z",
"reason": "<string>",
"value": null
}
'import requests
url = "https://api.statisfy.com/v1/objects/account/records/{account_id}/ai-fields/{field_key}"
payload = {
"base_value": None,
"lock_days": 182,
"locked_until": "2023-11-07T05:31:56Z",
"reason": "<string>",
"value": None
}
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({
base_value: null,
lock_days: 182,
locked_until: '2023-11-07T05:31:56Z',
reason: '<string>',
value: null
})
};
fetch('https://api.statisfy.com/v1/objects/account/records/{account_id}/ai-fields/{field_key}', 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.statisfy.com/v1/objects/account/records/{account_id}/ai-fields/{field_key}",
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([
'base_value' => null,
'lock_days' => 182,
'locked_until' => '2023-11-07T05:31:56Z',
'reason' => '<string>',
'value' => null
]),
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.statisfy.com/v1/objects/account/records/{account_id}/ai-fields/{field_key}"
payload := strings.NewReader("{\n \"base_value\": null,\n \"lock_days\": 182,\n \"locked_until\": \"2023-11-07T05:31:56Z\",\n \"reason\": \"<string>\",\n \"value\": null\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.statisfy.com/v1/objects/account/records/{account_id}/ai-fields/{field_key}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base_value\": null,\n \"lock_days\": 182,\n \"locked_until\": \"2023-11-07T05:31:56Z\",\n \"reason\": \"<string>\",\n \"value\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/objects/account/records/{account_id}/ai-fields/{field_key}")
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 \"base_value\": null,\n \"lock_days\": 182,\n \"locked_until\": \"2023-11-07T05:31:56Z\",\n \"reason\": \"<string>\",\n \"value\": null\n}"
response = http.request(request)
puts response.read_body{
"changed": true,
"field_key": "<string>",
"locked_until": "2023-11-07T05:31:56Z"
}Override an AI field on an account
Sets one AI field on an account with your value and a reason, and holds it from the AI, as editing the field in the app does (the ordinary update refuses AI fields). The AI leaves the value alone for lock_days, or until locked_until: left out, your workspace’s default on a field the AI has written, and no hold on one it has not. Send base_value, the value you read: when the field has moved since (the AI or someone else wrote it), nothing is saved and the 409 says what it is now, who changed it and when. The reason is required unless the field asks for none, and the AI reads it before its next pass. Sending the same value again keeps it and restarts the hold. Renewal Size follows the expected amount, so it is refused (a 422). An unknown field, or one that is not an AI field, is a 404. The edit is recorded as the person the key acts for, as in the app, so a workspace key or a digital worker cannot make it (a 403); a Member edits only the records in their book.
curl --request PUT \
--url https://api.statisfy.com/v1/objects/account/records/{account_id}/ai-fields/{field_key} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_value": null,
"lock_days": 182,
"locked_until": "2023-11-07T05:31:56Z",
"reason": "<string>",
"value": null
}
'import requests
url = "https://api.statisfy.com/v1/objects/account/records/{account_id}/ai-fields/{field_key}"
payload = {
"base_value": None,
"lock_days": 182,
"locked_until": "2023-11-07T05:31:56Z",
"reason": "<string>",
"value": None
}
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({
base_value: null,
lock_days: 182,
locked_until: '2023-11-07T05:31:56Z',
reason: '<string>',
value: null
})
};
fetch('https://api.statisfy.com/v1/objects/account/records/{account_id}/ai-fields/{field_key}', 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.statisfy.com/v1/objects/account/records/{account_id}/ai-fields/{field_key}",
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([
'base_value' => null,
'lock_days' => 182,
'locked_until' => '2023-11-07T05:31:56Z',
'reason' => '<string>',
'value' => null
]),
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.statisfy.com/v1/objects/account/records/{account_id}/ai-fields/{field_key}"
payload := strings.NewReader("{\n \"base_value\": null,\n \"lock_days\": 182,\n \"locked_until\": \"2023-11-07T05:31:56Z\",\n \"reason\": \"<string>\",\n \"value\": null\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.statisfy.com/v1/objects/account/records/{account_id}/ai-fields/{field_key}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base_value\": null,\n \"lock_days\": 182,\n \"locked_until\": \"2023-11-07T05:31:56Z\",\n \"reason\": \"<string>\",\n \"value\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/objects/account/records/{account_id}/ai-fields/{field_key}")
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 \"base_value\": null,\n \"lock_days\": 182,\n \"locked_until\": \"2023-11-07T05:31:56Z\",\n \"reason\": \"<string>\",\n \"value\": null\n}"
response = http.request(request)
puts response.read_body{
"changed": true,
"field_key": "<string>",
"locked_until": "2023-11-07T05:31:56Z"
}Authorizations
An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.
Path Parameters
Body
Was this page helpful?