curl --request POST \ --url https://yourdomain.com/webhooks/on-optout \ --header 'Content-Type: application/json' \ --data '{ "country_code": "+57", "cellphone": "3176477608", "session_id": "85b398ef5bcb20c355f3710c4509349784c907673c9118fb7a89c7a8", "conversation_id": 54263, "question": { "type": "closed", "text": "Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. ", "answers": [ { "text": "Sure" }, { "text": "No, thanks" }, { "text": "DEFAULT" } ] }, "sent_at": "2021-10-22 00:15:39.044704", "sent_text": "Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. \n1) Sure\n2) No, thanks\n3) DEFAULT", "user_session_keys": [], "classified_answer": { "text": "No, thanks" }, "reason": "OPTOUT"}'
import requests
url = "https://yourdomain.com/webhooks/on-optout"
payload = {
"country_code": "+57",
"cellphone": "3176477608",
"session_id": "85b398ef5bcb20c355f3710c4509349784c907673c9118fb7a89c7a8",
"conversation_id": 54263,
"question": {
"type": "closed",
"text": "Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. ",
"answers": [{ "text": "Sure" }, { "text": "No, thanks" }, { "text": "DEFAULT" }]
},
"sent_at": "2021-10-22 00:15:39.044704",
"sent_text": "Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that.
1) Sure
2) No, thanks
3) DEFAULT",
"user_session_keys": [],
"classified_answer": { "text": "No, thanks" },
"reason": "OPTOUT"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
country_code: '+57',
cellphone: '3176477608',
session_id: '85b398ef5bcb20c355f3710c4509349784c907673c9118fb7a89c7a8',
conversation_id: 54263,
question: {
type: 'closed',
text: 'Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. ',
answers: [{text: 'Sure'}, {text: 'No, thanks'}, {text: 'DEFAULT'}]
},
sent_at: '2021-10-22 00:15:39.044704',
sent_text: 'Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. \n1) Sure\n2) No, thanks\n3) DEFAULT',
user_session_keys: [],
classified_answer: {text: 'No, thanks'},
reason: 'OPTOUT'
})
};
fetch('https://yourdomain.com/webhooks/on-optout', 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://yourdomain.com/webhooks/on-optout",
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([
'country_code' => '+57',
'cellphone' => '3176477608',
'session_id' => '85b398ef5bcb20c355f3710c4509349784c907673c9118fb7a89c7a8',
'conversation_id' => 54263,
'question' => [
'type' => 'closed',
'text' => 'Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. ',
'answers' => [
[
'text' => 'Sure'
],
[
'text' => 'No, thanks'
],
[
'text' => 'DEFAULT'
]
]
],
'sent_at' => '2021-10-22 00:15:39.044704',
'sent_text' => 'Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that.
1) Sure
2) No, thanks
3) DEFAULT',
'user_session_keys' => [
],
'classified_answer' => [
'text' => 'No, thanks'
],
'reason' => 'OPTOUT'
]),
CURLOPT_HTTPHEADER => [
"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://yourdomain.com/webhooks/on-optout"
payload := strings.NewReader("{\n \"country_code\": \"+57\",\n \"cellphone\": \"3176477608\",\n \"session_id\": \"85b398ef5bcb20c355f3710c4509349784c907673c9118fb7a89c7a8\",\n \"conversation_id\": 54263,\n \"question\": {\n \"type\": \"closed\",\n \"text\": \"Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. \",\n \"answers\": [\n {\n \"text\": \"Sure\"\n },\n {\n \"text\": \"No, thanks\"\n },\n {\n \"text\": \"DEFAULT\"\n }\n ]\n },\n \"sent_at\": \"2021-10-22 00:15:39.044704\",\n \"sent_text\": \"Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. \\n1) Sure\\n2) No, thanks\\n3) DEFAULT\",\n \"user_session_keys\": [],\n \"classified_answer\": {\n \"text\": \"No, thanks\"\n },\n \"reason\": \"OPTOUT\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://yourdomain.com/webhooks/on-optout")
.header("Content-Type", "application/json")
.body("{\n \"country_code\": \"+57\",\n \"cellphone\": \"3176477608\",\n \"session_id\": \"85b398ef5bcb20c355f3710c4509349784c907673c9118fb7a89c7a8\",\n \"conversation_id\": 54263,\n \"question\": {\n \"type\": \"closed\",\n \"text\": \"Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. \",\n \"answers\": [\n {\n \"text\": \"Sure\"\n },\n {\n \"text\": \"No, thanks\"\n },\n {\n \"text\": \"DEFAULT\"\n }\n ]\n },\n \"sent_at\": \"2021-10-22 00:15:39.044704\",\n \"sent_text\": \"Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. \\n1) Sure\\n2) No, thanks\\n3) DEFAULT\",\n \"user_session_keys\": [],\n \"classified_answer\": {\n \"text\": \"No, thanks\"\n },\n \"reason\": \"OPTOUT\"\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://yourdomain.com/webhooks/on-optout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"country_code\": \"+57\",\n \"cellphone\": \"3176477608\",\n \"session_id\": \"85b398ef5bcb20c355f3710c4509349784c907673c9118fb7a89c7a8\",\n \"conversation_id\": 54263,\n \"question\": {\n \"type\": \"closed\",\n \"text\": \"Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. \",\n \"answers\": [\n {\n \"text\": \"Sure\"\n },\n {\n \"text\": \"No, thanks\"\n },\n {\n \"text\": \"DEFAULT\"\n }\n ]\n },\n \"sent_at\": \"2021-10-22 00:15:39.044704\",\n \"sent_text\": \"Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. \\n1) Sure\\n2) No, thanks\\n3) DEFAULT\",\n \"user_session_keys\": [],\n \"classified_answer\": {\n \"text\": \"No, thanks\"\n },\n \"reason\": \"OPTOUT\"\n}"
response = http.request(request)
puts response.read_body
{}
Conversation Editor
Opt-out Webhook Request Body
This endpoint must be implemented on YOUR server (e.g., https://yourdomain.com/webhooks/on-optout). Treble will call this webhook when a user decides to opt out or exit the conversation. You must configure the URL of this webhook in the Treble admin panel.
POST
/
webhooks
/
on-optout
Webhook - When a user opts out
curl --request POST \ --url https://yourdomain.com/webhooks/on-optout \ --header 'Content-Type: application/json' \ --data '{ "country_code": "+57", "cellphone": "3176477608", "session_id": "85b398ef5bcb20c355f3710c4509349784c907673c9118fb7a89c7a8", "conversation_id": 54263, "question": { "type": "closed", "text": "Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. ", "answers": [ { "text": "Sure" }, { "text": "No, thanks" }, { "text": "DEFAULT" } ] }, "sent_at": "2021-10-22 00:15:39.044704", "sent_text": "Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. \n1) Sure\n2) No, thanks\n3) DEFAULT", "user_session_keys": [], "classified_answer": { "text": "No, thanks" }, "reason": "OPTOUT"}'
import requests
url = "https://yourdomain.com/webhooks/on-optout"
payload = {
"country_code": "+57",
"cellphone": "3176477608",
"session_id": "85b398ef5bcb20c355f3710c4509349784c907673c9118fb7a89c7a8",
"conversation_id": 54263,
"question": {
"type": "closed",
"text": "Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. ",
"answers": [{ "text": "Sure" }, { "text": "No, thanks" }, { "text": "DEFAULT" }]
},
"sent_at": "2021-10-22 00:15:39.044704",
"sent_text": "Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that.
1) Sure
2) No, thanks
3) DEFAULT",
"user_session_keys": [],
"classified_answer": { "text": "No, thanks" },
"reason": "OPTOUT"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
country_code: '+57',
cellphone: '3176477608',
session_id: '85b398ef5bcb20c355f3710c4509349784c907673c9118fb7a89c7a8',
conversation_id: 54263,
question: {
type: 'closed',
text: 'Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. ',
answers: [{text: 'Sure'}, {text: 'No, thanks'}, {text: 'DEFAULT'}]
},
sent_at: '2021-10-22 00:15:39.044704',
sent_text: 'Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. \n1) Sure\n2) No, thanks\n3) DEFAULT',
user_session_keys: [],
classified_answer: {text: 'No, thanks'},
reason: 'OPTOUT'
})
};
fetch('https://yourdomain.com/webhooks/on-optout', 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://yourdomain.com/webhooks/on-optout",
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([
'country_code' => '+57',
'cellphone' => '3176477608',
'session_id' => '85b398ef5bcb20c355f3710c4509349784c907673c9118fb7a89c7a8',
'conversation_id' => 54263,
'question' => [
'type' => 'closed',
'text' => 'Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. ',
'answers' => [
[
'text' => 'Sure'
],
[
'text' => 'No, thanks'
],
[
'text' => 'DEFAULT'
]
]
],
'sent_at' => '2021-10-22 00:15:39.044704',
'sent_text' => 'Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that.
1) Sure
2) No, thanks
3) DEFAULT',
'user_session_keys' => [
],
'classified_answer' => [
'text' => 'No, thanks'
],
'reason' => 'OPTOUT'
]),
CURLOPT_HTTPHEADER => [
"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://yourdomain.com/webhooks/on-optout"
payload := strings.NewReader("{\n \"country_code\": \"+57\",\n \"cellphone\": \"3176477608\",\n \"session_id\": \"85b398ef5bcb20c355f3710c4509349784c907673c9118fb7a89c7a8\",\n \"conversation_id\": 54263,\n \"question\": {\n \"type\": \"closed\",\n \"text\": \"Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. \",\n \"answers\": [\n {\n \"text\": \"Sure\"\n },\n {\n \"text\": \"No, thanks\"\n },\n {\n \"text\": \"DEFAULT\"\n }\n ]\n },\n \"sent_at\": \"2021-10-22 00:15:39.044704\",\n \"sent_text\": \"Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. \\n1) Sure\\n2) No, thanks\\n3) DEFAULT\",\n \"user_session_keys\": [],\n \"classified_answer\": {\n \"text\": \"No, thanks\"\n },\n \"reason\": \"OPTOUT\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://yourdomain.com/webhooks/on-optout")
.header("Content-Type", "application/json")
.body("{\n \"country_code\": \"+57\",\n \"cellphone\": \"3176477608\",\n \"session_id\": \"85b398ef5bcb20c355f3710c4509349784c907673c9118fb7a89c7a8\",\n \"conversation_id\": 54263,\n \"question\": {\n \"type\": \"closed\",\n \"text\": \"Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. \",\n \"answers\": [\n {\n \"text\": \"Sure\"\n },\n {\n \"text\": \"No, thanks\"\n },\n {\n \"text\": \"DEFAULT\"\n }\n ]\n },\n \"sent_at\": \"2021-10-22 00:15:39.044704\",\n \"sent_text\": \"Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. \\n1) Sure\\n2) No, thanks\\n3) DEFAULT\",\n \"user_session_keys\": [],\n \"classified_answer\": {\n \"text\": \"No, thanks\"\n },\n \"reason\": \"OPTOUT\"\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://yourdomain.com/webhooks/on-optout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"country_code\": \"+57\",\n \"cellphone\": \"3176477608\",\n \"session_id\": \"85b398ef5bcb20c355f3710c4509349784c907673c9118fb7a89c7a8\",\n \"conversation_id\": 54263,\n \"question\": {\n \"type\": \"closed\",\n \"text\": \"Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. \",\n \"answers\": [\n {\n \"text\": \"Sure\"\n },\n {\n \"text\": \"No, thanks\"\n },\n {\n \"text\": \"DEFAULT\"\n }\n ]\n },\n \"sent_at\": \"2021-10-22 00:15:39.044704\",\n \"sent_text\": \"Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. \\n1) Sure\\n2) No, thanks\\n3) DEFAULT\",\n \"user_session_keys\": [],\n \"classified_answer\": {\n \"text\": \"No, thanks\"\n },\n \"reason\": \"OPTOUT\"\n}"
response = http.request(request)
puts response.read_body
{}
Body
application/json
Information of the opt-out event
Event that is triggered when a user decides to opt out or exit the conversation
User session keys collected during the conversation or provided during the deployment
Show child attributes
Response
200 - application/json
Response to update or add information to the session
JSON object with the new information that will be replaced or added to the session for future use. The service must respond in less than 10 seconds.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Home","colors":{"primary":"#6464FF","light":"#F7F8FF","dark":"#6464FF"},"logo":{"light":"https://mintcdn.com/trebleai/5XNOo1Uq3QVPV6lD/logo/treble-light.svg?fit=max\u0026auto=format\u0026n=5XNOo1Uq3QVPV6lD\u0026q=85\u0026s=0f7f2dba2b6ef63a34fe90483601df50","dark":"https://mintcdn.com/trebleai/5XNOo1Uq3QVPV6lD/logo/dark.svg?fit=max\u0026auto=format\u0026n=5XNOo1Uq3QVPV6lD\u0026q=85\u0026s=fe4efb4ec225da5a3af57d9b539341c2"},"favicon":"https://mintcdn.com/trebleai/N7qFKPzh9cWmkY9Y/favicon-treble.svg?fit=max\u0026auto=format\u0026n=N7qFKPzh9cWmkY9Y\u0026q=85\u0026s=97fb999775e0a3d4632062af00a6dd3f","appearance":{"default":"light","strict":true},"navbar":{"links":[{"href":"https://wa.me/12058834230","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.treble.ai"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/treble-ai"}},"integrations":{"amplitude":{"apiKey":"73db3d1720f71527cf6882e5063e25b6"},"intercom":{"appId":"uye4idh4"}},"styling":{"latex":true},"navigation":{"languages":[{"language":"es","default":true,"href":"es/home"},{"language":"en","href":"en/home"},{"language":"pt","href":"pt/home"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"trebleai","hasAudioNarration":false,"actualSubdomain":"trebleai","customDomains":["help.treble.ai"],"gitSource":{"type":"github","owner":"treble-ai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae38e87cb3179e2a1a061d0","collectionId":"27b62e64-68af-41cf-8a76-7004f2a89c77","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae38e87cb3179e2a1a061d0"},"feedback":{"thumbs":true,"edits":false},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae38e87cb3179e2a1a061d0","clientVersion":"0.0.4076","searchFilterCounts":[{"language":"en","tag":"Documentation","count":197},{"language":"es","tag":"Documentación","count":197},{"language":"pt","tag":"Documentação","count":197},{"language":"en","tag":"User Guide","count":165},{"language":"es","tag":"Guía de usuario","count":165},{"language":"pt","tag":"Guia do usuário","count":165},{"language":"en","tag":"Integrations","count":53},{"language":"es","tag":"Integraciones","count":53},{"language":"pt","tag":"Integrações","count":53},{"language":"en","tag":"API Reference","count":31},{"language":"es","tag":"Referencia de API","count":31},{"language":"pt","tag":"Referência da API","count":31},{"language":"en","tag":"Main Platform","count":22},{"language":"es","tag":"Plataforma Principal","count":22},{"language":"pt","tag":"Plataforma Principal","count":22},{"language":"en","tag":"Build with Treble","count":20},{"language":"en","tag":"Analytics Warehouse","count":20},{"language":"es","tag":"Construye con Treble","count":20},{"language":"es","tag":"Analytics Warehouse","count":20},{"language":"pt","tag":"Construa com o Treble","count":20},{"language":"pt","tag":"Analytics Warehouse","count":20},{"language":"en","tag":"Blocks","count":19},{"language":"en","tag":"HubSpot","count":19},{"language":"en","tag":"Salesforce","count":19},{"language":"es","tag":"Bloques","count":19},{"language":"es","tag":"HubSpot","count":19},{"language":"es","tag":"Salesforce","count":19},{"language":"pt","tag":"Blocos","count":19},{"language":"pt","tag":"HubSpot","count":19},{"language":"pt","tag":"Salesforce","count":19}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":root{--font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif}.hero-container{text-align:center;padding:4rem 1rem;background-color:#fafafa}.hero-title{font-size:3rem;font-weight:600;margin-bottom:1rem;color:#111827}.hero-description{font-size:1.125rem;color:#4b5563;margin-bottom:2rem;max-width:600px;margin-left:auto;margin-right:auto}.search-input{width:100%;max-width:500px;padding:0.75rem 1rem;border:1px solid #e5e7eb;border-radius:0.5rem;font-size:1rem;margin-bottom:2rem;cursor:pointer;background-color:white;transition:all 0.2s ease}.search-input:hover{border-color:#d1d5db;background-color:#f9fafb;box-shadow:0 1px 3px rgba(0, 0, 0, 0.1)}.search-input:focus{outline:none;border-color:#d1d5db;box-shadow:0 1px 3px rgba(0, 0, 0, 0.1)}.explore-link{color:#111827;text-decoration:none;font-weight:500}.explore-link:hover{text-decoration:underline}.section-title{text-align:center;font-size:2rem;font-weight:600;color:#111827;margin:4rem 0 2rem}.tools-guides-container{margin:6rem auto 8rem;max-width:70rem;padding-left:1.25rem;padding-right:1.25rem}.tools-guides-header{text-align:center;margin-bottom:3rem}.tools-guides-grid{width:100%}.hr{border-color:rgb(var(--gray-100));border-top-width:1px;margin-top:3em;margin-bottom:3em}.loom-video{position:relative;padding-bottom:62.5%;height:0}.loom-video iframe{position:absolute;top:0;left:0;width:100%;height:100%}a.article-link{color:var(--tw-prose-links);text-decoration:none;font-weight:600;border-bottom:2px solid rgb(var(--primary-dark));transition:border-color 0.2s ease;position:relative;display:inline-flex;align-items:center}a.article-link p{margin:0}a.article-link svg{width:14px!important;height:14px!important;margin-left:4px}a.article-link:hover{color:rgb(var(--primary-dark));border-color:transparent;background-color:rgba(var(--primary-dark), 0.1);transition:color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease}.interactive-guide .step-container{margin-bottom:2rem;padding:1.5rem;border:1px solid #e5e7eb;border-radius:0.5rem;display:none;opacity:0;transform:translateY(10px);transition:opacity 0.3s ease, transform 0.3s ease}.interactive-guide .step-container h3{margin-top:0}.interactive-guide .step-container.active{display:block}.interactive-guide .step-container.current{opacity:1;transform:translateY(0)}.interactive-guide .step-container.completed{border-color:#10B981}.interactive-guide .step-navigation{display:flex;justify-content:flex-start;margin-bottom:2rem;gap:0.5rem}.interactive-guide .step-indicator{width:2rem;height:2rem;border-radius:50%;background-color:#f3f4f6;border:2px solid #e5e7eb;display:flex;align-items:center;justify-content:center;font-size:0.875rem;font-weight:500;color:#6b7280;cursor:pointer;transition:all 0.2s ease}.interactive-guide .step-indicator:hover{border-color:#d1d5db;background-color:#e5e7eb}.interactive-guide .step-indicator.current{background-color:#10B981;border-color:#059669;color:white}.interactive-guide .step-indicator.completed{background-color:#D1FAE5;border-color:#10B981;color:#059669}.interactive-guide .step-indicator.completed:hover{background-color:#A7F3D0}.interactive-guide .choice-buttons{display:flex;gap:1rem;margin-top:1rem}.interactive-guide .choice-button{padding:0.5rem 1rem;border:1px solid #e5e7eb;border-radius:0.25rem;background-color:white;cursor:pointer;transition:all 0.2s}.interactive-guide .choice-button:hover{background-color:#f9fafb;border-color:#d1d5db}.interactive-guide .choice-button.yes{background-color:#10B981;color:white;border-color:#059669}.interactive-guide .choice-button.no{background-color:#EF4444;color:white;border-color:#DC2626}.interactive-guide .choice-button.yes:hover{background-color:#059669}.interactive-guide .choice-button.no:hover{background-color:#DC2626}.interactive-guide .result-message{margin-top:1rem;padding:1rem;border-radius:0.25rem;display:none}.interactive-guide .result-message.success{background-color:#D1FAE5;color:#065F46;display:block}.interactive-guide .result-message.error{background-color:#FEE2E2;color:#991B1B;display:block}.interactive-guide .sub-steps{margin-top:1rem;display:none}.interactive-guide .sub-steps.active{display:block}.interactive-guide .checkbox-item{display:flex;flex-direction:column;margin-bottom:1rem;padding:0.75rem;border-radius:0.25rem;border:1px solid #e5e7eb;transition:all 0.2s}.interactive-guide .checkbox-item:hover{border-color:#d1d5db}.interactive-guide .checkbox-row{display:flex;align-items:center;justify-content:space-between}.interactive-guide .checkbox-label{display:flex;align-items:center;gap:0.75rem}.interactive-guide .toggle-buttons{display:flex;gap:0.5rem}.interactive-guide .toggle-button{padding:0.25rem 0.75rem;border:1px solid #e5e7eb;border-radius:0.25rem;background-color:white;font-size:0.875rem;cursor:pointer;transition:all 0.2s}.interactive-guide .toggle-button.selected{background-color:#10B981;color:white;border-color:#059669}.interactive-guide .toggle-button.selected.no{background-color:#EF4444;border-color:#DC2626}.interactive-guide .sub-step-help{display:none;margin-top:0.5rem;padding:0.75rem;background-color:#FEF3C7;border-radius:0.25rem;color:#92400E}.interactive-guide .sub-step-help.active{display:block}.interactive-guide .sub-step-help a{color:#92400E}.interactive-guide .sub-step-help a:hover{color:#78350F}.interactive-guide .progress-indicator{margin-top:1rem;height:0.5rem;background-color:#e5e7eb;border-radius:0.25rem;overflow:hidden}.interactive-guide .progress-bar{height:100%;background-color:#10B981;transition:width 0.3s ease;width:0%}.interactive-guide .sub-steps-summary{margin-top:1rem;padding:0.75rem;border-radius:0.25rem;background-color:#f9fafb;display:none}.interactive-guide .sub-steps-summary.complete{display:block;background-color:#D1FAE5;color:#065F46}"}],"page":{"pagePath":"en/api-reference/webhooks/conversation-editor/opt-out-api","slug":"/en/api-reference/webhooks/conversation-editor/opt-out-api","pageMetadata":{"title":"Opt-out Webhook Request Body","openapi":"open-api-files/treble-api-en.json POST /webhooks/on-optout","description":"This endpoint must be implemented on YOUR server (e.g., https://yourdomain.com/webhooks/on-optout). Treble will call this webhook when a user decides to opt out or exit the conversation. You must configure the URL of this webhook in the Treble admin panel.","href":"/en/api-reference/webhooks/conversation-editor/opt-out-api"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"This endpoint must be implemented on YOUR server (e.g., \", _jsx(_components.a, {\n href: \"https://yourdomain.com/webhooks/on-optout\",\n children: \"https://yourdomain.com/webhooks/on-optout\"\n }), \"). Treble will call this webhook when a user decides to opt out or exit the conversation. You must configure the URL of this webhook in the Treble admin panel.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Opt-out Webhook Request Body","openapi":"open-api-files/treble-api-en.json POST /webhooks/on-optout","description":"This endpoint must be implemented on YOUR server (e.g., https://yourdomain.com/webhooks/on-optout). Treble will call this webhook when a user decides to opt out or exit the conversation. You must configure the URL of this webhook in the Treble admin panel.","href":"/en/api-reference/webhooks/conversation-editor/opt-out-api"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/trebleai/e8b64c48fcecfaa0/script.js"],"openApiReferenceData":{"operation":{"summary":"Webhook - When a user opts out","description":"This endpoint must be implemented on YOUR server (e.g., https://yourdomain.com/webhooks/on-optout). Treble will call this webhook when a user decides to opt out or exit the conversation. You must configure the URL of this webhook in the Treble admin panel.","tags":["Webhooks"],"servers":["e738c318-5d68-4642-8a2e-06c6822c1e38"],"requestBody":"c6fe2ff7-0928-469d-a203-81f85df279f9","responses":{"200":"497f0b6a-3c17-486a-ba46-8e7bc45915d5"},"method":"post","type":"path","security":[],"path":"/webhooks/on-optout","baseUrlOptions":["https://yourdomain.com"],"title":"Webhook - When a user opts out","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"description":"Information of the opt-out event","content":{"application/json":{"schema":{"type":"object","required":["country_code","cellphone","session_id","conversation_id","question","sent_at","sent_text","classified_answer","reason"],"description":"Event that is triggered when a user decides to opt out or exit the conversation","properties":{"country_code":{"type":"string","description":"Country code of the user","isRequired":true,"uniqueKey":"country_code","typeLabel":"string"},"cellphone":{"type":"string","description":"User's phone number without the country code","isRequired":true,"uniqueKey":"cellphone","typeLabel":"string"},"session_id":{"type":"string","description":"ID of the user's session","isRequired":true,"uniqueKey":"session_id","typeLabel":"string"},"conversation_id":{"type":"integer","description":"ID of the conversation","isRequired":true,"uniqueKey":"conversation_id","typeLabel":"integer"},"question":{"type":"object","required":["type","text","answers"],"properties":{"type":{"type":"string","description":"Type of question","example":"closed","isRequired":true,"uniqueKey":"question.type","typeLabel":"string"},"text":{"type":"string","description":"Text of the question","isRequired":true,"uniqueKey":"question.text","typeLabel":"string"},"answers":{"type":"array","description":"Possible answers for the closed question","items":{"type":"object","properties":{"text":{"type":"string","description":"Text of the answer","uniqueKey":"question.answers.items.[INDEX].text","typeLabel":"string"}},"uniqueKey":"question.answers.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"question.answers","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"question","typeLabel":"object"},"sent_at":{"type":"string","format":"date-time","description":"Date and time when the question was sent","isRequired":true,"uniqueKey":"sent_at","typeLabel":"string\u003cdate-time>"},"sent_text":{"type":"string","description":"Text sent to the user","isRequired":true,"uniqueKey":"sent_text","typeLabel":"string"},"classified_answer":{"type":"object","required":["text"],"properties":{"text":{"type":"string","description":"Text of the answer","isRequired":true,"uniqueKey":"classified_answer.text","typeLabel":"string"}},"description":"Classified answer based on the user's response","isRequired":true,"uniqueKey":"classified_answer","typeLabel":"object"},"reason":{"type":"string","description":"Reason for the user's exit, in this case 'OPTOUT' to indicate that the user decided to opt out","enum":["OPTOUT"],"isRequired":true,"uniqueKey":"reason","typeLabel":"enum\u003cstring>"},"user_session_keys":{"type":"array","description":"User session keys collected during the conversation or provided during the deployment","items":{"type":"object","required":["key","value"],"properties":{"key":{"type":"string","description":"Name of the variable. Special values include 'deployment_squad' to select which phone number will perform the deployment in multi-channel companies.","isRequired":true,"uniqueKey":"user_session_keys.items.[INDEX].key","typeLabel":"string"},"value":{"type":"string","description":"Value of the variable. For 'deployment_squad', the value must be 'DS_[CELLPHONE]'.","isRequired":true,"uniqueKey":"user_session_keys.items.[INDEX].value","typeLabel":"string"}},"uniqueKey":"user_session_keys.items.[INDEX]","typeLabel":"object"},"uniqueKey":"user_session_keys","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"example":{"country_code":"+57","cellphone":"3176477608","session_id":"85b398ef5bcb20c355f3710c4509349784c907673c9118fb7a89c7a8","conversation_id":54263,"question":{"type":"closed","text":"Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. ","answers":[{"text":"Sure"},{"text":"No, thanks"},{"text":"DEFAULT"}]},"sent_at":"2021-10-22 00:15:39.044704","sent_text":"Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. \n1) Sure\n2) No, thanks\n3) DEFAULT","user_session_keys":[],"classified_answer":{"text":"No, thanks"},"reason":"OPTOUT"},"examples":{"Example":{"title":"Example","value":{"country_code":"+57","cellphone":"3176477608","session_id":"85b398ef5bcb20c355f3710c4509349784c907673c9118fb7a89c7a8","conversation_id":54263,"question":{"type":"closed","text":"Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. ","answers":[{"text":"Sure"},{"text":"No, thanks"},{"text":"DEFAULT"}]},"sent_at":"2021-10-22 00:15:39.044704","sent_text":"Hi! Thanks for attending our webinar today. We would like to have a feedback about our session and we would be very grateful if you could help us with that. \n1) Sure\n2) No, thanks\n3) DEFAULT","user_session_keys":[],"classified_answer":{"text":"No, thanks"},"reason":"OPTOUT"}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"497f0b6a-3c17-486a-ba46-8e7bc45915d5":{"description":"Response to update or add information to the session","content":{"application/json":{"schema":{"type":"object","description":"JSON object with the new information that will be replaced or added to the session for future use. The service must respond in less than 10 seconds.","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{},"servers":{"e738c318-5d68-4642-8a2e-06c6822c1e38":{"url":"https://yourdomain.com","description":"Your server where you must implement this webhook"}}},"originalFileLocation":"open-api-files/treble-api-en.json"},"subdomain":"trebleai","siteName":"Home","title":"Opt-out Webhook Request Body - Home","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"es":{"href":"/es/api-reference/webhooks/conversation-editor/opt-out-api","matchLevel":1},"en":{"href":"/en/api-reference/webhooks/conversation-editor/opt-out-api","matchLevel":0},"pt":{"href":"/pt/api-reference/webhooks/conversation-editor/opt-out-api","matchLevel":1}}},"lastModified":"2025-09-08T19:37:41.160Z","originalFileLocation":"en/api-reference/webhooks/conversation-editor/opt-out-api.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"This endpoint must be implemented on YOUR server (e.g., https://yourdomain.com/webhooks/on-optout). Treble will call this webhook when a user decides to opt out or exit the conversation. You must configure the URL of this webhook in the Treble admin panel.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Home\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/trebleai/HNsHU13Wcqq09jY3/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/trebleai/HNsHU13Wcqq09jY3/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/trebleai/HNsHU13Wcqq09jY3/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/trebleai/HNsHU13Wcqq09jY3/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/trebleai/HNsHU13Wcqq09jY3/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/trebleai/HNsHU13Wcqq09jY3/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/trebleai/HNsHU13Wcqq09jY3/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/trebleai/HNsHU13Wcqq09jY3/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/trebleai/HNsHU13Wcqq09jY3/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Opt-out Webhook Request Body - Home\">\u003cmeta data-mint-head property=\"og:description\" content=\"This endpoint must be implemented on YOUR server (e.g., https://yourdomain.com/webhooks/on-optout). Treble will call this webhook when a user decides to opt out or exit the conversation. You must configure the URL of this webhook in the Treble admin panel.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Home\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://help.treble.ai/en/api-reference/webhooks/conversation-editor/opt-out-api\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://trebleai.mintlify.site/_mintlify/api/og/v2?division=Conversation+Editor\u0026amp;title=Opt-out+Webhook+Request+Body\u0026amp;description=This+endpoint+must+be+implemented+on+YOUR+server+%28e.g.%2C+https%3A%2F%2Fyourdomain.com%2Fwebhooks%2Fon-optout%29.+Treble+will+call+this+webhook+when+a+user+decides+to+opt+out\u0026amp;theme=3f682625aa372d8383525fb3\u0026amp;signature=f683995355a938c22be02c2488c52d68de88abc12fec6d3d3f95c87699f1e9ce\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Opt-out Webhook Request Body - Home\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"This endpoint must be implemented on YOUR server (e.g., https://yourdomain.com/webhooks/on-optout). Treble will call this webhook when a user decides to opt out or exit the conversation. You must configure the URL of this webhook in the Treble admin panel.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://trebleai.mintlify.site/_mintlify/api/og/v2?division=Conversation+Editor\u0026amp;title=Opt-out+Webhook+Request+Body\u0026amp;description=This+endpoint+must+be+implemented+on+YOUR+server+%28e.g.%2C+https%3A%2F%2Fyourdomain.com%2Fwebhooks%2Fon-optout%29.+Treble+will+call+this+webhook+when+a+user+decides+to+opt+out\u0026amp;theme=3f682625aa372d8383525fb3\u0026amp;signature=f683995355a938c22be02c2488c52d68de88abc12fec6d3d3f95c87699f1e9ce\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/trebleai/HNsHU13Wcqq09jY3/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Home\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6464FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://help.treble.ai/en/api-reference/webhooks/conversation-editor/opt-out-api\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/api-reference/webhooks/conversation-editor/opt-out-api.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://help.treble.ai/en/api-reference/webhooks/conversation-editor/opt-out-api\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://help.treble.ai/es/api-reference/webhooks/conversation-editor/opt-out-api\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pt\" href=\"https://help.treble.ai/pt/api-reference/webhooks/conversation-editor/opt-out-api\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://help.treble.ai/es/api-reference/webhooks/conversation-editor/opt-out-api\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://help.treble.ai/#organization\",\"name\":\"Home\",\"url\":\"https://help.treble.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/trebleai/5XNOo1Uq3QVPV6lD/logo/treble-light.svg?fit=max\u0026auto=format\u0026n=5XNOo1Uq3QVPV6lD\u0026q=85\u0026s=0f7f2dba2b6ef63a34fe90483601df50\"}},{\"@type\":\"WebSite\",\"@id\":\"https://help.treble.ai#website\",\"name\":\"Home\",\"url\":\"https://help.treble.ai\",\"publisher\":{\"@id\":\"https://help.treble.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://help.treble.ai/en/api-reference/webhooks/conversation-editor/opt-out-api#webpage\",\"url\":\"https://help.treble.ai/en/api-reference/webhooks/conversation-editor/opt-out-api\",\"name\":\"Opt-out Webhook Request Body\",\"description\":\"This endpoint must be implemented on YOUR server (e.g., https://yourdomain.com/webhooks/on-optout). Treble will call this webhook when a user decides to opt out or exit the conversation. You must configure the URL of this webhook in the Treble admin panel.\",\"dateModified\":\"2025-09-08T19:37:41.160Z\",\"isPartOf\":{\"@id\":\"https://help.treble.ai#website\"},\"breadcrumb\":{\"@id\":\"https://help.treble.ai/en/api-reference/webhooks/conversation-editor/opt-out-api#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://help.treble.ai/en/api-reference/webhooks/conversation-editor/opt-out-api#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Webhooks\",\"item\":\"https://help.treble.ai/en/api-reference/webhooks/intro\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Conversation Editor\",\"item\":\"https://help.treble.ai/en/api-reference/webhooks/conversation-editor/delivered-read\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Opt-out Webhook Request Body\",\"item\":\"https://help.treble.ai/en/api-reference/webhooks/conversation-editor/opt-out-api\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://help.treble.ai/en/api-reference/webhooks/conversation-editor/opt-out-api#apireference\",\"headline\":\"Opt-out Webhook Request Body\",\"name\":\"Opt-out Webhook Request Body\",\"description\":\"This endpoint must be implemented on YOUR server (e.g., https://yourdomain.com/webhooks/on-optout). Treble will call this webhook when a user decides to opt out or exit the conversation. You must configure the URL of this webhook in the Treble admin panel.\",\"url\":\"https://help.treble.ai/en/api-reference/webhooks/conversation-editor/opt-out-api\",\"mainEntityOfPage\":{\"@id\":\"https://help.treble.ai/en/api-reference/webhooks/conversation-editor/opt-out-api#webpage\"},\"dateModified\":\"2025-09-08T19:37:41.160Z\",\"publisher\":{\"@id\":\"https://help.treble.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://help.treble.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Home\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Home","nav":{"global":null,"languages":[{"language":"es","default":true,"pages":[{"title":"es","href":"/es/api-reference/webhooks/conversation-editor/opt-out-api"}]},{"language":"en","anchors":[{"anchor":"Documentation","icon":"book-open","tabs":[{"tab":"Welcome","pages":[{"title":"Welcome","href":"/en/home"}]},{"tab":"User Guide","pages":[{"title":"User Guide","href":"/en/docs/welcome"}]},{"tab":"API Reference","groups":[{"group":"Introduction to API","pages":[{"title":"Introduction","href":"/en/api-reference/intro/intro"},{"title":"API Key and Webhook Headers","href":"/en/api-reference/intro/api-key"}]},{"group":"API","pages":[{"title":"Send a campaign (recommended)","openapi":"open-api-files/treble-api-en.json POST /v2/send-campaign/{poll_id}","href":"/en/api-reference/endpoints/send-campaign"},{"title":"Get a campaign's status","openapi":"open-api-files/treble-api-en.json GET /v2/send-campaign/{launch_request_id}","href":"/en/api-reference/endpoints/send-campaign-status"},{"title":"Deploy a conversation flow","openapi":"open-api-files/treble-api-en.json POST /deployment/api/poll/{poll_id}","href":"/en/api-reference/endpoints/deploy"},{"title":"Get all conversations","openapi":"open-api-files/treble-api-en.json GET /poll/api/all","href":"/en/api-reference/endpoints/get-convos"},{"title":"Get all sessions","openapi":"open-api-files/treble-api-en.json GET /devapi/poll/{poll_id}/sessions","href":"/en/api-reference/endpoints/get-sessions"},{"title":"Get session history","openapi":"open-api-files/treble-api-en.json GET /devapi/session/{session_id}/history","href":"/en/api-reference/endpoints/get-session-history"},{"title":"Update a session","openapi":"open-api-files/treble-api-en.json POST /session/{session_external_id}/update","href":"/en/api-reference/endpoints/session-update"},{"title":"Get your company's agents","openapi":"open-api-files/treble-api-en.json GET /agent/company/agents","href":"/en/api-reference/endpoints/get-agents"}]},{"group":"Webhooks","pages":[{"title":"Introduction to webhooks","href":"/en/api-reference/webhooks/intro"},{"group":"Conversation Editor","pages":[{"title":"Message Read and Delivery Webhooks","href":"/en/api-reference/webhooks/conversation-editor/delivered-read"},{"title":"Message Delivery Webhook Request Body","openapi":"open-api-files/treble-api-en.json POST /webhooks/on-delivered","href":"/en/api-reference/webhooks/conversation-editor/delivered-api"},{"title":"Message Read Webhook Request Body","openapi":"open-api-files/treble-api-en.json POST /webhooks/on-read","href":"/en/api-reference/webhooks/conversation-editor/read-api"},{"title":"Message Response Webhook","href":"/en/api-reference/webhooks/conversation-editor/message-response"},{"title":"Stop Treble conversation and wait for your server response","href":"/en/api-reference/webhooks/conversation-editor/request-trigger"},{"title":"Message Response Webhook Request Body","openapi":"open-api-files/treble-api-en.json POST /webhooks/on-response","href":"/en/api-reference/webhooks/conversation-editor/message-response-api"},{"title":"Condition Node Webhook Request Body","openapi":"open-api-files/treble-api-en.json POST /webhooks/on-condition","href":"/en/api-reference/webhooks/conversation-editor/condition-node-api"},{"title":"Timeout Webhook Request Body (Alternate Flow)","openapi":"open-api-files/treble-api-en.json POST /webhooks/on-timeout","href":"/en/api-reference/webhooks/conversation-editor/timeout-api"},{"title":"Opt-out Webhook","description":"Opt-out webhooks are triggered when a user opts not to receive more messages. Learn how to configure them in this article.","href":"/en/api-reference/webhooks/conversation-editor/opt-out"},{"title":"Opt-out Webhook Request Body","openapi":"open-api-files/treble-api-en.json POST /webhooks/on-optout","href":"/en/api-reference/webhooks/conversation-editor/opt-out-api"}]},{"group":"Webhook Center","pages":[{"title":"Introduction to Webhooks","description":"Webhooks in Treble allow you to receive real-time notifications about important platform events, such as HSM state changes, session closures, or deployment failures.","href":"/en/api-reference/webhooks/webhook-center/intro"},{"title":"HSM Template State Change Webhook","href":"/en/api-reference/webhooks/webhook-center/hsm-change-state"},{"title":"Conversation Close Webhook","href":"/en/api-reference/webhooks/webhook-center/conversation-closed"},{"title":"Deployment Failure Webhook","href":"/en/api-reference/webhooks/webhook-center/deployment-failure"},{"title":"Webhook Request Examples","openapi":"open-api-files/treble-api-en.json POST /treble-webhooks","href":"/en/api-reference/webhooks/webhook-center/api-example"}]},{"group":"API Assignment","pages":[{"title":"Agent assignment webhook","href":"/en/api-reference/webhooks/api-assignation/intro"},{"title":"Assignment webhook reference","openapi":"open-api-files/treble-api-en.json POST /webhooks/on-agent-assignation","href":"/en/api-reference/webhooks/api-assignation/reference"}]}]},{"group":"Editor","pages":[{"title":"Multimedia Variable","href":"/en/api-reference/editor/media"},{"title":"Location Variable","href":"/en/api-reference/editor/location"}]},{"group":"Guides and Tutorials","pages":[{"title":"Integrate Your Own AI in Treble","href":"/en/api-reference/guides/your-ai"}]}]}]},{"anchor":"Community","icon":"slack","href":"https://trebleai.slack.com"},{"anchor":"Blog","icon":"newspaper","href":"https://blog.treble.ai"}]},{"language":"pt","pages":[{"title":"pt","href":"/pt/api-reference/webhooks/conversation-editor/opt-out-api"}]}]},"basePath":"","title":"Opt-out Webhook Request Body - Home","buildId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","deploymentId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-i2a3QZ8E.js","utils-ChLwp8m0.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DRktVTDc.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CA2pEs4T.js","snippetPresets-ClQ6XrKD.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Ct_Lv36y.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-Cn2PYw9e.js","shallow-rkyymjXQ.js","getApiPlaygroundDisplay-BB9vkXtE.js","CodeSnippet-Bm5RU7m1.js","CodeSnippets-BgU9Deuz.js","Page-BUDYNlhG.js","getPastedJson-BD-6NNum.js","icon-8Z6tud2e.js","MethodPill-Tuzr4g3V.js","DuplicateIcon-0ceWFYhN.js","createIcon-FBXow_ST.js","DynamicMarkdown-CD8713Yy.js","SectionHeading-7zgzQbH-.js","axios-vUo_bRtp.js","Markdown-D7Ofw1oz.js","clsx-eKJ4rcii.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CwjSCXIK.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-9EK5IAXV.js"]}