Skip to main content
PUT
/
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
});

const response = await client.storage.kvs.keys.update('id', 'key');

console.log(response.data);
{
  "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 /; URL-encode it so the whole string is treated as one key (for example user/1 -> user%2F1).

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

Query Parameters

ttl_secs
integer<int64>

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.

Required range: 1 <= x <= 9223372036

Body

*/*

The value to store, sent as the raw request body. Maximum size: 1 MiB (1048576 bytes).

Raw value bytes, stored verbatim.

Response

Key updated