> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List keys

> Lists the keys in a namespace. Returns key names and metadata only, never values. Results are paginated with `limit` and an opaque `cursor`.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/edge-compute.yml get /storage/kvs/{id}/keys
openapi: 3.1.0
info:
  title: Telnyx Edge Compute API
  version: 2.0.0
  description: API for Edge Compute key-value storage (namespaces and keys).
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /storage/kvs/{id}/keys:
    get:
      tags:
        - kv keys
      summary: List keys
      description: >-
        Lists the keys in a namespace. Returns key names and metadata only,
        never values. Results are paginated with `limit` and an opaque `cursor`.
      operationId: ListKvKeys
      parameters:
        - description: KV namespace ID
          name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - description: Return only keys that start with this prefix.
          name: prefix
          in: query
          schema:
            type: string
        - description: >-
            Maximum number of keys to return. Values above 1000 are treated as
            1000.
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 1000
        - description: Opaque pagination cursor from a previous response's `meta.cursor`.
          name: cursor
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Keys retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KvKeyListResponseWrapper'
        '400':
          description: >-
            Bad request — `id` is not a valid UUID, or `limit` is not a positive
            integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/edge-compute_Errors'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/edge-compute_Errors'
        '404':
          description: KV namespace not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/edge-compute_Errors'
        '409':
          description: >-
            Conflict — the namespace is not ready (`status` is not
            `provision_ok`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/edge-compute_Errors'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericErrorResponse'
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Telnyx from 'telnyx';

            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });

            // Automatically fetches more pages as needed.
            for await (const response of client.storage.kvs.keys.list()) {
              console.log(response);
            }
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            page = client.storage.kvs.keys.list(
                "id",
            )
            print(page.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tkeys, err := client.Storage.Kvs.Keys.List(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", keys.Data)\n}\n"
        - lang: Java
          source: |-
            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();

                    KvKeyListResponseWrapper page = client.storage()kvs()keys()list("id");
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

            page = telnyx.storage.kvs.keys.list("id")

            puts(page)
        - lang: PHP
          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 {
              $page = $client->storage->kvs->keys->list(
                'id',
              );

              var_dump($page);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx storage:kvs:keys list \
              --api-key 'My API Key' \
              --id id
components:
  schemas:
    KvKeyListResponseWrapper:
      type: object
      properties:
        record_type:
          type: string
          example: storage_kv_key
        data:
          type: array
          items:
            $ref: '#/components/schemas/KvKey'
        meta:
          $ref: '#/components/schemas/KvListMeta'
    edge-compute_Errors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/edge-compute_Error'
    GenericErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/edge-compute_Error'
    KvKey:
      type: object
      properties:
        key:
          type: string
          example: user/123
        size_bytes:
          type: integer
          description: Size of the stored value in bytes.
          example: 21
        updated_at:
          type: string
          format: date-time
          example: '2026-06-18T14:48:17Z'
    KvListMeta:
      type: object
      properties:
        has_more:
          type: boolean
          description: Whether more results are available on a following page.
          example: false
        cursor:
          type: string
          description: >-
            Opaque cursor for the next page; pass it back as the `cursor` query
            parameter. Omitted when there are no further results.
    edge-compute_Error:
      type: object
      properties:
        code:
          type: string
          example: '10005'
        detail:
          type: string
          example: The requested function does not exist or you don't have access to it
        meta:
          $ref: '#/components/schemas/ErrorMeta'
        source:
          $ref: '#/components/schemas/ErrorSource'
        title:
          type: string
          example: Function not found
    ErrorMeta:
      type: object
      properties:
        url:
          type: string
          example: https://docs.telnyx.com/api/errors/10005
    ErrorSource:
      type: object
      properties:
        parameter:
          type: string
          example: id
        pointer:
          type: string
          example: /id
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````