Delete a conversation's insight generation results
Delete one insight generation request for a conversation. Generation results are stored per conversation and per insight template; deleting a request permanently removes the stored result but does not stop insight generation from running again. To remove every insight result for the conversation, delete the conversation itself. A successful delete returns an empty response.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
await client.ai.conversations.deleteDelete('conversation_id', 'insight_id');import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
client.ai.conversations.delete_delete(
"conversation_id",
"insight_id",
)
package main
import (
"context"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
err := client.AI.Conversations.DeleteDelete(
context.TODO(),
"conversation_id",
"insight_id",
)
if err != nil {
panic(err.Error())
}
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
client.ai().conversations().deleteDelete("conversation_id", "insight_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.ai.conversations.delete_delete("conversation_id", "insight_id")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->ai->conversations->deleteDelete(
'conversation_id',
'insight_id',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:conversations delete-delete \
--api-key 'My API Key' \
--conversation-id conversation_id \
--insight-id insight_idcurl --request DELETE \
--url https://api.telnyx.com/v2/ai/conversations/{conversation_id}/conversations-insights/{insight_id} \
--header 'Authorization: Bearer <token>'{
"detail": [
{
"loc": [
"body",
"name"
],
"msg": "Field required",
"type": "missing"
}
]
}Authorizations
Path Parameters
Unique identifier of the insight generation request to delete, as returned as data.id by the insight generation and insights-list operations. Note that the nested conversation_insights[].insight_id field returned in the insights-list response is the insight template ID, not the ID accepted here.
Response
Successful Response. The stored insight generation result is permanently deleted.
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
await client.ai.conversations.deleteDelete('conversation_id', 'insight_id');import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
client.ai.conversations.delete_delete(
"conversation_id",
"insight_id",
)
package main
import (
"context"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
err := client.AI.Conversations.DeleteDelete(
context.TODO(),
"conversation_id",
"insight_id",
)
if err != nil {
panic(err.Error())
}
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
client.ai().conversations().deleteDelete("conversation_id", "insight_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.ai.conversations.delete_delete("conversation_id", "insight_id")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->ai->conversations->deleteDelete(
'conversation_id',
'insight_id',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:conversations delete-delete \
--api-key 'My API Key' \
--conversation-id conversation_id \
--insight-id insight_idcurl --request DELETE \
--url https://api.telnyx.com/v2/ai/conversations/{conversation_id}/conversations-insights/{insight_id} \
--header 'Authorization: Bearer <token>'{
"detail": [
{
"loc": [
"body",
"name"
],
"msg": "Field required",
"type": "missing"
}
]
}