Creates or replaces the value for a key. The request body is stored verbatim as the value — no base64, no JSON envelope — up to 1 MiB. The request’s Content-Type header is stored with the value and echoed back on retrieval. Returns 201 when the key is created and 200 when an existing key is updated.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.storage.kvs.keys.update('id', 'key');
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.storage.kvs.keys.update()
print(response.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
key, err := client.Storage.Kvs.Keys.Update(
context.TODO(),
telnyx.StorageKvsKeysUpdateParams{,
ID: "id",,
Key: "key",,
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", key.Data)
}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();
Object response = client.storage()kvs()keys()update("id", "key");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.storage.kvs.keys.update
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->update();
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx storage:kvs:keys update \
--api-key 'My API Key' \
--id id \
--key keycurl --request PUT \
--url https://api.telnyx.com/v2/storage/kvs/{id}/keys/{key} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--data '"<string>"'{
"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"
}
]
}{
"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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
KV namespace ID
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.
256^[-/_=.a-zA-Z0-9]+$Query Parameters
Time-to-live in seconds. When set, the key expires and is deleted after this duration. Requires a namespace provisioned with TTL support; namespaces without it return a 409.
1 <= x <= 9223372036Body
The value to store, sent as the raw request body. Maximum size: 1 MiB (1048576 bytes).
Raw value bytes, stored verbatim.
Response
Key updated
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
});
const response = await client.storage.kvs.keys.update('id', 'key');
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.storage.kvs.keys.update()
print(response.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
key, err := client.Storage.Kvs.Keys.Update(
context.TODO(),
telnyx.StorageKvsKeysUpdateParams{,
ID: "id",,
Key: "key",,
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", key.Data)
}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();
Object response = client.storage()kvs()keys()update("id", "key");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.storage.kvs.keys.update
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->update();
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx storage:kvs:keys update \
--api-key 'My API Key' \
--id id \
--key keycurl --request PUT \
--url https://api.telnyx.com/v2/storage/kvs/{id}/keys/{key} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/octet-stream' \
--data '"<string>"'{
"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"
}
]
}{
"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"
}
]
}