ReferenceManagement API
List domains
GET
Requires the partner:read scope. Returns only the enrolled partner team's domains, ordered by hostname.
managementKeyheader
AuthorizationBearer <zc_mgmt_>Domains and the DNS records to create
application/json- response
data*array<>// src/bin/management_list_domains.rs
// Builds on the example project (/reference/json-rpc#example-project).
use swqos_examples::swqos::{Result, required};
#[tokio::main]
async fn main() -> Result<()> {
let endpoint = reqwest::Url::parse("https://console.zerocopy.sh/api/v1/domains")?;
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": [
{
"hostname": "send.partner.example",
"target": "sol",
"products": [
"send"
],
"status": "active",
"acme_dns_fulldomain": "partner-example.acme.zerocopy.sh",
"not_after": "2027-02-10T09:00:00Z",
"last_error": null,
"created_at": "2026-11-12T09:00:00Z",
"updated_at": "2026-11-12T09:05:00Z",
"dns_records": [
{
"type": "CNAME",
"name": "send.partner.example",
"value": "sol.zerocopy.sh"
},
{
"type": "CNAME",
"name": "_acme-challenge.send.partner.example",
"value": "partner-example.acme.zerocopy.sh"
}
]
},
{
"hostname": "backup.partner.example",
"target": "sol",
"products": [
"send"
],
"status": "pending",
"acme_dns_fulldomain": null,
"not_after": null,
"last_error": null,
"created_at": "2026-11-12T09:00:00Z",
"updated_at": "2026-11-12T09:00:00Z",
"dns_records": [
{
"type": "CNAME",
"name": "backup.partner.example",
"value": "sol.zerocopy.sh"
},
{
"type": "CNAME",
"name": "_acme-challenge.backup.partner.example",
"value": null
}
]
},
{
"hostname": "europe.partner.example",
"target": "sol",
"products": [
"send"
],
"status": "awaiting_dns",
"acme_dns_fulldomain": "europe-example.acme.zerocopy.sh",
"not_after": null,
"last_error": null,
"created_at": "2026-11-12T09:00:00Z",
"updated_at": "2026-11-12T09:05:00Z",
"dns_records": [
{
"type": "CNAME",
"name": "europe.partner.example",
"value": "sol.zerocopy.sh"
},
{
"type": "CNAME",
"name": "_acme-challenge.europe.partner.example",
"value": "europe-example.acme.zerocopy.sh"
}
]
},
{
"hostname": "archive.partner.example",
"target": "sol",
"products": [
"send"
],
"status": "failed",
"acme_dns_fulldomain": "archive-example.acme.zerocopy.sh",
"not_after": null,
"last_error": "DNS record does not match the assigned challenge target.",
"created_at": "2026-11-12T09:00:00Z",
"updated_at": "2026-11-12T09:05:00Z",
"dns_records": [
{
"type": "CNAME",
"name": "archive.partner.example",
"value": "sol.zerocopy.sh"
},
{
"type": "CNAME",
"name": "_acme-challenge.archive.partner.example",
"value": "archive-example.acme.zerocopy.sh"
}
]
}
]
}