curl --request POST \
--url https://api.monaco.com/v1/ai-account-fields/ \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"question": "<string>",
"options": [
"<string>"
],
"overwrite_existing_values": true,
"entity_type": "account",
"data_source": "ai_external_web_search"
}
'import requests
url = "https://api.monaco.com/v1/ai-account-fields/"
payload = {
"name": "<string>",
"question": "<string>",
"options": ["<string>"],
"overwrite_existing_values": True,
"entity_type": "account",
"data_source": "ai_external_web_search"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
question: '<string>',
options: ['<string>'],
overwrite_existing_values: true,
entity_type: 'account',
data_source: 'ai_external_web_search'
})
};
fetch('https://api.monaco.com/v1/ai-account-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.monaco.com/v1/ai-account-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>',
'question' => '<string>',
'options' => [
'<string>'
],
'overwrite_existing_values' => true,
'entity_type' => 'account',
'data_source' => 'ai_external_web_search'
]),
CURLOPT_HTTPHEADER => [
"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.monaco.com/v1/ai-account-fields/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"question\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"overwrite_existing_values\": true,\n \"entity_type\": \"account\",\n \"data_source\": \"ai_external_web_search\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.monaco.com/v1/ai-account-fields/")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"question\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"overwrite_existing_values\": true,\n \"entity_type\": \"account\",\n \"data_source\": \"ai_external_web_search\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.monaco.com/v1/ai-account-fields/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"question\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"overwrite_existing_values\": true,\n \"entity_type\": \"account\",\n \"data_source\": \"ai_external_web_search\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"question": "<string>",
"field_type": "<string>",
"entity_type": "account",
"data_source": "ai_external_web_search",
"overwrite_existing_values": true,
"options": [
"<string>"
]
},
"meta": {
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "not_found",
"message": "Resource not found"
}
}Create an Account AI field
Create an Account field that Monaco fills by researching the web with its question. Only Account fields with data_source ai_external_web_search are created here; any other entity_type or data_source returns 422. The returned id can be a Preview’s qualifier_signal_id. Creating a field runs no research by itself. Requires an organization admin and usage-based billing, as in the app.
curl --request POST \
--url https://api.monaco.com/v1/ai-account-fields/ \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"question": "<string>",
"options": [
"<string>"
],
"overwrite_existing_values": true,
"entity_type": "account",
"data_source": "ai_external_web_search"
}
'import requests
url = "https://api.monaco.com/v1/ai-account-fields/"
payload = {
"name": "<string>",
"question": "<string>",
"options": ["<string>"],
"overwrite_existing_values": True,
"entity_type": "account",
"data_source": "ai_external_web_search"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
question: '<string>',
options: ['<string>'],
overwrite_existing_values: true,
entity_type: 'account',
data_source: 'ai_external_web_search'
})
};
fetch('https://api.monaco.com/v1/ai-account-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.monaco.com/v1/ai-account-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>',
'question' => '<string>',
'options' => [
'<string>'
],
'overwrite_existing_values' => true,
'entity_type' => 'account',
'data_source' => 'ai_external_web_search'
]),
CURLOPT_HTTPHEADER => [
"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.monaco.com/v1/ai-account-fields/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"question\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"overwrite_existing_values\": true,\n \"entity_type\": \"account\",\n \"data_source\": \"ai_external_web_search\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.monaco.com/v1/ai-account-fields/")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"question\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"overwrite_existing_values\": true,\n \"entity_type\": \"account\",\n \"data_source\": \"ai_external_web_search\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.monaco.com/v1/ai-account-fields/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"question\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"overwrite_existing_values\": true,\n \"entity_type\": \"account\",\n \"data_source\": \"ai_external_web_search\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"question": "<string>",
"field_type": "<string>",
"entity_type": "account",
"data_source": "ai_external_web_search",
"overwrite_existing_values": true,
"options": [
"<string>"
]
},
"meta": {
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "not_found",
"message": "Resource not found"
}
}Body
Display name of the field.
1 - 255The research question Monaco answers for each Account, e.g. "Does this company publish a public pricing page? Answer true or false."
1 - 12000checkbox, text, number, date or select. It cannot change later.
checkbox, text, number, date, select The answer options. Required for select; leave out for other types.
False keeps an Account's existing answer instead of replacing it.
Always account: only Account AI fields are created here.
"account"Always ai_external_web_search: Monaco answers the question from the web.
"ai_external_web_search"