Submit feedback on a lead
curl --request POST \
--url https://api.example.com/api/v2/leads/{leadId}/feedbackimport requests
url = "https://api.example.com/api/v2/leads/{leadId}/feedback"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/api/v2/leads/{leadId}/feedback', 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.example.com/api/v2/leads/{leadId}/feedback",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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.example.com/api/v2/leads/{leadId}/feedback"
req, _ := http.NewRequest("POST", url, nil)
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.example.com/api/v2/leads/{leadId}/feedback")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/leads/{leadId}/feedback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyLeads
Submit feedback on a lead
Mark a lead as good or bad. Feedback is per-(lead, segment) pair.
POST
/
api
/
v2
/
leads
/
{leadId}
/
feedback
Submit feedback on a lead
curl --request POST \
--url https://api.example.com/api/v2/leads/{leadId}/feedbackimport requests
url = "https://api.example.com/api/v2/leads/{leadId}/feedback"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/api/v2/leads/{leadId}/feedback', 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.example.com/api/v2/leads/{leadId}/feedback",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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.example.com/api/v2/leads/{leadId}/feedback"
req, _ := http.NewRequest("POST", url, nil)
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.example.com/api/v2/leads/{leadId}/feedback")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/leads/{leadId}/feedback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodySubmits good / bad feedback for a lead. Feedback is per-(lead, segment) - the same lead can be evaluated against multiple segments via different streams, so the body specifies which segment’s classification you’re voting on.
Body
| Field | Type | Description |
|---|---|---|
segmentId | number (required) | The segment id this feedback applies to |
feedback | enum (required) | "good" or "bad" |
badReason | enum | "bot", "wrong_gender", "wrong_job", "wrong_skill", "wrong_personality", "zapier", "other". Default "zapier". |
badReasonFreeform | string | Optional free-text reason, max 500 chars |
Example
curl -X POST https://www.catchthegoodones.com/api/v2/leads/1234/feedback \
-H "Authorization: Bearer ctgo_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{ "segmentId": 12, "feedback": "good" }'
Response
{ "ok": true }
Errors
| Code | HTTP | When |
|---|---|---|
Lead not found | 404 | Lead not owned by user |
Saved search not found | 404 | Segment not owned by user |
Auth
Bearer API key.⌘I