Create deal AI field
Create a deal AI field, evaluated by AI against all the activity of each deal (recordings and emails). The field is owned by the workspace member identified by creatorEmail. The field is evaluated for deals as new activity comes in; no values are generated for deals whose activity does not change.
curl --request POST \
--url https://api.claap.io/v1/deals/fields \
--header 'Content-Type: application/json' \
--header 'X-Claap-Key: <api-key>' \
--data '
{
"title": "Deal health",
"prompt": {
"outputType": "Rating",
"prompt": "Rate how likely this deal is to close, based on the engagement of the prospect.",
"ratingScale": 5
},
"creatorEmail": "jsmith@example.com",
"crmField": {
"entity": "Deal",
"name": "deal_health"
}
}
'import requests
url = "https://api.claap.io/v1/deals/fields"
payload = {
"title": "Deal health",
"prompt": {
"outputType": "Rating",
"prompt": "Rate how likely this deal is to close, based on the engagement of the prospect.",
"ratingScale": 5
},
"creatorEmail": "jsmith@example.com",
"crmField": {
"entity": "Deal",
"name": "deal_health"
}
}
headers = {
"X-Claap-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Claap-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Deal health',
prompt: {
outputType: 'Rating',
prompt: 'Rate how likely this deal is to close, based on the engagement of the prospect.',
ratingScale: 5
},
creatorEmail: 'jsmith@example.com',
crmField: {entity: 'Deal', name: 'deal_health'}
})
};
fetch('https://api.claap.io/v1/deals/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.claap.io/v1/deals/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([
'title' => 'Deal health',
'prompt' => [
'outputType' => 'Rating',
'prompt' => 'Rate how likely this deal is to close, based on the engagement of the prospect.',
'ratingScale' => 5
],
'creatorEmail' => 'jsmith@example.com',
'crmField' => [
'entity' => 'Deal',
'name' => 'deal_health'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Claap-Key: <api-key>"
],
]);
$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.claap.io/v1/deals/fields"
payload := strings.NewReader("{\n \"title\": \"Deal health\",\n \"prompt\": {\n \"outputType\": \"Rating\",\n \"prompt\": \"Rate how likely this deal is to close, based on the engagement of the prospect.\",\n \"ratingScale\": 5\n },\n \"creatorEmail\": \"jsmith@example.com\",\n \"crmField\": {\n \"entity\": \"Deal\",\n \"name\": \"deal_health\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Claap-Key", "<api-key>")
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.claap.io/v1/deals/fields")
.header("X-Claap-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Deal health\",\n \"prompt\": {\n \"outputType\": \"Rating\",\n \"prompt\": \"Rate how likely this deal is to close, based on the engagement of the prospect.\",\n \"ratingScale\": 5\n },\n \"creatorEmail\": \"jsmith@example.com\",\n \"crmField\": {\n \"entity\": \"Deal\",\n \"name\": \"deal_health\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.claap.io/v1/deals/fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Claap-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Deal health\",\n \"prompt\": {\n \"outputType\": \"Rating\",\n \"prompt\": \"Rate how likely this deal is to close, based on the engagement of the prospect.\",\n \"ratingScale\": 5\n },\n \"creatorEmail\": \"jsmith@example.com\",\n \"crmField\": {\n \"entity\": \"Deal\",\n \"name\": \"deal_health\"\n }\n}"
response = http.request(request)
puts response.read_body{
"result": {
"fieldId": "DealAiSection#Mv6Zq1Xs8Dg3Pk5Wr9Tc2",
"title": "Deal health",
"kind": "Field",
"outputType": "Rating",
"prompt": "Rate how likely this deal is to close, based on the engagement of the prospect.",
"ratingScale": 5,
"crmField": {
"entity": "Deal",
"label": "Deal health",
"name": "deal_health",
"source": "Hubspot",
"type": "Numeric"
},
"authorId": "Xk2Rd7Mv4Bn9Ts1Lq6Wf3",
"createdAt": "2026-05-14T09:30:00Z"
}
}creatorEmail must belong to an active workspace member, who becomes the field author. The field is evaluated for deals as new activity comes in; no values are generated for deals whose activity does not change.Authorizations
Body
The field title.
The prompt evaluated by the AI to fill the field.
Show child attributes
Show child attributes
Email address of the field creator. It must belong to an active workspace member, who becomes the field author.
The CRM property to map the field to. When omitted, the field is not mapped to the CRM.
Show child attributes
Show child attributes
Response
Deal AI field was successfully created
An AI field: a custom prompt with a typed output, evaluated by AI. Usable as an AiSection view column through its fieldId.
Show child attributes
Show child attributes
curl --request POST \
--url https://api.claap.io/v1/deals/fields \
--header 'Content-Type: application/json' \
--header 'X-Claap-Key: <api-key>' \
--data '
{
"title": "Deal health",
"prompt": {
"outputType": "Rating",
"prompt": "Rate how likely this deal is to close, based on the engagement of the prospect.",
"ratingScale": 5
},
"creatorEmail": "jsmith@example.com",
"crmField": {
"entity": "Deal",
"name": "deal_health"
}
}
'import requests
url = "https://api.claap.io/v1/deals/fields"
payload = {
"title": "Deal health",
"prompt": {
"outputType": "Rating",
"prompt": "Rate how likely this deal is to close, based on the engagement of the prospect.",
"ratingScale": 5
},
"creatorEmail": "jsmith@example.com",
"crmField": {
"entity": "Deal",
"name": "deal_health"
}
}
headers = {
"X-Claap-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Claap-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Deal health',
prompt: {
outputType: 'Rating',
prompt: 'Rate how likely this deal is to close, based on the engagement of the prospect.',
ratingScale: 5
},
creatorEmail: 'jsmith@example.com',
crmField: {entity: 'Deal', name: 'deal_health'}
})
};
fetch('https://api.claap.io/v1/deals/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.claap.io/v1/deals/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([
'title' => 'Deal health',
'prompt' => [
'outputType' => 'Rating',
'prompt' => 'Rate how likely this deal is to close, based on the engagement of the prospect.',
'ratingScale' => 5
],
'creatorEmail' => 'jsmith@example.com',
'crmField' => [
'entity' => 'Deal',
'name' => 'deal_health'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Claap-Key: <api-key>"
],
]);
$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.claap.io/v1/deals/fields"
payload := strings.NewReader("{\n \"title\": \"Deal health\",\n \"prompt\": {\n \"outputType\": \"Rating\",\n \"prompt\": \"Rate how likely this deal is to close, based on the engagement of the prospect.\",\n \"ratingScale\": 5\n },\n \"creatorEmail\": \"jsmith@example.com\",\n \"crmField\": {\n \"entity\": \"Deal\",\n \"name\": \"deal_health\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Claap-Key", "<api-key>")
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.claap.io/v1/deals/fields")
.header("X-Claap-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Deal health\",\n \"prompt\": {\n \"outputType\": \"Rating\",\n \"prompt\": \"Rate how likely this deal is to close, based on the engagement of the prospect.\",\n \"ratingScale\": 5\n },\n \"creatorEmail\": \"jsmith@example.com\",\n \"crmField\": {\n \"entity\": \"Deal\",\n \"name\": \"deal_health\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.claap.io/v1/deals/fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Claap-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Deal health\",\n \"prompt\": {\n \"outputType\": \"Rating\",\n \"prompt\": \"Rate how likely this deal is to close, based on the engagement of the prospect.\",\n \"ratingScale\": 5\n },\n \"creatorEmail\": \"jsmith@example.com\",\n \"crmField\": {\n \"entity\": \"Deal\",\n \"name\": \"deal_health\"\n }\n}"
response = http.request(request)
puts response.read_body{
"result": {
"fieldId": "DealAiSection#Mv6Zq1Xs8Dg3Pk5Wr9Tc2",
"title": "Deal health",
"kind": "Field",
"outputType": "Rating",
"prompt": "Rate how likely this deal is to close, based on the engagement of the prospect.",
"ratingScale": 5,
"crmField": {
"entity": "Deal",
"label": "Deal health",
"name": "deal_health",
"source": "Hubspot",
"type": "Numeric"
},
"authorId": "Xk2Rd7Mv4Bn9Ts1Lq6Wf3",
"createdAt": "2026-05-14T09:30:00Z"
}
}