curl --request POST \
--url https://app.octavehq.com/api/v2/deal/revenue-metrics \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"closeDateFrom": "<string>",
"closeDateTo": "<string>",
"asOf": "<string>",
"tagGroupId": "<string>"
}
'import requests
url = "https://app.octavehq.com/api/v2/deal/revenue-metrics"
payload = {
"closeDateFrom": "<string>",
"closeDateTo": "<string>",
"asOf": "<string>",
"tagGroupId": "<string>"
}
headers = {
"api_key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {api_key: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
closeDateFrom: '<string>',
closeDateTo: '<string>',
asOf: '<string>',
tagGroupId: '<string>'
})
};
fetch('https://app.octavehq.com/api/v2/deal/revenue-metrics', 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://app.octavehq.com/api/v2/deal/revenue-metrics",
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([
'closeDateFrom' => '<string>',
'closeDateTo' => '<string>',
'asOf' => '<string>',
'tagGroupId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api_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://app.octavehq.com/api/v2/deal/revenue-metrics"
payload := strings.NewReader("{\n \"closeDateFrom\": \"<string>\",\n \"closeDateTo\": \"<string>\",\n \"asOf\": \"<string>\",\n \"tagGroupId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api_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://app.octavehq.com/api/v2/deal/revenue-metrics")
.header("api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"closeDateFrom\": \"<string>\",\n \"closeDateTo\": \"<string>\",\n \"asOf\": \"<string>\",\n \"tagGroupId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.octavehq.com/api/v2/deal/revenue-metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"closeDateFrom\": \"<string>\",\n \"closeDateTo\": \"<string>\",\n \"asOf\": \"<string>\",\n \"tagGroupId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"_metadata": {
"requestId": "requestId",
"timestamp": "2021-01-01T00:00:00.000Z",
"usage": 0,
"message": "message"
},
"asOf": "<string>",
"window": {
"from": "<string>",
"to": "<string>"
},
"rule": {
"isSet": true,
"pipelines": [],
"excludedDealTypes": []
},
"homeCurrency": "<string>",
"totals": {
"closedWonAmount": 123,
"wonDeals": 123,
"lostDeals": 123,
"winRate": 123,
"averageDealSize": 123,
"medianDealSize": 123,
"medianCycleDays": 123,
"medianWonCycleDays": 123,
"wonDealOIds": [
"<string>"
]
},
"groups": {
"groupBy": "segment",
"guide": "<string>",
"overlapping": true,
"rows": [
{
"closedWonAmount": 123,
"wonDeals": 123,
"lostDeals": 123,
"winRate": 123,
"averageDealSize": 123,
"medianDealSize": 123,
"medianCycleDays": 123,
"medianWonCycleDays": 123,
"wonDealOIds": [
"<string>"
],
"key": "<string>",
"label": "<string>",
"unassigned": "not_raised",
"explanation": "<string>"
}
],
"tagGroup": {
"oId": "<string>",
"name": "<string>"
}
},
"coverage": {
"closedDealsSynced": 123,
"closedDealsInWindow": 123,
"earliestClosedDate": "<string>",
"latestSyncedAt": "<string>",
"windowStartsBeforeSync": true,
"wonDealsWithoutAmount": 123,
"dealsWithoutConversations": 123
},
"warnings": [
"<string>"
],
"summary": "<string>"
}{
"_metadata": {
"requestId": "requestId",
"timestamp": "2021-01-01T00:00:00.000Z",
"usage": 0,
"message": "message"
},
"message": "<string>"
}Get Revenue Metrics
Closed-won bookings and win rate from the CRM deals Octave has synced. This is not ARR and not billing revenue: the sync covers only part of the history (see coverage.earliestClosedDate), churn usually leaves no CRM deal, and amounts are contract values. Computed by code, the same on every call over the same data: use it instead of adding up deal/list rows yourself. For a close-date window (closeDateFrom / closeDateTo, whole days; omit for all synced history) it returns closed-won bookings (closedWonAmount), win rate (won / (won + lost)), average and median deal size, and median sales cycle in days (creation to close), all in the workspace’s home currency (amountHome). Which deals count is the workspace’s revenue rule: which pipelines count and which deal types are left out. The rule is the workspace’s setting (the result echoes it under rule); the request cannot override it. A multi-year deal counts at its full amount. Never present these figures as ARR, and never call a window without a start all-time: it begins where the sync does. Pass groupBy to break the window down by segment (the account’s segment), use_case, persona, offering (a product, service or solution), core_feature (what the deal’s conversations raised; a deal falls under every one it raised, so those rows overlap and do not add up to the totals), tag (needs tagGroupId, an oId from tag-group/list, and nothing else takes it; tag rows overlap too), or owner (the CRM deal owner). Deals with no group are in rows with key null, told apart by the row’s unassigned reason: “not_raised” means the deal has recorded calls or emails but none raised one, while “no_conversations” means Octave has no recorded calls or emails for the deal at all, so the row says nothing about what the deal was about; segment, owner and tag use no_segment, no_owner and no_tag. Every number carries the won deal ids behind it. Read coverage and warnings before quoting a figure: windowStartsBeforeSync means older deals are missing from the totals, coverage.dealsWithoutConversations counts closed deals with no recorded calls or emails, and warnings name rule values that matched nothing. Deals outside Octave’s sync are not counted. REST twin of the get_revenue_metrics MCP tool; takes the same body.
curl --request POST \
--url https://app.octavehq.com/api/v2/deal/revenue-metrics \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"closeDateFrom": "<string>",
"closeDateTo": "<string>",
"asOf": "<string>",
"tagGroupId": "<string>"
}
'import requests
url = "https://app.octavehq.com/api/v2/deal/revenue-metrics"
payload = {
"closeDateFrom": "<string>",
"closeDateTo": "<string>",
"asOf": "<string>",
"tagGroupId": "<string>"
}
headers = {
"api_key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {api_key: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
closeDateFrom: '<string>',
closeDateTo: '<string>',
asOf: '<string>',
tagGroupId: '<string>'
})
};
fetch('https://app.octavehq.com/api/v2/deal/revenue-metrics', 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://app.octavehq.com/api/v2/deal/revenue-metrics",
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([
'closeDateFrom' => '<string>',
'closeDateTo' => '<string>',
'asOf' => '<string>',
'tagGroupId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api_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://app.octavehq.com/api/v2/deal/revenue-metrics"
payload := strings.NewReader("{\n \"closeDateFrom\": \"<string>\",\n \"closeDateTo\": \"<string>\",\n \"asOf\": \"<string>\",\n \"tagGroupId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api_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://app.octavehq.com/api/v2/deal/revenue-metrics")
.header("api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"closeDateFrom\": \"<string>\",\n \"closeDateTo\": \"<string>\",\n \"asOf\": \"<string>\",\n \"tagGroupId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.octavehq.com/api/v2/deal/revenue-metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"closeDateFrom\": \"<string>\",\n \"closeDateTo\": \"<string>\",\n \"asOf\": \"<string>\",\n \"tagGroupId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"_metadata": {
"requestId": "requestId",
"timestamp": "2021-01-01T00:00:00.000Z",
"usage": 0,
"message": "message"
},
"asOf": "<string>",
"window": {
"from": "<string>",
"to": "<string>"
},
"rule": {
"isSet": true,
"pipelines": [],
"excludedDealTypes": []
},
"homeCurrency": "<string>",
"totals": {
"closedWonAmount": 123,
"wonDeals": 123,
"lostDeals": 123,
"winRate": 123,
"averageDealSize": 123,
"medianDealSize": 123,
"medianCycleDays": 123,
"medianWonCycleDays": 123,
"wonDealOIds": [
"<string>"
]
},
"groups": {
"groupBy": "segment",
"guide": "<string>",
"overlapping": true,
"rows": [
{
"closedWonAmount": 123,
"wonDeals": 123,
"lostDeals": 123,
"winRate": 123,
"averageDealSize": 123,
"medianDealSize": 123,
"medianCycleDays": 123,
"medianWonCycleDays": 123,
"wonDealOIds": [
"<string>"
],
"key": "<string>",
"label": "<string>",
"unassigned": "not_raised",
"explanation": "<string>"
}
],
"tagGroup": {
"oId": "<string>",
"name": "<string>"
}
},
"coverage": {
"closedDealsSynced": 123,
"closedDealsInWindow": 123,
"earliestClosedDate": "<string>",
"latestSyncedAt": "<string>",
"windowStartsBeforeSync": true,
"wonDealsWithoutAmount": 123,
"dealsWithoutConversations": 123
},
"warnings": [
"<string>"
],
"summary": "<string>"
}{
"_metadata": {
"requestId": "requestId",
"timestamp": "2021-01-01T00:00:00.000Z",
"usage": 0,
"message": "message"
},
"message": "<string>"
}Body
Close-date window and optional breakdown
Break the window's numbers down by segment (the account's segment), use_case, persona, offering (product, service or solution) or core_feature (what the deal's conversations raised; a deal can fall under several, so rows overlap), tag (the tags in the tagGroupId group carried by the library entities the deal is linked to; a deal falls under each tag once, so rows overlap), or owner (the CRM deal owner). Omit for totals only.
segment, use_case, persona, owner, offering, core_feature, tag Only with groupBy "tag": the oId of the tag group to break down by (list_tag_groups returns them). A tag group applies to one kind of library entity (segment, use case, persona, product, service, solution or core feature); a deal falls under a tag when the entity of that kind it is linked to carries the tag, and in the "No tag in group" row when none does (or "No calls or emails" when it has no recorded conversations).
1Response
Revenue metrics for the window