Rate an Agent answer and return the current handoff state
curl --request POST \
--url https://api.contactbutton.com/v1/public/agents/{agent}/conversations/{conversation}/feedback \
--header 'Content-Type: application/json' \
--header 'X-Conversation-Token: <x-conversation-token>' \
--data '
{
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"comment": "<string>"
}
'import requests
url = "https://api.contactbutton.com/v1/public/agents/{agent}/conversations/{conversation}/feedback"
payload = {
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"comment": "<string>"
}
headers = {
"X-Conversation-Token": "<x-conversation-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Conversation-Token': '<x-conversation-token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({message_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', comment: '<string>'})
};
fetch('https://api.contactbutton.com/v1/public/agents/{agent}/conversations/{conversation}/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.contactbutton.com/v1/public/agents/{agent}/conversations/{conversation}/feedback",
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([
'message_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'comment' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Conversation-Token: <x-conversation-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.contactbutton.com/v1/public/agents/{agent}/conversations/{conversation}/feedback"
payload := strings.NewReader("{\n \"message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"comment\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Conversation-Token", "<x-conversation-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://api.contactbutton.com/v1/public/agents/{agent}/conversations/{conversation}/feedback")
.header("X-Conversation-Token", "<x-conversation-token>")
.header("Content-Type", "application/json")
.body("{\n \"message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"comment\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contactbutton.com/v1/public/agents/{agent}/conversations/{conversation}/feedback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Conversation-Token"] = '<x-conversation-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"comment\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"handoff": {
"status": "unavailable",
"available": true,
"can_request": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trigger": "explicit_request",
"reason": "<string>",
"review_url": "<string>",
"offered_at": "2023-11-07T05:31:56Z",
"requested_at": "2023-11-07T05:31:56Z",
"joined_at": "2023-11-07T05:31:56Z"
},
"lead_capture": {
"version": 1,
"timing": "required_before_chat",
"fields": [
"name"
],
"contact_requirement": "either",
"state": "ready",
"input_schema": {},
"default_phone_country": "<string>",
"request_message": "<string>",
"success_with_name": "<string>",
"success_without_name": "<string>",
"requires_consent": true,
"consent_text": "<string>",
"privacy_url": "<string>",
"captured": true,
"success_message": "<string>"
},
"follow_up": {
"enabled": true,
"opted_out": true,
"status": "scheduled"
},
"analytics_events": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "opened",
"protocol": "web",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"capability_id": "<string>",
"page_context": "<string>"
}
],
"protocol_contract": {
"version": "2026-08-05",
"protocol": "web",
"states": {},
"review": {
"contactbutton_owned": true,
"external_client_can_approve": true,
"external_client_receives_otp": false,
"material_actions_require_verification": true
}
}
},
"meta": {
"request_id": "<string>",
"next_cursor": "<string>"
}
}{
"data": {
"handoff": {
"status": "unavailable",
"available": true,
"can_request": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trigger": "explicit_request",
"reason": "<string>",
"review_url": "<string>",
"offered_at": "2023-11-07T05:31:56Z",
"requested_at": "2023-11-07T05:31:56Z",
"joined_at": "2023-11-07T05:31:56Z"
},
"lead_capture": {
"version": 1,
"timing": "required_before_chat",
"fields": [
"name"
],
"contact_requirement": "either",
"state": "ready",
"input_schema": {},
"default_phone_country": "<string>",
"request_message": "<string>",
"success_with_name": "<string>",
"success_without_name": "<string>",
"requires_consent": true,
"consent_text": "<string>",
"privacy_url": "<string>",
"captured": true,
"success_message": "<string>"
},
"follow_up": {
"enabled": true,
"opted_out": true,
"status": "scheduled"
},
"analytics_events": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "opened",
"protocol": "web",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"capability_id": "<string>",
"page_context": "<string>"
}
],
"protocol_contract": {
"version": "2026-08-05",
"protocol": "web",
"states": {},
"review": {
"contactbutton_owned": true,
"external_client_can_approve": true,
"external_client_receives_otp": false,
"material_actions_require_verification": true
}
}
},
"meta": {
"request_id": "<string>",
"next_cursor": "<string>"
}
}Rate an Agent answer and return the current handoff state
POST
/
public
/
agents
/
{agent}
/
conversations
/
{conversation}
/
feedback
Rate an Agent answer and return the current handoff state
curl --request POST \
--url https://api.contactbutton.com/v1/public/agents/{agent}/conversations/{conversation}/feedback \
--header 'Content-Type: application/json' \
--header 'X-Conversation-Token: <x-conversation-token>' \
--data '
{
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"comment": "<string>"
}
'import requests
url = "https://api.contactbutton.com/v1/public/agents/{agent}/conversations/{conversation}/feedback"
payload = {
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"comment": "<string>"
}
headers = {
"X-Conversation-Token": "<x-conversation-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Conversation-Token': '<x-conversation-token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({message_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', comment: '<string>'})
};
fetch('https://api.contactbutton.com/v1/public/agents/{agent}/conversations/{conversation}/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.contactbutton.com/v1/public/agents/{agent}/conversations/{conversation}/feedback",
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([
'message_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'comment' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Conversation-Token: <x-conversation-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.contactbutton.com/v1/public/agents/{agent}/conversations/{conversation}/feedback"
payload := strings.NewReader("{\n \"message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"comment\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Conversation-Token", "<x-conversation-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://api.contactbutton.com/v1/public/agents/{agent}/conversations/{conversation}/feedback")
.header("X-Conversation-Token", "<x-conversation-token>")
.header("Content-Type", "application/json")
.body("{\n \"message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"comment\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contactbutton.com/v1/public/agents/{agent}/conversations/{conversation}/feedback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Conversation-Token"] = '<x-conversation-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"comment\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"handoff": {
"status": "unavailable",
"available": true,
"can_request": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trigger": "explicit_request",
"reason": "<string>",
"review_url": "<string>",
"offered_at": "2023-11-07T05:31:56Z",
"requested_at": "2023-11-07T05:31:56Z",
"joined_at": "2023-11-07T05:31:56Z"
},
"lead_capture": {
"version": 1,
"timing": "required_before_chat",
"fields": [
"name"
],
"contact_requirement": "either",
"state": "ready",
"input_schema": {},
"default_phone_country": "<string>",
"request_message": "<string>",
"success_with_name": "<string>",
"success_without_name": "<string>",
"requires_consent": true,
"consent_text": "<string>",
"privacy_url": "<string>",
"captured": true,
"success_message": "<string>"
},
"follow_up": {
"enabled": true,
"opted_out": true,
"status": "scheduled"
},
"analytics_events": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "opened",
"protocol": "web",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"capability_id": "<string>",
"page_context": "<string>"
}
],
"protocol_contract": {
"version": "2026-08-05",
"protocol": "web",
"states": {},
"review": {
"contactbutton_owned": true,
"external_client_can_approve": true,
"external_client_receives_otp": false,
"material_actions_require_verification": true
}
}
},
"meta": {
"request_id": "<string>",
"next_cursor": "<string>"
}
}{
"data": {
"handoff": {
"status": "unavailable",
"available": true,
"can_request": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trigger": "explicit_request",
"reason": "<string>",
"review_url": "<string>",
"offered_at": "2023-11-07T05:31:56Z",
"requested_at": "2023-11-07T05:31:56Z",
"joined_at": "2023-11-07T05:31:56Z"
},
"lead_capture": {
"version": 1,
"timing": "required_before_chat",
"fields": [
"name"
],
"contact_requirement": "either",
"state": "ready",
"input_schema": {},
"default_phone_country": "<string>",
"request_message": "<string>",
"success_with_name": "<string>",
"success_without_name": "<string>",
"requires_consent": true,
"consent_text": "<string>",
"privacy_url": "<string>",
"captured": true,
"success_message": "<string>"
},
"follow_up": {
"enabled": true,
"opted_out": true,
"status": "scheduled"
},
"analytics_events": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "opened",
"protocol": "web",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"capability_id": "<string>",
"page_context": "<string>"
}
],
"protocol_contract": {
"version": "2026-08-05",
"protocol": "web",
"states": {},
"review": {
"contactbutton_owned": true,
"external_client_can_approve": true,
"external_client_receives_otp": false,
"material_actions_require_verification": true
}
}
},
"meta": {
"request_id": "<string>",
"next_cursor": "<string>"
}
}Headers
Opaque participant token returned only when the conversation is created.
Required string length:
32 - 128Body
application/json
Was this page helpful?