curl --request POST \
--url https://api.neoagent.io/public-api/insights/problems/analyze \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"excluded_psa_company_ids": [
"<string>"
],
"months": [
"<string>"
],
"period_days": 123,
"psa_company_id": "<string>",
"sample_size": 123
}
'import requests
url = "https://api.neoagent.io/public-api/insights/problems/analyze"
payload = {
"excluded_psa_company_ids": ["<string>"],
"months": ["<string>"],
"period_days": 123,
"psa_company_id": "<string>",
"sample_size": 123
}
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({
excluded_psa_company_ids: ['<string>'],
months: ['<string>'],
period_days: 123,
psa_company_id: '<string>',
sample_size: 123
})
};
fetch('https://api.neoagent.io/public-api/insights/problems/analyze', 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.neoagent.io/public-api/insights/problems/analyze",
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([
'excluded_psa_company_ids' => [
'<string>'
],
'months' => [
'<string>'
],
'period_days' => 123,
'psa_company_id' => '<string>',
'sample_size' => 123
]),
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.neoagent.io/public-api/insights/problems/analyze"
payload := strings.NewReader("{\n \"excluded_psa_company_ids\": [\n \"<string>\"\n ],\n \"months\": [\n \"<string>\"\n ],\n \"period_days\": 123,\n \"psa_company_id\": \"<string>\",\n \"sample_size\": 123\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.neoagent.io/public-api/insights/problems/analyze")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"excluded_psa_company_ids\": [\n \"<string>\"\n ],\n \"months\": [\n \"<string>\"\n ],\n \"period_days\": 123,\n \"psa_company_id\": \"<string>\",\n \"sample_size\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neoagent.io/public-api/insights/problems/analyze")
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 \"excluded_psa_company_ids\": [\n \"<string>\"\n ],\n \"months\": [\n \"<string>\"\n ],\n \"period_days\": 123,\n \"psa_company_id\": \"<string>\",\n \"sample_size\": 123\n}"
response = http.request(request)
puts response.read_body{
"data": {
"analysis_id": 123,
"status": "PENDING"
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timings_ms": {},
"pagination": {
"has_more": true,
"next_cursor": "<string>"
},
"warnings": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Build a problem map
Admins and owners only (an API key with no acting user counts as one). Async: samples the tenant’s tickets, groups them into recurring problems and prices each one; returns 202 with {analysis_id, status: PENDING}, so poll /insights/problems/status?analysis_id=. A map takes tens of minutes. Company ids come from /end-companies. 409 when a map of the same scope or another whole-desk map is building (error.details.analysis_id names it), a PSA sync is running, or a trial has used its 25 analyses. Insights uses no credits.
curl --request POST \
--url https://api.neoagent.io/public-api/insights/problems/analyze \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"excluded_psa_company_ids": [
"<string>"
],
"months": [
"<string>"
],
"period_days": 123,
"psa_company_id": "<string>",
"sample_size": 123
}
'import requests
url = "https://api.neoagent.io/public-api/insights/problems/analyze"
payload = {
"excluded_psa_company_ids": ["<string>"],
"months": ["<string>"],
"period_days": 123,
"psa_company_id": "<string>",
"sample_size": 123
}
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({
excluded_psa_company_ids: ['<string>'],
months: ['<string>'],
period_days: 123,
psa_company_id: '<string>',
sample_size: 123
})
};
fetch('https://api.neoagent.io/public-api/insights/problems/analyze', 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.neoagent.io/public-api/insights/problems/analyze",
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([
'excluded_psa_company_ids' => [
'<string>'
],
'months' => [
'<string>'
],
'period_days' => 123,
'psa_company_id' => '<string>',
'sample_size' => 123
]),
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.neoagent.io/public-api/insights/problems/analyze"
payload := strings.NewReader("{\n \"excluded_psa_company_ids\": [\n \"<string>\"\n ],\n \"months\": [\n \"<string>\"\n ],\n \"period_days\": 123,\n \"psa_company_id\": \"<string>\",\n \"sample_size\": 123\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.neoagent.io/public-api/insights/problems/analyze")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"excluded_psa_company_ids\": [\n \"<string>\"\n ],\n \"months\": [\n \"<string>\"\n ],\n \"period_days\": 123,\n \"psa_company_id\": \"<string>\",\n \"sample_size\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neoagent.io/public-api/insights/problems/analyze")
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 \"excluded_psa_company_ids\": [\n \"<string>\"\n ],\n \"months\": [\n \"<string>\"\n ],\n \"period_days\": 123,\n \"psa_company_id\": \"<string>\",\n \"sample_size\": 123\n}"
response = http.request(request)
puts response.read_body{
"data": {
"analysis_id": 123,
"status": "PENDING"
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timings_ms": {},
"pagination": {
"has_more": true,
"next_cursor": "<string>"
},
"warnings": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Authorizations
Authorization: Bearer <token> where <token> is either a neo_sk_<env>_<secret> API key (service account) or a Microsoft Entra ID access token (dashboard user).
Body
period_days (default 90) or calendar months ("YYYY-MM", at most 24) set the window. One end-client
company (psa_company_id) or the whole desk minus excluded_psa_company_ids; never both. sample_size
defaults to 6000, at most 8000.
