Forget one source
Deletes one source — an ingested session or a remembered fact — together with the memories derived from it. A memory derived from this source and others is deleted too, and derived again from what remains in the background. It answers only once the source is gone. A source that is not there — never stored, another profile’s, or already deleted — answers 404, so on a 502 or a 504 repeat the identical request and read a 404 as done. An ingest of the same session that is still queued is not cancelled, and stores the session again when it runs. Nothing here can be undone.
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.profiles.sources.delete('namespace', 'profile_id', 'source_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.memory.namespaces.profiles.sources.delete(
"namespace",
"profile_id",
"source_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.Memory.Namespaces.Profiles.Sources.Delete(
context.TODO(),
"namespace",
"profile_id",
"source_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().memory().namespaces().profiles().sources().delete("namespace", "profile_id", "source_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
forget_source = telnyx.ai.memory.namespaces.profiles.sources.delete("namespace", "profile_id", "source_id")
puts(forget_source)<?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 {
$forget_source = $client->ai->memory->namespaces->profiles->sources->delete(
'namespace',
'profile_id',
'source_id',
);
var_dump($forget_source);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:memory:namespaces:profiles:sources delete \
--api-key 'My API Key' \
--namespace namespace \
--profile-id profile_id \
--source-id source_idcurl --request DELETE \
--url https://api.telnyx.com/v2/ai/memory/namespaces/{namespace}/profiles/{profile_id}/sources/{source_id} \
--header 'Authorization: Bearer <token>'{
"data": {
"profile_id": "caller:+13128675309",
"source_id": "b1e6c0a2-4f3d-4a2e-9c7b-8e1f2a3b4c5d",
"memories_deleted": 3
}
}{
"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": "source_not_found",
"detail": "no such source"
}
]
}{
"errors": [
{
"code": "invalid_request",
"detail": "source id must be a UUID"
}
]
}{
"errors": [
{
"code": "upstream_error",
"detail": "the memory dataplane is unavailable"
}
]
}Authorizations
Telnyx API key
Path Parameters
The namespace. default exists for every organization.
The profile: your identifier for the user, caller or agent this memory is about.
Identifies one source within its profile: an ingested session, or one remembered fact. Returned by ingest and remember when the write is accepted. Re-ingesting a session keeps its source id.
Response
The source and its memories are gone
Show child attributes
Show child attributes
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.memory.namespaces.profiles.sources.delete('namespace', 'profile_id', 'source_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.memory.namespaces.profiles.sources.delete(
"namespace",
"profile_id",
"source_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.Memory.Namespaces.Profiles.Sources.Delete(
context.TODO(),
"namespace",
"profile_id",
"source_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().memory().namespaces().profiles().sources().delete("namespace", "profile_id", "source_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
forget_source = telnyx.ai.memory.namespaces.profiles.sources.delete("namespace", "profile_id", "source_id")
puts(forget_source)<?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 {
$forget_source = $client->ai->memory->namespaces->profiles->sources->delete(
'namespace',
'profile_id',
'source_id',
);
var_dump($forget_source);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:memory:namespaces:profiles:sources delete \
--api-key 'My API Key' \
--namespace namespace \
--profile-id profile_id \
--source-id source_idcurl --request DELETE \
--url https://api.telnyx.com/v2/ai/memory/namespaces/{namespace}/profiles/{profile_id}/sources/{source_id} \
--header 'Authorization: Bearer <token>'{
"data": {
"profile_id": "caller:+13128675309",
"source_id": "b1e6c0a2-4f3d-4a2e-9c7b-8e1f2a3b4c5d",
"memories_deleted": 3
}
}{
"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": "source_not_found",
"detail": "no such source"
}
]
}{
"errors": [
{
"code": "invalid_request",
"detail": "source id must be a UUID"
}
]
}{
"errors": [
{
"code": "upstream_error",
"detail": "the memory dataplane is unavailable"
}
]
}