ZeroCopyZeroCopy
ReferenceManagement API

List API keys

GET
/keys

Requires the keys:read scope. Returns the authenticated team's own API keys, with cursor pagination. Customer keys are excluded. limit is 1 to 100 and defaults to 50. Supply next_cursor as the next request's cursor; null ends the collection.

Authorization

managementKey
headerAuthorizationBearer <zc_mgmt_>

Query Parameters

limit?integer
Range1 <= value <= 100
Default50
cursor?string

next_cursor from the previous page

Lengthlength <= 512

Response Body

A page of keys

application/json
  1. response
data*array<>
next_cursor*string|null
Example request
// src/bin/management_list_keys.rs
// Builds on the example project (/reference/json-rpc#example-project).
use swqos_examples::swqos::{Result, required};

#[tokio::main]
async fn main() -> Result<()> {
    let limit: u8 = 50;
    let mut endpoint = reqwest::Url::parse("https://console.zerocopy.sh/api/v1/keys")?;
    endpoint.query_pairs_mut().append_pair("limit", &limit.to_string());
    if let Ok(cursor) = std::env::var("CURSOR") {
        endpoint.query_pairs_mut().append_pair("cursor", &cursor);
    }
    let request = reqwest::Client::new()
        .get(endpoint)
        .bearer_auth(required("MANAGEMENT_API_KEY")?);
    let response = request.send().await?;
    let status = response.status();
    let request_id = response.headers().get("Request-Id")
        .map(|value| value.to_str()).transpose()?.unwrap_or("<missing>").to_owned();
    if let Some(etag) = response.headers().get("ETag") {
        eprintln!("ETag: {}", etag.to_str()?);
    }
    let body = response.text().await?;
    if !status.is_success() {
        return Err(format!("HTTP {status}; Request-Id: {request_id}; {body}").into());
    }
    eprintln!("Request-Id: {request_id}");
    println!("{body}");
    Ok(())
}
Example response
{
  "data": [
    {
      "id": "key_012345abcdef",
      "name": "production",
      "products": [
        "send"
      ],
      "created_at": "2026-11-12T09:00:00Z",
      "expires_at": "2026-12-12T09:00:00Z",
      "paused_at": null,
      "revoked": false,
      "revoked_at": null,
      "rules": {
        "endpoints": {
          "mode": "all"
        },
        "ips": [
          "203.0.113.10/32"
        ],
        "origins": [
          "https://dashboard.example"
        ],
        "methods": {
          "mode": "allow",
          "list": [
            "getBalance"
          ]
        }
      },
      "send": {
        "rate_per_second": 50,
        "min_tip_lamports": 1000000
      }
    },
    {
      "id": "key_89abcdef0123",
      "name": "research",
      "products": [
        "send"
      ],
      "created_at": "2026-11-12T09:00:00Z",
      "expires_at": "2026-12-12T09:00:00Z",
      "paused_at": null,
      "revoked": false,
      "revoked_at": null,
      "rules": {
        "endpoints": {
          "mode": "all"
        },
        "ips": [
          "203.0.113.10/32"
        ],
        "origins": [
          "https://dashboard.example"
        ],
        "methods": {
          "mode": "allow",
          "list": [
            "getBalance"
          ]
        }
      },
      "send": {
        "rate_per_second": 50,
        "min_tip_lamports": 1000000
      }
    }
  ],
  "next_cursor": null
}