Close conversation
curl --request POST \
--url https://api.wotnot.io/api/v1/conversation/{conversation_id}/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"event": "status",
"status": "CLOSE",
"user": {
"by": "agent_email@domain.com"
}
}
'import requests
url = "https://api.wotnot.io/api/v1/conversation/{conversation_id}/events"
payload = {
"event": "status",
"status": "CLOSE",
"user": { "by": "agent_email@domain.com" }
}
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({event: 'status', status: 'CLOSE', user: {by: 'agent_email@domain.com'}})
};
fetch('https://api.wotnot.io/api/v1/conversation/{conversation_id}/events', 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.wotnot.io/api/v1/conversation/{conversation_id}/events",
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([
'event' => 'status',
'status' => 'CLOSE',
'user' => [
'by' => 'agent_email@domain.com'
]
]),
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://api.wotnot.io/api/v1/conversation/{conversation_id}/events"
payload := strings.NewReader("{\n \"event\": \"status\",\n \"status\": \"CLOSE\",\n \"user\": {\n \"by\": \"agent_email@domain.com\"\n }\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://api.wotnot.io/api/v1/conversation/{conversation_id}/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"event\": \"status\",\n \"status\": \"CLOSE\",\n \"user\": {\n \"by\": \"agent_email@domain.com\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wotnot.io/api/v1/conversation/{conversation_id}/events")
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 \"event\": \"status\",\n \"status\": \"CLOSE\",\n \"user\": {\n \"by\": \"agent_email@domain.com\"\n }\n}"
response = http.request(request)
puts response.read_body{
"ok": true
}{
"ok": false,
"error": "CONVERSATION_NOT_CLOSED",
"code": "CONVERSATION_NOT_CLOSED",
"message": "Conversation is not closed due to user limit validation.",
"status": 400
}{
"ok": false,
"error": "JWT_SIGNATURE_EXCEPTION",
"code": "JWT_SIGNATURE_EXCEPTION",
"message": "Invalid JWT token",
"status": 401
}{
"ok": false,
"error": "CONVERSATION_NOT_FOUND",
"code": "CONVERSATION_NOT_FOUND",
"message": "Conversation is not available.",
"status": 404
}Conversation
Close conversation
Closes an open conversation.
POST
/
api
/
v1
/
conversation
/
{conversation_id}
/
events
Close conversation
curl --request POST \
--url https://api.wotnot.io/api/v1/conversation/{conversation_id}/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"event": "status",
"status": "CLOSE",
"user": {
"by": "agent_email@domain.com"
}
}
'import requests
url = "https://api.wotnot.io/api/v1/conversation/{conversation_id}/events"
payload = {
"event": "status",
"status": "CLOSE",
"user": { "by": "agent_email@domain.com" }
}
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({event: 'status', status: 'CLOSE', user: {by: 'agent_email@domain.com'}})
};
fetch('https://api.wotnot.io/api/v1/conversation/{conversation_id}/events', 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.wotnot.io/api/v1/conversation/{conversation_id}/events",
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([
'event' => 'status',
'status' => 'CLOSE',
'user' => [
'by' => 'agent_email@domain.com'
]
]),
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://api.wotnot.io/api/v1/conversation/{conversation_id}/events"
payload := strings.NewReader("{\n \"event\": \"status\",\n \"status\": \"CLOSE\",\n \"user\": {\n \"by\": \"agent_email@domain.com\"\n }\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://api.wotnot.io/api/v1/conversation/{conversation_id}/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"event\": \"status\",\n \"status\": \"CLOSE\",\n \"user\": {\n \"by\": \"agent_email@domain.com\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wotnot.io/api/v1/conversation/{conversation_id}/events")
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 \"event\": \"status\",\n \"status\": \"CLOSE\",\n \"user\": {\n \"by\": \"agent_email@domain.com\"\n }\n}"
response = http.request(request)
puts response.read_body{
"ok": true
}{
"ok": false,
"error": "CONVERSATION_NOT_CLOSED",
"code": "CONVERSATION_NOT_CLOSED",
"message": "Conversation is not closed due to user limit validation.",
"status": 400
}{
"ok": false,
"error": "JWT_SIGNATURE_EXCEPTION",
"code": "JWT_SIGNATURE_EXCEPTION",
"message": "Invalid JWT token",
"status": 401
}{
"ok": false,
"error": "CONVERSATION_NOT_FOUND",
"code": "CONVERSATION_NOT_FOUND",
"message": "Conversation is not available.",
"status": 404
}Authorizations
All of WotNot's APIs use Bearer token authentication. Send your account token as Bearer <token>. You can find it in Settings > Account Settings > Developer. Keep it on your server: anyone who has it can call the API as your account.
Path Parameters
The ID of the conversation to close. It's the conversation.id you get back from Create conversation.
Body
application/json
The status change to make and who is making it.
Response
The conversation was closed. Returns ok set to true.
true when the request worked. Errors return false.
Example:
true
Last modified on October 23, 2026
Was this page helpful?