Test Classify comment labels
Run up to 50 comments through a Classify comment step’s labels and see where each would go: the label (or Unsure), the confidence and the per-label probabilities. Same AI call and threshold as a live run. Point at a step in a draft (journeyId + nodeId), or send labels (+ optional minConfidence) to try wording before saving it. For a longer list, loop over it in batches of 50; results come back in input order with index. Limits per organization: 10 calls a minute and 2000 comments a day; over either the call is refused with rate_limited or daily_cap_reached and a message saying how many seconds to wait (REST: HTTP 429 with a retryAfterSeconds field). The daily budget is a rolling 24 hours, so it comes back gradually; the wait is an estimate. Each comment is at most 1000 characters, and an over-limit request is refused, never cut; like a live run, the AI reads the first 500 characters of each. Comments are not stored or logged.
curl --request POST \
--url https://www.useboom.ai/api/v1/journeys/classify-comment/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"comments": [
"<string>"
],
"journeyId": "<string>",
"nodeId": "<string>",
"labels": [
{
"name": "<string>",
"description": "<string>"
}
],
"minConfidence": 0.725
}
'import requests
url = "https://www.useboom.ai/api/v1/journeys/classify-comment/test"
payload = {
"comments": ["<string>"],
"journeyId": "<string>",
"nodeId": "<string>",
"labels": [
{
"name": "<string>",
"description": "<string>"
}
],
"minConfidence": 0.725
}
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({
comments: ['<string>'],
journeyId: '<string>',
nodeId: '<string>',
labels: [{name: '<string>', description: '<string>'}],
minConfidence: 0.725
})
};
fetch('https://www.useboom.ai/api/v1/journeys/classify-comment/test', 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://www.useboom.ai/api/v1/journeys/classify-comment/test",
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([
'comments' => [
'<string>'
],
'journeyId' => '<string>',
'nodeId' => '<string>',
'labels' => [
[
'name' => '<string>',
'description' => '<string>'
]
],
'minConfidence' => 0.725
]),
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://www.useboom.ai/api/v1/journeys/classify-comment/test"
payload := strings.NewReader("{\n \"comments\": [\n \"<string>\"\n ],\n \"journeyId\": \"<string>\",\n \"nodeId\": \"<string>\",\n \"labels\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"minConfidence\": 0.725\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://www.useboom.ai/api/v1/journeys/classify-comment/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"comments\": [\n \"<string>\"\n ],\n \"journeyId\": \"<string>\",\n \"nodeId\": \"<string>\",\n \"labels\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"minConfidence\": 0.725\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.useboom.ai/api/v1/journeys/classify-comment/test")
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 \"comments\": [\n \"<string>\"\n ],\n \"journeyId\": \"<string>\",\n \"nodeId\": \"<string>\",\n \"labels\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"minConfidence\": 0.725\n}"
response = http.request(request)
puts response.read_body{
"minConfidence": 123,
"results": [
{
"index": 0,
"label": "<string>",
"labelId": "<string>",
"confidence": 123,
"probabilities": {},
"reason": "below_confidence"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Body
Was this page helpful?
curl --request POST \
--url https://www.useboom.ai/api/v1/journeys/classify-comment/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"comments": [
"<string>"
],
"journeyId": "<string>",
"nodeId": "<string>",
"labels": [
{
"name": "<string>",
"description": "<string>"
}
],
"minConfidence": 0.725
}
'import requests
url = "https://www.useboom.ai/api/v1/journeys/classify-comment/test"
payload = {
"comments": ["<string>"],
"journeyId": "<string>",
"nodeId": "<string>",
"labels": [
{
"name": "<string>",
"description": "<string>"
}
],
"minConfidence": 0.725
}
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({
comments: ['<string>'],
journeyId: '<string>',
nodeId: '<string>',
labels: [{name: '<string>', description: '<string>'}],
minConfidence: 0.725
})
};
fetch('https://www.useboom.ai/api/v1/journeys/classify-comment/test', 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://www.useboom.ai/api/v1/journeys/classify-comment/test",
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([
'comments' => [
'<string>'
],
'journeyId' => '<string>',
'nodeId' => '<string>',
'labels' => [
[
'name' => '<string>',
'description' => '<string>'
]
],
'minConfidence' => 0.725
]),
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://www.useboom.ai/api/v1/journeys/classify-comment/test"
payload := strings.NewReader("{\n \"comments\": [\n \"<string>\"\n ],\n \"journeyId\": \"<string>\",\n \"nodeId\": \"<string>\",\n \"labels\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"minConfidence\": 0.725\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://www.useboom.ai/api/v1/journeys/classify-comment/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"comments\": [\n \"<string>\"\n ],\n \"journeyId\": \"<string>\",\n \"nodeId\": \"<string>\",\n \"labels\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"minConfidence\": 0.725\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.useboom.ai/api/v1/journeys/classify-comment/test")
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 \"comments\": [\n \"<string>\"\n ],\n \"journeyId\": \"<string>\",\n \"nodeId\": \"<string>\",\n \"labels\": [\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"minConfidence\": 0.725\n}"
response = http.request(request)
puts response.read_body{
"minConfidence": 123,
"results": [
{
"index": 0,
"label": "<string>",
"labelId": "<string>",
"confidence": 123,
"probabilities": {},
"reason": "below_confidence"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}