End Conversation
curl --request POST \
--url https://api.bland.ai/v1/sms/conversations/{conversation_id}/end \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"reason": "<string>",
"actor": "<string>"
}
'import requests
url = "https://api.bland.ai/v1/sms/conversations/{conversation_id}/end"
payload = {
"reason": "<string>",
"actor": "<string>"
}
headers = {
"authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: '<string>', actor: '<string>'})
};
fetch('https://api.bland.ai/v1/sms/conversations/{conversation_id}/end', 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.bland.ai/v1/sms/conversations/{conversation_id}/end",
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([
'reason' => '<string>',
'actor' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <authorization>"
],
]);
$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.bland.ai/v1/sms/conversations/{conversation_id}/end"
payload := strings.NewReader("{\n \"reason\": \"<string>\",\n \"actor\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
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.bland.ai/v1/sms/conversations/{conversation_id}/end")
.header("authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"<string>\",\n \"actor\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/sms/conversations/{conversation_id}/end")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"<string>\",\n \"actor\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"message": "Conversation ended",
"was_active": true,
"was_handed_off": true,
"conversation": {
"id": "8f1c2a4e-1b7d-4f2a-9c1e-2d3f4a5b6c7d",
"is_active": false,
"current_node_id": "transfer-to-human",
"human_handoff_at": null,
"human_handoff_reason": null,
"human_handoff_metadata": null,
"updated_at": "2026-09-11T20:14:37.000Z"
},
"workflow_id": "sms-end:8f1c2a4e-1b7d-4f2a-9c1e-2d3f4a5b6c7d:3d2f1c0b-..."
},
"errors": null
}
Messaging
End Conversation
Close a conversation for good, typically when a human rep is done with it.
POST
/
v1
/
sms
/
conversations
/
{conversation_id}
/
end
End Conversation
curl --request POST \
--url https://api.bland.ai/v1/sms/conversations/{conversation_id}/end \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"reason": "<string>",
"actor": "<string>"
}
'import requests
url = "https://api.bland.ai/v1/sms/conversations/{conversation_id}/end"
payload = {
"reason": "<string>",
"actor": "<string>"
}
headers = {
"authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: '<string>', actor: '<string>'})
};
fetch('https://api.bland.ai/v1/sms/conversations/{conversation_id}/end', 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.bland.ai/v1/sms/conversations/{conversation_id}/end",
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([
'reason' => '<string>',
'actor' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <authorization>"
],
]);
$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.bland.ai/v1/sms/conversations/{conversation_id}/end"
payload := strings.NewReader("{\n \"reason\": \"<string>\",\n \"actor\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
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.bland.ai/v1/sms/conversations/{conversation_id}/end")
.header("authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"<string>\",\n \"actor\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/sms/conversations/{conversation_id}/end")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"<string>\",\n \"actor\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"message": "Conversation ended",
"was_active": true,
"was_handed_off": true,
"conversation": {
"id": "8f1c2a4e-1b7d-4f2a-9c1e-2d3f4a5b6c7d",
"is_active": false,
"current_node_id": "transfer-to-human",
"human_handoff_at": null,
"human_handoff_reason": null,
"human_handoff_metadata": null,
"updated_at": "2026-09-11T20:14:37.000Z"
},
"workflow_id": "sms-end:8f1c2a4e-1b7d-4f2a-9c1e-2d3f4a5b6c7d:3d2f1c0b-..."
},
"errors": null
}
Enterprise Feature - SMS is only available on Enterprise plans.
metadata.last_human_handoff), the inactivity timer is cancelled, post-conversation analysis runs (summary, citations, dispositions), and a single status: "ended" status webhook fires with the same payload an End Call node produces. No human_handoff_ended webhook is sent; ended is the final event.
Nothing is sent to the customer. If the rep wants to say goodbye, send it first with Send Message on Conversation, then call this. The next inbound text from the customer starts a fresh conversation with the agent.
Headers
string
required
Your API key for authentication.
Path Parameters
string
required
The conversation to end.
Body Parameters
string
Surfaced as
status_reason on the ended webhook. Max 500 characters. Defaults to “Conversation ended by the human rep” when a handoff was active, otherwise “Conversation ended via API”.string
Who ended the thread, for the audit trail.
Response
boolean
false when the conversation was already over. Nothing is changed and no webhook fires in that case; whatever ended it already sent one.boolean
true when a human owned the thread at the moment it was ended.{
"data": {
"message": "Conversation ended",
"was_active": true,
"was_handed_off": true,
"conversation": {
"id": "8f1c2a4e-1b7d-4f2a-9c1e-2d3f4a5b6c7d",
"is_active": false,
"current_node_id": "transfer-to-human",
"human_handoff_at": null,
"human_handoff_reason": null,
"human_handoff_metadata": null,
"updated_at": "2026-09-11T20:14:37.000Z"
},
"workflow_id": "sms-end:8f1c2a4e-1b7d-4f2a-9c1e-2d3f4a5b6c7d:3d2f1c0b-..."
},
"errors": null
}
Was this page helpful?