Delete a specific assistant version
Permanently removes a specific version of an assistant. Can not delete main version
DELETE
/
ai
/
assistants
/
{assistant_id}
/
versions
/
{version_id}
JavaScript
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.assistants.versions.delete('version_id', { assistant_id: 'assistant_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.assistants.versions.delete(
version_id="version_id",
assistant_id="assistant_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.Assistants.Versions.Delete(
context.TODO(),
"version_id",
telnyx.AIAssistantVersionDeleteParams{
AssistantID: "assistant_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;
import com.telnyx.sdk.models.ai.assistants.versions.VersionDeleteParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
VersionDeleteParams params = VersionDeleteParams.builder()
.assistantId("assistant_id")
.versionId("version_id")
.build();
client.ai().assistants().versions().delete(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
result = telnyx.ai.assistants.versions.delete("version_id", assistant_id: "assistant_id")
puts(result)<?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 {
$result = $client->ai->assistants->versions->delete(
'version_id', assistantID: 'assistant_id'
);
var_dump($result);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:assistants:versions delete \
--api-key 'My API Key' \
--assistant-id assistant_id \
--version-id version_idcurl --request DELETE \
--url https://api.telnyx.com/v2/ai/assistants/{assistant_id}/versions/{version_id} \
--header 'Authorization: Bearer <token>'{
"detail": [
{
"loc": [
"string"
],
"msg": "Message",
"type": "Error Type"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier of the assistant.
Unique identifier of the version.
Response
Returns HTTP 204 No Content on successful deletion
Was this page helpful?
JavaScript
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.assistants.versions.delete('version_id', { assistant_id: 'assistant_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.assistants.versions.delete(
version_id="version_id",
assistant_id="assistant_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.Assistants.Versions.Delete(
context.TODO(),
"version_id",
telnyx.AIAssistantVersionDeleteParams{
AssistantID: "assistant_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;
import com.telnyx.sdk.models.ai.assistants.versions.VersionDeleteParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
VersionDeleteParams params = VersionDeleteParams.builder()
.assistantId("assistant_id")
.versionId("version_id")
.build();
client.ai().assistants().versions().delete(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
result = telnyx.ai.assistants.versions.delete("version_id", assistant_id: "assistant_id")
puts(result)<?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 {
$result = $client->ai->assistants->versions->delete(
'version_id', assistantID: 'assistant_id'
);
var_dump($result);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:assistants:versions delete \
--api-key 'My API Key' \
--assistant-id assistant_id \
--version-id version_idcurl --request DELETE \
--url https://api.telnyx.com/v2/ai/assistants/{assistant_id}/versions/{version_id} \
--header 'Authorization: Bearer <token>'{
"detail": [
{
"loc": [
"string"
],
"msg": "Message",
"type": "Error Type"
}
]
}