Bot templates
Get a playbook's cohorts for the run
With a bot’s run login: a playbook’s cohort counts by holdout arm for the period, as the keeper route returns them.
GET
/
api
/
company
/
v2026-10
/
bot-runs
/
current
/
cohorts
Get a playbook's cohorts for the run
curl --request GET \
--url https://api.fluid.app/api/company/v2026-10/bot-runs/current/cohorts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fluid.app/api/company/v2026-10/bot-runs/current/cohorts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fluid.app/api/company/v2026-10/bot-runs/current/cohorts', 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.fluid.app/api/company/v2026-10/bot-runs/current/cohorts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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.fluid.app/api/company/v2026-10/bot-runs/current/cohorts"
req, _ := http.NewRequest("GET", 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.get("https://api.fluid.app/api/company/v2026-10/bot-runs/current/cohorts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/company/v2026-10/bot-runs/current/cohorts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"cohorts": {
"playbook": "declined_subscription",
"from": "2026-09-22T15:32:08Z",
"to": "2026-10-22T15:32:08Z",
"treatment": {
"subjects": 40,
"messaged": 38,
"with_linked_order": 9,
"linked_by_kind": {
"subscription_recovered": 9
}
},
"holdout": {
"subjects": 5,
"messaged": 0,
"with_linked_order": 1,
"linked_by_kind": {
"subscription_recovered": 1
}
}
},
"status": 200,
"meta": {
"request_uuid": "7e2c9b41-3f8a-4d15-b6e0-9a4c21d7f583",
"timestamp": "2026-10-22T15:32:08Z"
}
}{
"message": "Invalid credentials."
}{
"message": "Only a running bot can call this"
}{
"error": {
"message": "Not found",
"details": {}
},
"status": 404,
"meta": {
"request_uuid": "7e2c9b41-3f8a-4d15-b6e0-9a4c21d7f583",
"timestamp": "2026-10-22T15:32:08Z"
}
}Authorizations
A bot's run login, minted for one run.
Query Parameters
The playbook key.
Assigned at or after this time (ISO 8601); defaults to 30 days ago.
Assigned before this time (ISO 8601); defaults to now.
⌘I
Get a playbook's cohorts for the run
curl --request GET \
--url https://api.fluid.app/api/company/v2026-10/bot-runs/current/cohorts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fluid.app/api/company/v2026-10/bot-runs/current/cohorts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fluid.app/api/company/v2026-10/bot-runs/current/cohorts', 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.fluid.app/api/company/v2026-10/bot-runs/current/cohorts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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.fluid.app/api/company/v2026-10/bot-runs/current/cohorts"
req, _ := http.NewRequest("GET", 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.get("https://api.fluid.app/api/company/v2026-10/bot-runs/current/cohorts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/company/v2026-10/bot-runs/current/cohorts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"cohorts": {
"playbook": "declined_subscription",
"from": "2026-09-22T15:32:08Z",
"to": "2026-10-22T15:32:08Z",
"treatment": {
"subjects": 40,
"messaged": 38,
"with_linked_order": 9,
"linked_by_kind": {
"subscription_recovered": 9
}
},
"holdout": {
"subjects": 5,
"messaged": 0,
"with_linked_order": 1,
"linked_by_kind": {
"subscription_recovered": 1
}
}
},
"status": 200,
"meta": {
"request_uuid": "7e2c9b41-3f8a-4d15-b6e0-9a4c21d7f583",
"timestamp": "2026-10-22T15:32:08Z"
}
}{
"message": "Invalid credentials."
}{
"message": "Only a running bot can call this"
}{
"error": {
"message": "Not found",
"details": {}
},
"status": 404,
"meta": {
"request_uuid": "7e2c9b41-3f8a-4d15-b6e0-9a4c21d7f583",
"timestamp": "2026-10-22T15:32:08Z"
}
}