curl --request POST \
--url https://api.custral.com/v1/property-agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"objectId": "obj_123",
"propertyId": "prop_123",
"kind": "research",
"instructions": "<string>",
"model": "<string>",
"sources": {
"recordContext": true,
"web": true
},
"triggerTypes": [],
"onlyIfEmpty": true,
"isEnabled": true
}
'import requests
url = "https://api.custral.com/v1/property-agents"
payload = {
"objectId": "obj_123",
"propertyId": "prop_123",
"kind": "research",
"instructions": "<string>",
"model": "<string>",
"sources": {
"recordContext": True,
"web": True
},
"triggerTypes": [],
"onlyIfEmpty": True,
"isEnabled": True
}
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({
objectId: 'obj_123',
propertyId: 'prop_123',
kind: 'research',
instructions: '<string>',
model: '<string>',
sources: {recordContext: true, web: true},
triggerTypes: [],
onlyIfEmpty: true,
isEnabled: true
})
};
fetch('https://api.custral.com/v1/property-agents', 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",
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([
'objectId' => 'obj_123',
'propertyId' => 'prop_123',
'kind' => 'research',
'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"
payload := strings.NewReader("{\n \"objectId\": \"obj_123\",\n \"propertyId\": \"prop_123\",\n \"kind\": \"research\",\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("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.custral.com/v1/property-agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"objectId\": \"obj_123\",\n \"propertyId\": \"prop_123\",\n \"kind\": \"research\",\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")
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 \"objectId\": \"obj_123\",\n \"propertyId\": \"prop_123\",\n \"kind\": \"research\",\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"
}Set up auto-fill on a property
Create an AI auto-fill agent on a property. One auto-fill is allowed per property. Requires scope: property_agents:write.
curl --request POST \
--url https://api.custral.com/v1/property-agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"objectId": "obj_123",
"propertyId": "prop_123",
"kind": "research",
"instructions": "<string>",
"model": "<string>",
"sources": {
"recordContext": true,
"web": true
},
"triggerTypes": [],
"onlyIfEmpty": true,
"isEnabled": true
}
'import requests
url = "https://api.custral.com/v1/property-agents"
payload = {
"objectId": "obj_123",
"propertyId": "prop_123",
"kind": "research",
"instructions": "<string>",
"model": "<string>",
"sources": {
"recordContext": True,
"web": True
},
"triggerTypes": [],
"onlyIfEmpty": True,
"isEnabled": True
}
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({
objectId: 'obj_123',
propertyId: 'prop_123',
kind: 'research',
instructions: '<string>',
model: '<string>',
sources: {recordContext: true, web: true},
triggerTypes: [],
onlyIfEmpty: true,
isEnabled: true
})
};
fetch('https://api.custral.com/v1/property-agents', 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",
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([
'objectId' => 'obj_123',
'propertyId' => 'prop_123',
'kind' => 'research',
'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"
payload := strings.NewReader("{\n \"objectId\": \"obj_123\",\n \"propertyId\": \"prop_123\",\n \"kind\": \"research\",\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("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.custral.com/v1/property-agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"objectId\": \"obj_123\",\n \"propertyId\": \"prop_123\",\n \"kind\": \"research\",\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")
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 \"objectId\": \"obj_123\",\n \"propertyId\": \"prop_123\",\n \"kind\": \"research\",\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"
}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.
Body
Set up AI auto-fill on a property. One auto-fill is allowed per property.
The object (obj_…) the property belongs to.
"obj_123"
The property (prop_…) to auto-fill.
"prop_123"
summarize, research, classify, prompt "research"
What the AI should output for the property.
Model id, or auto (default).
Context toggles. Omitted toggles default sensibly for the kind (research enables the web).
Show child attributes
Show child attributes
Automatic triggers; omit for manual-only.
onCreate, onUpdate, recurring Only write when the property is empty. Defaults to false.
Whether the auto-fill is enabled. Defaults to true.
Was this page helpful?