ReferenceManagement API
Retrieve an API key
GET
Requires the keys:read scope. Returns one of the authenticated team's own API keys. A customer key id returns 404 not_found.
managementKeyheader
AuthorizationBearer <zc_mgmt_>id*stringMatch
^key_[0-9a-f]{12}$The key
application/json- response
id*stringname*string|nullproducts*array<>created_at*|nullexpires_at*|nullpaused_at*|When the key was paused, or null if it is not paused
revoked*booleanrevoked_at*|nullrules*Rules for a key's read products; a request must also pass the endpoint's own
send*|The key's sending settings; null without the send product
// src/bin/management_read_key.rs
// Builds on the example project (/reference/json-rpc#example-project).
use swqos_examples::swqos::{Result, required};
#[tokio::main]
async fn main() -> Result<()> {
let key_id: String = required("KEY_ID")?;
let mut endpoint = reqwest::Url::parse("https://console.zerocopy.sh/api/v1/keys/")?;
endpoint.path_segments_mut().map_err(|_| "invalid base URL")?
.pop_if_empty().push(&key_id);
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(())
}{
"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
}
}