curl --request POST \
--url https://app.octavehq.com/api/v2/event/cohort-deals \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"cohortA": {
"label": "<string>",
"filters": {
"entityMatchAll": true,
"eventOIds": [
"<string>"
],
"opportunityIds": [
"<string>"
],
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": [
"<string>"
],
"companyDomains": [
"<string>"
],
"outcomeFilters": [],
"opportunityStatuses": [],
"dealMotions": [],
"dealTypes": [
"<string>"
],
"dealStages": [
"<string>"
],
"dealStagesAtEvent": [
"<string>"
],
"pipelinePhases": [],
"crmPipelines": [
"<string>"
],
"minStalledDays": 123,
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": [
"<string>"
],
"personas": [
"<string>"
],
"segments": [
"<string>"
],
"tags": [
"<string>"
],
"useCases": [
"<string>"
],
"references": [
"<string>"
],
"competitors": [
"<string>"
],
"alternatives": [
"<string>"
],
"buyingTriggers": [
"<string>"
],
"coreFeatures": [
"<string>"
],
"objections": [
"<string>"
],
"proofPoints": [
"<string>"
],
"motionTypes": [],
"callPurposes": [],
"unmatchedOnly": true
}
},
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"filters": {
"entityMatchAll": true,
"eventOIds": [
"<string>"
],
"opportunityIds": [
"<string>"
],
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": [
"<string>"
],
"companyDomains": [
"<string>"
],
"outcomeFilters": [],
"opportunityStatuses": [],
"dealMotions": [],
"dealTypes": [
"<string>"
],
"dealStages": [
"<string>"
],
"dealStagesAtEvent": [
"<string>"
],
"pipelinePhases": [],
"crmPipelines": [
"<string>"
],
"minStalledDays": 123,
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": [
"<string>"
],
"personas": [
"<string>"
],
"segments": [
"<string>"
],
"tags": [
"<string>"
],
"useCases": [
"<string>"
],
"references": [
"<string>"
],
"competitors": [
"<string>"
],
"alternatives": [
"<string>"
],
"buyingTriggers": [
"<string>"
],
"coreFeatures": [
"<string>"
],
"objections": [
"<string>"
],
"proofPoints": [
"<string>"
],
"motionTypes": [],
"callPurposes": [],
"unmatchedOnly": true
},
"exclude": {
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": [
"<string>"
],
"companyDomains": [
"<string>"
],
"outcomeFilters": [],
"opportunityStatuses": [],
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": [
"<string>"
],
"personas": [
"<string>"
],
"segments": [
"<string>"
],
"tags": [
"<string>"
],
"useCases": [
"<string>"
],
"references": [
"<string>"
],
"competitors": [
"<string>"
],
"alternatives": [
"<string>"
],
"buyingTriggers": [
"<string>"
],
"coreFeatures": [
"<string>"
],
"objections": [
"<string>"
],
"proofPoints": [
"<string>"
],
"motionTypes": [],
"callPurposes": [],
"dealMotions": [],
"dealTypes": [
"<string>"
],
"dealStages": [
"<string>"
],
"pipelinePhases": []
},
"excludeTags": [
"<string>"
],
"outcome": {
"metric": "win_rate"
},
"limit": 25,
"cursor": "<string>"
}
'import requests
url = "https://app.octavehq.com/api/v2/event/cohort-deals"
payload = {
"cohortA": {
"label": "<string>",
"filters": {
"entityMatchAll": True,
"eventOIds": ["<string>"],
"opportunityIds": ["<string>"],
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": ["<string>"],
"companyDomains": ["<string>"],
"outcomeFilters": [],
"opportunityStatuses": [],
"dealMotions": [],
"dealTypes": ["<string>"],
"dealStages": ["<string>"],
"dealStagesAtEvent": ["<string>"],
"pipelinePhases": [],
"crmPipelines": ["<string>"],
"minStalledDays": 123,
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": ["<string>"],
"personas": ["<string>"],
"segments": ["<string>"],
"tags": ["<string>"],
"useCases": ["<string>"],
"references": ["<string>"],
"competitors": ["<string>"],
"alternatives": ["<string>"],
"buyingTriggers": ["<string>"],
"coreFeatures": ["<string>"],
"objections": ["<string>"],
"proofPoints": ["<string>"],
"motionTypes": [],
"callPurposes": [],
"unmatchedOnly": True
}
},
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"filters": {
"entityMatchAll": True,
"eventOIds": ["<string>"],
"opportunityIds": ["<string>"],
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": ["<string>"],
"companyDomains": ["<string>"],
"outcomeFilters": [],
"opportunityStatuses": [],
"dealMotions": [],
"dealTypes": ["<string>"],
"dealStages": ["<string>"],
"dealStagesAtEvent": ["<string>"],
"pipelinePhases": [],
"crmPipelines": ["<string>"],
"minStalledDays": 123,
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": ["<string>"],
"personas": ["<string>"],
"segments": ["<string>"],
"tags": ["<string>"],
"useCases": ["<string>"],
"references": ["<string>"],
"competitors": ["<string>"],
"alternatives": ["<string>"],
"buyingTriggers": ["<string>"],
"coreFeatures": ["<string>"],
"objections": ["<string>"],
"proofPoints": ["<string>"],
"motionTypes": [],
"callPurposes": [],
"unmatchedOnly": True
},
"exclude": {
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": ["<string>"],
"companyDomains": ["<string>"],
"outcomeFilters": [],
"opportunityStatuses": [],
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": ["<string>"],
"personas": ["<string>"],
"segments": ["<string>"],
"tags": ["<string>"],
"useCases": ["<string>"],
"references": ["<string>"],
"competitors": ["<string>"],
"alternatives": ["<string>"],
"buyingTriggers": ["<string>"],
"coreFeatures": ["<string>"],
"objections": ["<string>"],
"proofPoints": ["<string>"],
"motionTypes": [],
"callPurposes": [],
"dealMotions": [],
"dealTypes": ["<string>"],
"dealStages": ["<string>"],
"pipelinePhases": []
},
"excludeTags": ["<string>"],
"outcome": { "metric": "win_rate" },
"limit": 25,
"cursor": "<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({
cohortA: {
label: '<string>',
filters: {
entityMatchAll: true,
eventOIds: ['<string>'],
opportunityIds: ['<string>'],
eventCategories: [],
eventTypes: [],
sentiments: [],
contactEmails: ['<string>'],
companyDomains: ['<string>'],
outcomeFilters: [],
opportunityStatuses: [],
dealMotions: [],
dealTypes: ['<string>'],
dealStages: ['<string>'],
dealStagesAtEvent: ['<string>'],
pipelinePhases: [],
crmPipelines: ['<string>'],
minStalledDays: 123,
minDealAmount: 123,
maxDealAmount: 123,
offerings: ['<string>'],
personas: ['<string>'],
segments: ['<string>'],
tags: ['<string>'],
useCases: ['<string>'],
references: ['<string>'],
competitors: ['<string>'],
alternatives: ['<string>'],
buyingTriggers: ['<string>'],
coreFeatures: ['<string>'],
objections: ['<string>'],
proofPoints: ['<string>'],
motionTypes: [],
callPurposes: [],
unmatchedOnly: true
}
},
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
filters: {
entityMatchAll: true,
eventOIds: ['<string>'],
opportunityIds: ['<string>'],
eventCategories: [],
eventTypes: [],
sentiments: [],
contactEmails: ['<string>'],
companyDomains: ['<string>'],
outcomeFilters: [],
opportunityStatuses: [],
dealMotions: [],
dealTypes: ['<string>'],
dealStages: ['<string>'],
dealStagesAtEvent: ['<string>'],
pipelinePhases: [],
crmPipelines: ['<string>'],
minStalledDays: 123,
minDealAmount: 123,
maxDealAmount: 123,
offerings: ['<string>'],
personas: ['<string>'],
segments: ['<string>'],
tags: ['<string>'],
useCases: ['<string>'],
references: ['<string>'],
competitors: ['<string>'],
alternatives: ['<string>'],
buyingTriggers: ['<string>'],
coreFeatures: ['<string>'],
objections: ['<string>'],
proofPoints: ['<string>'],
motionTypes: [],
callPurposes: [],
unmatchedOnly: true
},
exclude: {
eventCategories: [],
eventTypes: [],
sentiments: [],
contactEmails: ['<string>'],
companyDomains: ['<string>'],
outcomeFilters: [],
opportunityStatuses: [],
minDealAmount: 123,
maxDealAmount: 123,
offerings: ['<string>'],
personas: ['<string>'],
segments: ['<string>'],
tags: ['<string>'],
useCases: ['<string>'],
references: ['<string>'],
competitors: ['<string>'],
alternatives: ['<string>'],
buyingTriggers: ['<string>'],
coreFeatures: ['<string>'],
objections: ['<string>'],
proofPoints: ['<string>'],
motionTypes: [],
callPurposes: [],
dealMotions: [],
dealTypes: ['<string>'],
dealStages: ['<string>'],
pipelinePhases: []
},
excludeTags: ['<string>'],
outcome: {metric: 'win_rate'},
limit: 25,
cursor: '<string>'
})
};
fetch('https://app.octavehq.com/api/v2/event/cohort-deals', 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/event/cohort-deals",
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([
'cohortA' => [
'label' => '<string>',
'filters' => [
'entityMatchAll' => true,
'eventOIds' => [
'<string>'
],
'opportunityIds' => [
'<string>'
],
'eventCategories' => [
],
'eventTypes' => [
],
'sentiments' => [
],
'contactEmails' => [
'<string>'
],
'companyDomains' => [
'<string>'
],
'outcomeFilters' => [
],
'opportunityStatuses' => [
],
'dealMotions' => [
],
'dealTypes' => [
'<string>'
],
'dealStages' => [
'<string>'
],
'dealStagesAtEvent' => [
'<string>'
],
'pipelinePhases' => [
],
'crmPipelines' => [
'<string>'
],
'minStalledDays' => 123,
'minDealAmount' => 123,
'maxDealAmount' => 123,
'offerings' => [
'<string>'
],
'personas' => [
'<string>'
],
'segments' => [
'<string>'
],
'tags' => [
'<string>'
],
'useCases' => [
'<string>'
],
'references' => [
'<string>'
],
'competitors' => [
'<string>'
],
'alternatives' => [
'<string>'
],
'buyingTriggers' => [
'<string>'
],
'coreFeatures' => [
'<string>'
],
'objections' => [
'<string>'
],
'proofPoints' => [
'<string>'
],
'motionTypes' => [
],
'callPurposes' => [
],
'unmatchedOnly' => true
]
],
'startDate' => '2023-11-07T05:31:56Z',
'endDate' => '2023-11-07T05:31:56Z',
'filters' => [
'entityMatchAll' => true,
'eventOIds' => [
'<string>'
],
'opportunityIds' => [
'<string>'
],
'eventCategories' => [
],
'eventTypes' => [
],
'sentiments' => [
],
'contactEmails' => [
'<string>'
],
'companyDomains' => [
'<string>'
],
'outcomeFilters' => [
],
'opportunityStatuses' => [
],
'dealMotions' => [
],
'dealTypes' => [
'<string>'
],
'dealStages' => [
'<string>'
],
'dealStagesAtEvent' => [
'<string>'
],
'pipelinePhases' => [
],
'crmPipelines' => [
'<string>'
],
'minStalledDays' => 123,
'minDealAmount' => 123,
'maxDealAmount' => 123,
'offerings' => [
'<string>'
],
'personas' => [
'<string>'
],
'segments' => [
'<string>'
],
'tags' => [
'<string>'
],
'useCases' => [
'<string>'
],
'references' => [
'<string>'
],
'competitors' => [
'<string>'
],
'alternatives' => [
'<string>'
],
'buyingTriggers' => [
'<string>'
],
'coreFeatures' => [
'<string>'
],
'objections' => [
'<string>'
],
'proofPoints' => [
'<string>'
],
'motionTypes' => [
],
'callPurposes' => [
],
'unmatchedOnly' => true
],
'exclude' => [
'eventCategories' => [
],
'eventTypes' => [
],
'sentiments' => [
],
'contactEmails' => [
'<string>'
],
'companyDomains' => [
'<string>'
],
'outcomeFilters' => [
],
'opportunityStatuses' => [
],
'minDealAmount' => 123,
'maxDealAmount' => 123,
'offerings' => [
'<string>'
],
'personas' => [
'<string>'
],
'segments' => [
'<string>'
],
'tags' => [
'<string>'
],
'useCases' => [
'<string>'
],
'references' => [
'<string>'
],
'competitors' => [
'<string>'
],
'alternatives' => [
'<string>'
],
'buyingTriggers' => [
'<string>'
],
'coreFeatures' => [
'<string>'
],
'objections' => [
'<string>'
],
'proofPoints' => [
'<string>'
],
'motionTypes' => [
],
'callPurposes' => [
],
'dealMotions' => [
],
'dealTypes' => [
'<string>'
],
'dealStages' => [
'<string>'
],
'pipelinePhases' => [
]
],
'excludeTags' => [
'<string>'
],
'outcome' => [
'metric' => 'win_rate'
],
'limit' => 25,
'cursor' => '<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/event/cohort-deals"
payload := strings.NewReader("{\n \"cohortA\": {\n \"label\": \"<string>\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n }\n },\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n },\n \"exclude\": {\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"pipelinePhases\": []\n },\n \"excludeTags\": [\n \"<string>\"\n ],\n \"outcome\": {\n \"metric\": \"win_rate\"\n },\n \"limit\": 25,\n \"cursor\": \"<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/event/cohort-deals")
.header("api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"cohortA\": {\n \"label\": \"<string>\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n }\n },\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n },\n \"exclude\": {\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"pipelinePhases\": []\n },\n \"excludeTags\": [\n \"<string>\"\n ],\n \"outcome\": {\n \"metric\": \"win_rate\"\n },\n \"limit\": 25,\n \"cursor\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.octavehq.com/api/v2/event/cohort-deals")
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 \"cohortA\": {\n \"label\": \"<string>\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n }\n },\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n },\n \"exclude\": {\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"pipelinePhases\": []\n },\n \"excludeTags\": [\n \"<string>\"\n ],\n \"outcome\": {\n \"metric\": \"win_rate\"\n },\n \"limit\": 25,\n \"cursor\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"_metadata": {
"requestId": "requestId",
"timestamp": "2021-01-01T00:00:00.000Z",
"usage": 0,
"message": "message"
},
"side": "A",
"label": "<string>",
"totals": {
"deals": 123,
"wonDeals": 123,
"lostDeals": 123,
"openDeals": 123,
"successes": 123,
"failures": 123,
"notObservable": 123
},
"matchingDeals": 123,
"deals": [
{
"opportunityOId": "<string>",
"name": "<string>",
"outcome": "won",
"result": "success",
"linkTier": "crm_linked",
"excludedBecause": "post_outcome_only",
"stageName": "<string>",
"amount": 123,
"matchingEvents": 123,
"lastMatchingEventAt": "<string>"
}
],
"nextCursor": "<string>",
"dataWindow": {
"kind": "event_range",
"startDate": "<string>",
"endDate": "<string>",
"isDefault": true,
"periodType": "week"
},
"linkScope": "crm_linked",
"linkScopeSource": "request"
}{
"_metadata": {
"requestId": "requestId",
"timestamp": "2021-01-01T00:00:00.000Z",
"usage": 0,
"message": "message"
},
"message": "<string>"
}List Cohort Deals
List the CRM deals on one side of a cohort comparison. Takes the same window, filters and cohorts as Compare Cohorts, plus the side (A, B, or the overlap left out of both), optionally narrowed by dealOutcome or by result on the compared outcome. The returned totals equal that side’s counts in the comparison, so the list is exactly what was counted. REST twin of the list_cohort_deals MCP tool.
curl --request POST \
--url https://app.octavehq.com/api/v2/event/cohort-deals \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"cohortA": {
"label": "<string>",
"filters": {
"entityMatchAll": true,
"eventOIds": [
"<string>"
],
"opportunityIds": [
"<string>"
],
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": [
"<string>"
],
"companyDomains": [
"<string>"
],
"outcomeFilters": [],
"opportunityStatuses": [],
"dealMotions": [],
"dealTypes": [
"<string>"
],
"dealStages": [
"<string>"
],
"dealStagesAtEvent": [
"<string>"
],
"pipelinePhases": [],
"crmPipelines": [
"<string>"
],
"minStalledDays": 123,
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": [
"<string>"
],
"personas": [
"<string>"
],
"segments": [
"<string>"
],
"tags": [
"<string>"
],
"useCases": [
"<string>"
],
"references": [
"<string>"
],
"competitors": [
"<string>"
],
"alternatives": [
"<string>"
],
"buyingTriggers": [
"<string>"
],
"coreFeatures": [
"<string>"
],
"objections": [
"<string>"
],
"proofPoints": [
"<string>"
],
"motionTypes": [],
"callPurposes": [],
"unmatchedOnly": true
}
},
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"filters": {
"entityMatchAll": true,
"eventOIds": [
"<string>"
],
"opportunityIds": [
"<string>"
],
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": [
"<string>"
],
"companyDomains": [
"<string>"
],
"outcomeFilters": [],
"opportunityStatuses": [],
"dealMotions": [],
"dealTypes": [
"<string>"
],
"dealStages": [
"<string>"
],
"dealStagesAtEvent": [
"<string>"
],
"pipelinePhases": [],
"crmPipelines": [
"<string>"
],
"minStalledDays": 123,
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": [
"<string>"
],
"personas": [
"<string>"
],
"segments": [
"<string>"
],
"tags": [
"<string>"
],
"useCases": [
"<string>"
],
"references": [
"<string>"
],
"competitors": [
"<string>"
],
"alternatives": [
"<string>"
],
"buyingTriggers": [
"<string>"
],
"coreFeatures": [
"<string>"
],
"objections": [
"<string>"
],
"proofPoints": [
"<string>"
],
"motionTypes": [],
"callPurposes": [],
"unmatchedOnly": true
},
"exclude": {
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": [
"<string>"
],
"companyDomains": [
"<string>"
],
"outcomeFilters": [],
"opportunityStatuses": [],
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": [
"<string>"
],
"personas": [
"<string>"
],
"segments": [
"<string>"
],
"tags": [
"<string>"
],
"useCases": [
"<string>"
],
"references": [
"<string>"
],
"competitors": [
"<string>"
],
"alternatives": [
"<string>"
],
"buyingTriggers": [
"<string>"
],
"coreFeatures": [
"<string>"
],
"objections": [
"<string>"
],
"proofPoints": [
"<string>"
],
"motionTypes": [],
"callPurposes": [],
"dealMotions": [],
"dealTypes": [
"<string>"
],
"dealStages": [
"<string>"
],
"pipelinePhases": []
},
"excludeTags": [
"<string>"
],
"outcome": {
"metric": "win_rate"
},
"limit": 25,
"cursor": "<string>"
}
'import requests
url = "https://app.octavehq.com/api/v2/event/cohort-deals"
payload = {
"cohortA": {
"label": "<string>",
"filters": {
"entityMatchAll": True,
"eventOIds": ["<string>"],
"opportunityIds": ["<string>"],
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": ["<string>"],
"companyDomains": ["<string>"],
"outcomeFilters": [],
"opportunityStatuses": [],
"dealMotions": [],
"dealTypes": ["<string>"],
"dealStages": ["<string>"],
"dealStagesAtEvent": ["<string>"],
"pipelinePhases": [],
"crmPipelines": ["<string>"],
"minStalledDays": 123,
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": ["<string>"],
"personas": ["<string>"],
"segments": ["<string>"],
"tags": ["<string>"],
"useCases": ["<string>"],
"references": ["<string>"],
"competitors": ["<string>"],
"alternatives": ["<string>"],
"buyingTriggers": ["<string>"],
"coreFeatures": ["<string>"],
"objections": ["<string>"],
"proofPoints": ["<string>"],
"motionTypes": [],
"callPurposes": [],
"unmatchedOnly": True
}
},
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"filters": {
"entityMatchAll": True,
"eventOIds": ["<string>"],
"opportunityIds": ["<string>"],
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": ["<string>"],
"companyDomains": ["<string>"],
"outcomeFilters": [],
"opportunityStatuses": [],
"dealMotions": [],
"dealTypes": ["<string>"],
"dealStages": ["<string>"],
"dealStagesAtEvent": ["<string>"],
"pipelinePhases": [],
"crmPipelines": ["<string>"],
"minStalledDays": 123,
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": ["<string>"],
"personas": ["<string>"],
"segments": ["<string>"],
"tags": ["<string>"],
"useCases": ["<string>"],
"references": ["<string>"],
"competitors": ["<string>"],
"alternatives": ["<string>"],
"buyingTriggers": ["<string>"],
"coreFeatures": ["<string>"],
"objections": ["<string>"],
"proofPoints": ["<string>"],
"motionTypes": [],
"callPurposes": [],
"unmatchedOnly": True
},
"exclude": {
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": ["<string>"],
"companyDomains": ["<string>"],
"outcomeFilters": [],
"opportunityStatuses": [],
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": ["<string>"],
"personas": ["<string>"],
"segments": ["<string>"],
"tags": ["<string>"],
"useCases": ["<string>"],
"references": ["<string>"],
"competitors": ["<string>"],
"alternatives": ["<string>"],
"buyingTriggers": ["<string>"],
"coreFeatures": ["<string>"],
"objections": ["<string>"],
"proofPoints": ["<string>"],
"motionTypes": [],
"callPurposes": [],
"dealMotions": [],
"dealTypes": ["<string>"],
"dealStages": ["<string>"],
"pipelinePhases": []
},
"excludeTags": ["<string>"],
"outcome": { "metric": "win_rate" },
"limit": 25,
"cursor": "<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({
cohortA: {
label: '<string>',
filters: {
entityMatchAll: true,
eventOIds: ['<string>'],
opportunityIds: ['<string>'],
eventCategories: [],
eventTypes: [],
sentiments: [],
contactEmails: ['<string>'],
companyDomains: ['<string>'],
outcomeFilters: [],
opportunityStatuses: [],
dealMotions: [],
dealTypes: ['<string>'],
dealStages: ['<string>'],
dealStagesAtEvent: ['<string>'],
pipelinePhases: [],
crmPipelines: ['<string>'],
minStalledDays: 123,
minDealAmount: 123,
maxDealAmount: 123,
offerings: ['<string>'],
personas: ['<string>'],
segments: ['<string>'],
tags: ['<string>'],
useCases: ['<string>'],
references: ['<string>'],
competitors: ['<string>'],
alternatives: ['<string>'],
buyingTriggers: ['<string>'],
coreFeatures: ['<string>'],
objections: ['<string>'],
proofPoints: ['<string>'],
motionTypes: [],
callPurposes: [],
unmatchedOnly: true
}
},
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
filters: {
entityMatchAll: true,
eventOIds: ['<string>'],
opportunityIds: ['<string>'],
eventCategories: [],
eventTypes: [],
sentiments: [],
contactEmails: ['<string>'],
companyDomains: ['<string>'],
outcomeFilters: [],
opportunityStatuses: [],
dealMotions: [],
dealTypes: ['<string>'],
dealStages: ['<string>'],
dealStagesAtEvent: ['<string>'],
pipelinePhases: [],
crmPipelines: ['<string>'],
minStalledDays: 123,
minDealAmount: 123,
maxDealAmount: 123,
offerings: ['<string>'],
personas: ['<string>'],
segments: ['<string>'],
tags: ['<string>'],
useCases: ['<string>'],
references: ['<string>'],
competitors: ['<string>'],
alternatives: ['<string>'],
buyingTriggers: ['<string>'],
coreFeatures: ['<string>'],
objections: ['<string>'],
proofPoints: ['<string>'],
motionTypes: [],
callPurposes: [],
unmatchedOnly: true
},
exclude: {
eventCategories: [],
eventTypes: [],
sentiments: [],
contactEmails: ['<string>'],
companyDomains: ['<string>'],
outcomeFilters: [],
opportunityStatuses: [],
minDealAmount: 123,
maxDealAmount: 123,
offerings: ['<string>'],
personas: ['<string>'],
segments: ['<string>'],
tags: ['<string>'],
useCases: ['<string>'],
references: ['<string>'],
competitors: ['<string>'],
alternatives: ['<string>'],
buyingTriggers: ['<string>'],
coreFeatures: ['<string>'],
objections: ['<string>'],
proofPoints: ['<string>'],
motionTypes: [],
callPurposes: [],
dealMotions: [],
dealTypes: ['<string>'],
dealStages: ['<string>'],
pipelinePhases: []
},
excludeTags: ['<string>'],
outcome: {metric: 'win_rate'},
limit: 25,
cursor: '<string>'
})
};
fetch('https://app.octavehq.com/api/v2/event/cohort-deals', 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/event/cohort-deals",
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([
'cohortA' => [
'label' => '<string>',
'filters' => [
'entityMatchAll' => true,
'eventOIds' => [
'<string>'
],
'opportunityIds' => [
'<string>'
],
'eventCategories' => [
],
'eventTypes' => [
],
'sentiments' => [
],
'contactEmails' => [
'<string>'
],
'companyDomains' => [
'<string>'
],
'outcomeFilters' => [
],
'opportunityStatuses' => [
],
'dealMotions' => [
],
'dealTypes' => [
'<string>'
],
'dealStages' => [
'<string>'
],
'dealStagesAtEvent' => [
'<string>'
],
'pipelinePhases' => [
],
'crmPipelines' => [
'<string>'
],
'minStalledDays' => 123,
'minDealAmount' => 123,
'maxDealAmount' => 123,
'offerings' => [
'<string>'
],
'personas' => [
'<string>'
],
'segments' => [
'<string>'
],
'tags' => [
'<string>'
],
'useCases' => [
'<string>'
],
'references' => [
'<string>'
],
'competitors' => [
'<string>'
],
'alternatives' => [
'<string>'
],
'buyingTriggers' => [
'<string>'
],
'coreFeatures' => [
'<string>'
],
'objections' => [
'<string>'
],
'proofPoints' => [
'<string>'
],
'motionTypes' => [
],
'callPurposes' => [
],
'unmatchedOnly' => true
]
],
'startDate' => '2023-11-07T05:31:56Z',
'endDate' => '2023-11-07T05:31:56Z',
'filters' => [
'entityMatchAll' => true,
'eventOIds' => [
'<string>'
],
'opportunityIds' => [
'<string>'
],
'eventCategories' => [
],
'eventTypes' => [
],
'sentiments' => [
],
'contactEmails' => [
'<string>'
],
'companyDomains' => [
'<string>'
],
'outcomeFilters' => [
],
'opportunityStatuses' => [
],
'dealMotions' => [
],
'dealTypes' => [
'<string>'
],
'dealStages' => [
'<string>'
],
'dealStagesAtEvent' => [
'<string>'
],
'pipelinePhases' => [
],
'crmPipelines' => [
'<string>'
],
'minStalledDays' => 123,
'minDealAmount' => 123,
'maxDealAmount' => 123,
'offerings' => [
'<string>'
],
'personas' => [
'<string>'
],
'segments' => [
'<string>'
],
'tags' => [
'<string>'
],
'useCases' => [
'<string>'
],
'references' => [
'<string>'
],
'competitors' => [
'<string>'
],
'alternatives' => [
'<string>'
],
'buyingTriggers' => [
'<string>'
],
'coreFeatures' => [
'<string>'
],
'objections' => [
'<string>'
],
'proofPoints' => [
'<string>'
],
'motionTypes' => [
],
'callPurposes' => [
],
'unmatchedOnly' => true
],
'exclude' => [
'eventCategories' => [
],
'eventTypes' => [
],
'sentiments' => [
],
'contactEmails' => [
'<string>'
],
'companyDomains' => [
'<string>'
],
'outcomeFilters' => [
],
'opportunityStatuses' => [
],
'minDealAmount' => 123,
'maxDealAmount' => 123,
'offerings' => [
'<string>'
],
'personas' => [
'<string>'
],
'segments' => [
'<string>'
],
'tags' => [
'<string>'
],
'useCases' => [
'<string>'
],
'references' => [
'<string>'
],
'competitors' => [
'<string>'
],
'alternatives' => [
'<string>'
],
'buyingTriggers' => [
'<string>'
],
'coreFeatures' => [
'<string>'
],
'objections' => [
'<string>'
],
'proofPoints' => [
'<string>'
],
'motionTypes' => [
],
'callPurposes' => [
],
'dealMotions' => [
],
'dealTypes' => [
'<string>'
],
'dealStages' => [
'<string>'
],
'pipelinePhases' => [
]
],
'excludeTags' => [
'<string>'
],
'outcome' => [
'metric' => 'win_rate'
],
'limit' => 25,
'cursor' => '<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/event/cohort-deals"
payload := strings.NewReader("{\n \"cohortA\": {\n \"label\": \"<string>\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n }\n },\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n },\n \"exclude\": {\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"pipelinePhases\": []\n },\n \"excludeTags\": [\n \"<string>\"\n ],\n \"outcome\": {\n \"metric\": \"win_rate\"\n },\n \"limit\": 25,\n \"cursor\": \"<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/event/cohort-deals")
.header("api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"cohortA\": {\n \"label\": \"<string>\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n }\n },\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n },\n \"exclude\": {\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"pipelinePhases\": []\n },\n \"excludeTags\": [\n \"<string>\"\n ],\n \"outcome\": {\n \"metric\": \"win_rate\"\n },\n \"limit\": 25,\n \"cursor\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.octavehq.com/api/v2/event/cohort-deals")
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 \"cohortA\": {\n \"label\": \"<string>\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n }\n },\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n },\n \"exclude\": {\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"pipelinePhases\": []\n },\n \"excludeTags\": [\n \"<string>\"\n ],\n \"outcome\": {\n \"metric\": \"win_rate\"\n },\n \"limit\": 25,\n \"cursor\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"_metadata": {
"requestId": "requestId",
"timestamp": "2021-01-01T00:00:00.000Z",
"usage": 0,
"message": "message"
},
"side": "A",
"label": "<string>",
"totals": {
"deals": 123,
"wonDeals": 123,
"lostDeals": 123,
"openDeals": 123,
"successes": 123,
"failures": 123,
"notObservable": 123
},
"matchingDeals": 123,
"deals": [
{
"opportunityOId": "<string>",
"name": "<string>",
"outcome": "won",
"result": "success",
"linkTier": "crm_linked",
"excludedBecause": "post_outcome_only",
"stageName": "<string>",
"amount": 123,
"matchingEvents": 123,
"lastMatchingEventAt": "<string>"
}
],
"nextCursor": "<string>",
"dataWindow": {
"kind": "event_range",
"startDate": "<string>",
"endDate": "<string>",
"isDefault": true,
"periodType": "week"
},
"linkScope": "crm_linked",
"linkScopeSource": "request"
}{
"_metadata": {
"requestId": "requestId",
"timestamp": "2021-01-01T00:00:00.000Z",
"usage": 0,
"message": "message"
},
"message": "<string>"
}Authorizations
Body
Event window, shared filters, the two cohorts and the side to list
Show child attributes
Show child attributes
Which side of the comparison to list. 'A' and 'B' are the deals each rate was computed from; 'overlap' is the deals that matched both cohorts and were left out of both; 'excluded' is the deals that matched but were not compared, each with excludedBecause (post-close conversations only, order unknown, reopened, or ambiguous exposure).
A, B, overlap, excluded Start date for event time range (ISO 8601 format). Defaults to 14 days ago if not provided; the response's dataWindow echoes what was used.
End date for event time range. Defaults to the time of the request, so events stamped in the future (a lost deal's placeholder close date, for example) are left out; pass an explicit later endDate to include them. The response's dataWindow echoes what was used.
Filters to INCLUDE events: event type/category, company, contact, sentiment, call purpose, outcome, deal amount, library entity oIds (offerings, personas, segments, tags, use cases, competitors, alternatives, buying triggers, core features, objections, proof points, references), motion types, customer scope, and CRM deal context (opportunityIds, opportunityStatuses, dealMotions, dealTypes, dealStages, pipelinePhases, crmPipelines, minStalledDays). Deal filters AND on the same linked deal; values within one filter are OR'd.
Show child attributes
Show child attributes
Filters to EXCLUDE events matching these criteria (same shape as the entity/outcome match filters)
Show child attributes
Show child attributes
Exclude events matching any library entity that carries these reporting tag oIds. Use list_tag_groups to resolve tag oIds. Multiple tags are OR'd.
The comparison group. OMIT it to compare cohort A against every other deal in the window — the usual question ('do deals where X came up win more than deals where it didn't?').
Show child attributes
Show child attributes
The outcome the two cohorts are compared on. win_rate (default): won / closed — the truest and the slowest. advanced_within_days: the deal reached a later pipeline phase (not closed-lost) within days of its first matching conversation. faster_than_stage_median: the deal left the CRM stage it was in at that conversation, for a stage other than closed-lost, in less time than this workspace's median for that stage. next_conversation_positive: the deal's next conversation after it had POSITIVE overall sentiment. Use a leading outcome when win_rate returns insufficient_evidence; say which outcome a figure is about whenever you quote it.
- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
Which conversations count as belonging to a deal. OMIT it to use the workspace's own default (set beside its CRM mappings), or the product default, outcome_attribution, when the workspace never chose; the response says which applied in linkScopeSource. Which event-to-deal links establish that a conversation belongs to a deal. outcome_attribution (default): the product's own rule, the one behind the win rates in Insights — attribution links, links the CRM or a person made, links by a participant's contact email, and company-domain links only on a deal with at least two of them. Figures at this scope are comparable with Insights; at the others they are not. It includes a conversation matched by email to every deal its contact sits on, so on accounts with many open deals a cohort is 'deals at accounts where this came up' more than 'deals where it came up'. crm_linked: only links the CRM or a person made — 'CRM-linked deals with a matching conversation'. The firmest association and a much smaller, differently selected population; not an unbiased one. single_candidate: crm_linked plus an inferred link when the event reaches exactly one deal. account_associated: every link. The response reports the comparison under all four (acrossLinkScopes), so you can see whether the direction holds.
crm_linked, single_candidate, outcome_attribution, account_associated Only deals that stand this way in the CRM today, e.g. 'lost' to read the losses behind a low win rate. Omit for all.
won, lost, open Only deals with this result on the compared outcome, e.g. 'failure' with outcome advanced_within_days for the deals that did not move.
success, failure, not_observable 1 <= x <= 100nextCursor from the previous page.
Response
List Cohort Deals
Show child attributes
Show child attributes
A, B, overlap, excluded The whole side before outcome and paging are applied. Equal to the same side's counts in compare_cohorts for the same input — if they differ, the input differed.
Show child attributes
Show child attributes
Deals on this side left after the dealOutcome and result filters, before paging. Equal to totalDeals when neither is given.
Show child attributes
Show child attributes
Pass as cursor for the next page; null on the last one.
The time span these numbers cover. Compare numbers from two tools only when their dataWindow kind and dates match.
Show child attributes
Show child attributes
Which event-to-deal links establish that a conversation belongs to a deal. outcome_attribution (default): the product's own rule, the one behind the win rates in Insights — attribution links, links the CRM or a person made, links by a participant's contact email, and company-domain links only on a deal with at least two of them. Figures at this scope are comparable with Insights; at the others they are not. It includes a conversation matched by email to every deal its contact sits on, so on accounts with many open deals a cohort is 'deals at accounts where this came up' more than 'deals where it came up'. crm_linked: only links the CRM or a person made — 'CRM-linked deals with a matching conversation'. The firmest association and a much smaller, differently selected population; not an unbiased one. single_candidate: crm_linked plus an inferred link when the event reaches exactly one deal. account_associated: every link. The response reports the comparison under all four (acrossLinkScopes), so you can see whether the direction holds.
crm_linked, single_candidate, outcome_attribution, account_associated Where linkScope came from: request (the caller named it), workspace_default (the workspace's deal matching rule, set beside its CRM mappings) or product_default (outcome_attribution, when the workspace never chose). The Insights win rates use the workspace's rule, so only a comparison made under a request scope is expected to differ from them.
request, workspace_default, product_default