ZeroCopyZeroCopy
ReferenceManagement API

Management API

Authenticate Management API requests and find endpoints for own keys, customer keys, usage and white label domains

Use the Management API to manage your team's own and customer API keys, read traffic and configure white label domains. The base URL is https://console.zerocopy.sh/api/v1.

The Management API guide covers customer keys, domain setup and retries. The Metrics API guide covers Prometheus scraping, Grafana and historical queries.

Authentication and scopes

Create a management key and send it in Authorization: Bearer YOUR_MANAGEMENT_KEY. An SWQoS API key cannot authenticate these requests. The API ignores session cookies. If the management key has IP restrictions, the request must come from an allowed address.

ScopeAccess
keys:readRetrieve your team's own API keys
keys:writeCreate, update and revoke your team's own API keys
usage:readRetrieve key statistics, transactions and metrics
partner:readRetrieve white label settings, tip accounts, domains, customer keys and customer usage
partner:writeManage domains and create, update, revoke, pause or resume customer keys

A write scope does not grant its read scope. The current-key endpoint needs no additional scope. White label operations require an enrolled partner team; other teams receive HTTP 404. Enrollment leaves your own keys on company tip accounts until all eight vanity accounts are live. You can prepare domains while ZeroCopy reviews the accounts. Customer keys can only be created after the vanity set is live. Use the customer-key endpoints or White label > Customer keys to manage them.

Rate limits

Each management key may make 600 GET requests and 60 other requests per minute. Authenticated responses carry RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset. Exceeding a key's limit returns 429 rate_limited with a Retry-After header.

A team may run two management analytics requests concurrently. Excess requests return 429 analytics_busy with Retry-After: 1. Prometheus cache hits do not count toward this concurrent query limit. Use one scrape job per team and let Grafana query the collected metrics.

Request conventions

Every response carries Request-Id. Keep it when reporting a failed request on Discord.

JSON request and response fields use snake_case. Times use RFC 3339 unless the field specifies another format. POST and PATCH bodies have a 64 KiB limit, including streamed bodies. The Prometheus endpoint returns text exposition with explicit minute-end timestamps.

Idempotency

Send Idempotency-Key on POST requests when retrying after a timeout. Use 1 to 255 printable ASCII characters. The same management key, idempotency key and request replay the saved successful response for 24 hours, with Idempotent-Replayed: true. Refusals are not saved.

A different request under the same key returns 409 idempotency_key_reused. A concurrent repeat returns 409 idempotency_in_progress. The retry guide covers recovery when a saved response is unavailable.

Conditional updates

Key responses include an ETag. Send that value in If-Match on key PATCH, DELETE or customer-key pause and resume requests to reject a stale version with 412 precondition_failed.

Pagination

Paginated lists accept limit from 1 to 100. Supply the response's next_cursor as the next request's cursor. A null cursor ends the collection. The endpoint pages state which lists support pagination and their defaults.

Errors

Errors use application/problem+json with title, status, code, detail and request_id. Validation errors can include an errors array of { path, message } strings. Match on the stable code field. These objects differ from SWQoS rejections.

Account

OperationMethod and pathScope
Retrieve the current keyGET /meNone

API keys

OperationMethod and pathScope
List API keysGET /keyskeys:read
Create an API keyPOST /keyskeys:write
Retrieve an API keyGET /keys/{id}keys:read
Update an API keyPATCH /keys/{id}keys:write
Revoke an API keyDELETE /keys/{id}keys:write
Retrieve key statisticsGET /keys/{id}/statsusage:read

Usage

OperationMethod and pathScope
List transactionsGET /transactionsusage:read

Metrics

OperationMethod and pathScope
Retrieve Prometheus metricsGET /metricsusage:read
Retrieve metric historyGET /metrics/seriesusage:read

White label

OperationMethod and pathScope
Retrieve partner settingsGET /partnerpartner:read
List tip accountsGET /partner/tip-accountspartner:read
List customer keysGET /customer-keyspartner:read
Create a customer keyPOST /customer-keyspartner:write
Retrieve customer usageGET /customer-keys/usagepartner:read
Retrieve a customer keyGET /customer-keys/{id}partner:read
Update a customer keyPATCH /customer-keys/{id}partner:write
Revoke a customer keyDELETE /customer-keys/{id}partner:write
Pause a customer keyPOST /customer-keys/{id}/pausepartner:write
Resume a customer keyPOST /customer-keys/{id}/resumepartner:write
Retrieve customer key statisticsGET /customer-keys/{id}/statspartner:read
List domainsGET /domainspartner:read
Add a domainPOST /domainspartner:write
Retrieve a domainGET /domains/{hostname}partner:read
Remove a domainDELETE /domains/{hostname}partner:write

OpenAPI

Download the OpenAPI JSON. The console also publishes the live contract at /api/v1/openapi.json, cached for five minutes.