Conversations
Erase a conversation
Erase one customer’s questions, answers and blocks, and revoke their open sessions. The cost of past questions is kept, without content. Erasing a customer with no conversation also returns 204. Call it when a customer deletes their account. On Node, call conversations.erase.
DELETE
/
api
/
v1
/
assistants
/
{id}
/
conversations
Erase a conversation
curl --request DELETE \
--url https://app.concatflow.com/api/v1/assistants/{id}/conversations \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.concatflow.com/api/v1/assistants/{id}/conversations"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.concatflow.com/api/v1/assistants/{id}/conversations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.concatflow.com/api/v1/assistants/{id}/conversations"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://app.concatflow.com/api/v1/assistants/{id}/conversations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.concatflow.com/api/v1/assistants/{id}/conversations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"error": "invalid_body"
}{
"error": "invalid_api_key"
}{
"detail": "<unknown>"
}{
"detail": {
"code": "bad_partition"
}
}{
"error": "backend_unreachable"
}Authorizations
Your secret API key, lyra_sk_…, from Settings → Developers → API keys.
Path Parameters
The assistant's ID.
Query Parameters
The customer's partition: customer_id=4712, several pairs joined with ,. URL-encode the whole value. Keys and values must not contain , or =.
Maximum string length:
500Example:
"customer_id=4712"
Response
Erased.
⌘I
Erase a conversation
curl --request DELETE \
--url https://app.concatflow.com/api/v1/assistants/{id}/conversations \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.concatflow.com/api/v1/assistants/{id}/conversations"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.concatflow.com/api/v1/assistants/{id}/conversations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.concatflow.com/api/v1/assistants/{id}/conversations"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://app.concatflow.com/api/v1/assistants/{id}/conversations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.concatflow.com/api/v1/assistants/{id}/conversations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"error": "invalid_body"
}{
"error": "invalid_api_key"
}{
"detail": "<unknown>"
}{
"detail": {
"code": "bad_partition"
}
}{
"error": "backend_unreachable"
}