Delete a namespace
Delete a namespace and every profile and memory in it. default cannot be deleted. This cannot be undone.
DELETE
/
ai
/
memory
/
namespaces
/
{namespace}
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.memory.namespaces.delete('namespace');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.memory.namespaces.delete(
"namespace",
)
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.Memory.Namespaces.Delete(
context.TODO(),
"namespace",
)
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().memory().namespaces().delete("namespace");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.ai.memory.namespaces.delete("namespace")
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->memory->namespaces->delete(
'namespace',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:memory:namespaces delete \
--api-key 'My API Key' \
--namespace namespacecurl --request DELETE \
--url https://api.telnyx.com/v2/ai/memory/namespaces/{namespace} \
--header 'Authorization: Bearer <token>'{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "Could not find any usable credentials in the request.",
"source": {
"pointer": "/"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "no such namespace",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10005"
}
}
]
}{
"errors": [
{
"code": "upstream_error",
"detail": "the memory dataplane is unavailable"
}
]
}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.memory.namespaces.delete('namespace');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.memory.namespaces.delete(
"namespace",
)
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.Memory.Namespaces.Delete(
context.TODO(),
"namespace",
)
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().memory().namespaces().delete("namespace");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.ai.memory.namespaces.delete("namespace")
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->memory->namespaces->delete(
'namespace',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:memory:namespaces delete \
--api-key 'My API Key' \
--namespace namespacecurl --request DELETE \
--url https://api.telnyx.com/v2/ai/memory/namespaces/{namespace} \
--header 'Authorization: Bearer <token>'{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "Could not find any usable credentials in the request.",
"source": {
"pointer": "/"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "no such namespace",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10005"
}
}
]
}{
"errors": [
{
"code": "upstream_error",
"detail": "the memory dataplane is unavailable"
}
]
}