Refresh Account Health
curl --request POST \
--url https://api.example.com/accounts/{account_id}/health/refresh \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/accounts/{account_id}/health/refresh"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/accounts/{account_id}/health/refresh', 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.example.com/accounts/{account_id}/health/refresh",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/accounts/{account_id}/health/refresh"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.example.com/accounts/{account_id}/health/refresh")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/accounts/{account_id}/health/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Accounts
Refresh Account Health
POST
/
accounts
/
{account_id}
/
health
/
refresh
Refresh Account Health
curl --request POST \
--url https://api.example.com/accounts/{account_id}/health/refresh \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/accounts/{account_id}/health/refresh"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/accounts/{account_id}/health/refresh', 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.example.com/accounts/{account_id}/health/refresh",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/accounts/{account_id}/health/refresh"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.example.com/accounts/{account_id}/health/refresh")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/accounts/{account_id}/health/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Recomputes the account’s health score from scratch and stores a new snapshot. This is a rule-based calculation, not an AI call — it scores 9 fixed factors (pipeline health, communication recency, contact breadth, contact engagement spread, meeting cadence, deal pipeline value, deal win rate, task follow-through, new-deal recency) against data pulled live from
deals, activities, contacts, and open tasks for this account, starting from a base of 50 and clamping the result to 0–100.
trend compares the new score to the account’s snapshot from ~30 days ago (falling back to the oldest available snapshot if the account has less than 30 days of history): improving if the score rose by more than 3 points, declining if it fell by more than 3, otherwise stable. On an account’s first-ever refresh (no prior snapshot at all), trend is always stable.
As a side effect, this also writes the new score onto accounts.health_score (the denormalized column returned by List Accounts and Update an Account) — but that write is best-effort: if it fails, the refresh still returns 200 with the freshly computed score, it just doesn’t get reflected on the account row.
Auth
Requires a CRM manage scope and an active organization on the token. Any*:manage scope qualifies — in practice contacts:manage, deals:manage, companies:manage, or activities:manage.
Response
| Field | Type | Description |
|---|---|---|
score | integer | New health score, 0–100. |
trend | string | improving, declining, or stable. |
factors | array of factor objects | The 9 factors that produced score. See below. |
factors[].factor_name | string | e.g. pipeline_health, communication_recency, contact_breadth, contact_engagement_spread, meeting_cadence, deal_pipeline_value, deal_win_rate, task_follow_through, new_deal_recency. |
factors[].score | integer | This factor’s signed contribution to the score (can be negative). |
factors[].max_score | integer | The most this factor could have contributed. |
factors[].status | string | good if score > 5, critical if score <= -5, otherwise neutral. |
factors[].evidence | string | Human-readable reason, e.g. "Last activity 3d ago". |
snapshot_id | string (uuid) | Id of the row inserted into the health-history table. |