Skip to main content
DELETE
/
storage
/
kvs
/
{id}
/
keys
/
{key}
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.storage.kvs.keys.delete('id', 'key');
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.storage.kvs.keys.delete(
    "id",
    "key",
)
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.Storage.Kvs.Keys.Delete(
		context.TODO(),
		"id",
		"key",
	)
	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.storage()kvs()keys()delete("id", "key");
    }
}
require "telnyx"

telnyx = Telnyx::Client.new(api_key: "My API Key")

response = telnyx.storage.kvs.keys.delete("id", "key")

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->storage->kvs->keys->delete(
    'id',
    'key',
  );

  var_dump($response);
} catch (APIException $e) {
  echo $e->getMessage();
}
telnyx storage:kvs:keys delete \
  --api-key 'My API Key' \
  --id id \
  --key key
curl --request DELETE \
  --url https://api.telnyx.com/v2/storage/kvs/{id}/keys/{key} \
  --header 'Authorization: Bearer <token>'
{
  "errors": [
    {
      "code": "10005",
      "detail": "The requested function does not exist or you don't have access to it",
      "meta": {
        "url": "https://docs.telnyx.com/api/errors/10005"
      },
      "source": {
        "parameter": "id",
        "pointer": "/id"
      },
      "title": "Function not found"
    }
  ]
}
{
  "errors": [
    {
      "code": "10005",
      "detail": "The requested function does not exist or you don't have access to it",
      "meta": {
        "url": "https://docs.telnyx.com/api/errors/10005"
      },
      "source": {
        "parameter": "id",
        "pointer": "/id"
      },
      "title": "Function not found"
    }
  ]
}
{
  "errors": [
    {
      "code": "10005",
      "detail": "The requested function does not exist or you don't have access to it",
      "meta": {
        "url": "https://docs.telnyx.com/api/errors/10005"
      },
      "source": {
        "parameter": "id",
        "pointer": "/id"
      },
      "title": "Function not found"
    }
  ]
}
{
  "errors": [
    {
      "code": "10005",
      "detail": "The requested function does not exist or you don't have access to it",
      "meta": {
        "url": "https://docs.telnyx.com/api/errors/10005"
      },
      "source": {
        "parameter": "id",
        "pointer": "/id"
      },
      "title": "Function not found"
    }
  ]
}
{
  "errors": [
    {
      "code": "10005",
      "detail": "The requested function does not exist or you don't have access to it",
      "meta": {
        "url": "https://docs.telnyx.com/api/errors/10005"
      },
      "source": {
        "parameter": "id",
        "pointer": "/id"
      },
      "title": "Function not found"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

KV namespace ID

key
string
required

Key name. Allowed characters: a-z A-Z 0-9 - _ / = .; maximum 256 characters; names starting with _ are reserved for system use. May contain /. When calling the HTTP API directly, URL-encode the key so the whole string is treated as one key (for example user/1 -> user%2F1). SDK users should pass the key raw - SDKs URL-encode path parameters automatically.

Maximum string length: 256
Pattern: ^[-/_=.a-zA-Z0-9]+$

Response

Key deleted (returned even if the key did not exist)