Update an auto-fill agent
curl --request PATCH \
--url https://api.custral.com/v1/property-agents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instructions": "<string>",
"model": "<string>",
"sources": {
"recordContext": true,
"web": true
},
"triggerTypes": [],
"onlyIfEmpty": true,
"isEnabled": true
}
'import requests
url = "https://api.custral.com/v1/property-agents/{id}"
payload = {
"instructions": "<string>",
"model": "<string>",
"sources": {
"recordContext": True,
"web": True
},
"triggerTypes": [],
"onlyIfEmpty": True,
"isEnabled": True
}
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({
instructions: '<string>',
model: '<string>',
sources: {recordContext: true, web: true},
triggerTypes: [],
onlyIfEmpty: true,
isEnabled: true
})
};
fetch('https://api.custral.com/v1/property-agents/{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.custral.com/v1/property-agents/{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([
'instructions' => '<string>',
'model' => '<string>',
'sources' => [
'recordContext' => true,
'web' => true
],
'triggerTypes' => [
],
'onlyIfEmpty' => true,
'isEnabled' => 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 := "https://api.custral.com/v1/property-agents/{id}"
payload := strings.NewReader("{\n \"instructions\": \"<string>\",\n \"model\": \"<string>\",\n \"sources\": {\n \"recordContext\": true,\n \"web\": true\n },\n \"triggerTypes\": [],\n \"onlyIfEmpty\": true,\n \"isEnabled\": true\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.custral.com/v1/property-agents/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"instructions\": \"<string>\",\n \"model\": \"<string>\",\n \"sources\": {\n \"recordContext\": true,\n \"web\": true\n },\n \"triggerTypes\": [],\n \"onlyIfEmpty\": true,\n \"isEnabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.custral.com/v1/property-agents/{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 \"instructions\": \"<string>\",\n \"model\": \"<string>\",\n \"sources\": {\n \"recordContext\": true,\n \"web\": true\n },\n \"triggerTypes\": [],\n \"onlyIfEmpty\": true,\n \"isEnabled\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "pagent_123",
"objectId": "obj_123",
"propertyId": "prop_123",
"kind": "research",
"instructions": "Using the record's Website, output the company's industry.",
"model": "auto",
"sources": {},
"triggerTypes": [
"onCreate"
],
"recurringCron": "<string>",
"scopeFilterJson": "<unknown>",
"dependsOn": [
"<string>"
],
"requiresProperties": [
"<string>"
],
"onlyIfEmpty": true,
"isEnabled": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"reqId": "req_2a1f9c8e7b6d5"
}{
"error": {
"code": "invalid_api_key"
},
"reqId": "req_2a1f9c8e7b6d5"
}{
"error": {
"code": "insufficient_scope"
},
"reqId": "req_2a1f9c8e7b6d5"
}{
"error": {
"code": "not_found"
},
"reqId": "req_2a1f9c8e7b6d5"
}Property agents
Update an auto-fill agent
Patch an auto-fill agent — only the provided fields change. Requires scope: property_agents:write.
PATCH
/
v1
/
property-agents
/
{id}
Update an auto-fill agent
curl --request PATCH \
--url https://api.custral.com/v1/property-agents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instructions": "<string>",
"model": "<string>",
"sources": {
"recordContext": true,
"web": true
},
"triggerTypes": [],
"onlyIfEmpty": true,
"isEnabled": true
}
'import requests
url = "https://api.custral.com/v1/property-agents/{id}"
payload = {
"instructions": "<string>",
"model": "<string>",
"sources": {
"recordContext": True,
"web": True
},
"triggerTypes": [],
"onlyIfEmpty": True,
"isEnabled": True
}
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({
instructions: '<string>',
model: '<string>',
sources: {recordContext: true, web: true},
triggerTypes: [],
onlyIfEmpty: true,
isEnabled: true
})
};
fetch('https://api.custral.com/v1/property-agents/{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.custral.com/v1/property-agents/{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([
'instructions' => '<string>',
'model' => '<string>',
'sources' => [
'recordContext' => true,
'web' => true
],
'triggerTypes' => [
],
'onlyIfEmpty' => true,
'isEnabled' => 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 := "https://api.custral.com/v1/property-agents/{id}"
payload := strings.NewReader("{\n \"instructions\": \"<string>\",\n \"model\": \"<string>\",\n \"sources\": {\n \"recordContext\": true,\n \"web\": true\n },\n \"triggerTypes\": [],\n \"onlyIfEmpty\": true,\n \"isEnabled\": true\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.custral.com/v1/property-agents/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"instructions\": \"<string>\",\n \"model\": \"<string>\",\n \"sources\": {\n \"recordContext\": true,\n \"web\": true\n },\n \"triggerTypes\": [],\n \"onlyIfEmpty\": true,\n \"isEnabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.custral.com/v1/property-agents/{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 \"instructions\": \"<string>\",\n \"model\": \"<string>\",\n \"sources\": {\n \"recordContext\": true,\n \"web\": true\n },\n \"triggerTypes\": [],\n \"onlyIfEmpty\": true,\n \"isEnabled\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "pagent_123",
"objectId": "obj_123",
"propertyId": "prop_123",
"kind": "research",
"instructions": "Using the record's Website, output the company's industry.",
"model": "auto",
"sources": {},
"triggerTypes": [
"onCreate"
],
"recurringCron": "<string>",
"scopeFilterJson": "<unknown>",
"dependsOn": [
"<string>"
],
"requiresProperties": [
"<string>"
],
"onlyIfEmpty": true,
"isEnabled": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"reqId": "req_2a1f9c8e7b6d5"
}{
"error": {
"code": "invalid_api_key"
},
"reqId": "req_2a1f9c8e7b6d5"
}{
"error": {
"code": "insufficient_scope"
},
"reqId": "req_2a1f9c8e7b6d5"
}{
"error": {
"code": "not_found"
},
"reqId": "req_2a1f9c8e7b6d5"
}Authorizations
A Custral secret API key (sk_…), created in Settings → Applications. Sent as Authorization: Bearer sk_…. The X-Api-Key: sk_… header is also accepted and takes precedence. Never expose a secret key in a browser.
Path Parameters
The auto-fill agent id (pagent_…).
Body
application/json
A partial patch. Only the provided fields change; sources is merged onto the current toggles.
Available options:
summarize, research, classify, prompt Context toggles. Omitted toggles default sensibly for the kind (research enables the web).
Show child attributes
Show child attributes
Available options:
onCreate, onUpdate, recurring Was this page helpful?