ReferenceManagement API
List customer keys
GET
Requires the partner:read scope. Returns the enrolled partner team's customer keys with cursor pagination and an optional exact customer reference. Own 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.
managementKeyheader
AuthorizationBearer <zc_mgmt_>limit?integerRange
1 <= value <= 100Default
50cursor?stringnext_cursor from the previous page
Length
length <= 512customer_ref?stringReturn only this exact customer reference
Length
1 <= length <= 100A page of keys
application/json- response
data*array<>next_cursor*string|null// src/bin/management_list_customer_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/customer-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);
}
if let Ok(customer_ref) = std::env::var("CUSTOMER_REF") {
endpoint.query_pairs_mut().append_pair("customer_ref", &customer_ref);
}
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(())
}{
"data": [
{
"id": "key_012345abcdef",
"name": "Acme primary",
"products": [
"send"
],
"created_at": "2026-11-12T09:00:00Z",
"expires_at": null,
"paused_at": null,
"revoked": false,
"revoked_at": null,
"rules": {
"endpoints": {
"mode": "all"
},
"ips": [],
"origins": [],
"methods": {
"mode": "all",
"list": []
}
},
"send": {
"rate_per_second": 15,
"min_tip_lamports": 1000000
},
"customer_ref": "acme-123"
}
],
"next_cursor": null
}