Zum Hauptinhalt springen

Manage your services, servers, invoices and tickets from your own software.

Zenix API

The Zenix API is a JSON REST API over HTTPS. Every request is authenticated with an API key that the account owner creates in the customer panel. The API never exposes payment, ordering or account-security actions.

OpenAPI 3.1 specification (openapi.json)

The complete reference: every endpoint with its parameters, request bodies, response schemas, required scope, examples and error codes, in one machine-readable file. Import it into Postman, Insomnia or Swagger Editor, or generate a client library with openapi-generator.

Open openapi.jsonhttps://api.zenix.net.tr/v1/openapi.json

Base URL

https://api.zenix.net.tr/v1

All endpoints are relative to this address. Plain HTTP is rejected.

Authentication

The account owner creates keys in the customer panel under API keys, confirming with their password and two-factor code. The key is shown once; store it like a password and send it on every request:

Authorization: Bearer zxc_live_...

Never put the key in a URL. Requests without a valid key get 401; repeated failures from one address are rate limited. The account owner is emailed when a key is created or revoked, and can revoke a key at any time.

Scopes

A key only works for the scopes it was created with. Scopes and services cannot be changed: to change them, revoke the key and create a new one. The allowed IP addresses can be edited in the customer panel at any time.

ScopeGrants
services:readList services and read service details, server overview and live server status.
servers:powerStart, stop, restart and power off servers. Requires services:read.
domains:readList domains. Transfer (EPP) codes are never returned.
energy:readRead energy consumption and live load (live load only for keys covering all services).
invoices:readList and read invoices. Account-wide.
tickets:readList and read support tickets. Account-wide.
tickets:writeOpen and reply to support tickets. Requires tickets:read.
bgp:readRead ASNs, BGP sessions and prefixes. Account-wide.

Service and IP restrictions

A key can be limited to selected services: lists then contain only those services, and account-wide scopes (invoices, tickets, BGP) cannot be granted. A key can also be limited to IP addresses or CIDR blocks; requests from other addresses get 403 ip_not_allowed. Keys can expire after 30, 90 or 365 days, or never.

Rate limits

Per key: 120 read and 20 write requests per minute. All keys of an account together: 300 read and 40 write requests per minute. Responses carry X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; when a limit is exceeded you get 429 with Retry-After.

Server status, overview and power actions also share a capacity with other customers and may return 429 server_rate_limited. Status is cached for 10 seconds and the server overview for 60 seconds, so polling faster does not give fresher data.

Requests and responses

  • Responses are JSON: successful responses have success, data and meta.request_id; errors have success false, error.code, error.message and sometimes error.details. Quote the request_id when contacting support.
  • Lists accept limit (1-100, default 25) and offset, and return meta.pagination with limit, offset, total and has_more. Unknown or repeated query parameters are rejected with 422.
  • Amounts and other decimals are strings, for example 24.00, never floating-point numbers. Amounts come with a separate currency field.
  • Timestamps are ISO 8601 with an offset (Z for UTC; appointment times use +03:00). Calendar days are YYYY-MM-DD. Energy days and months are UTC.
  • Field names are snake_case. Status values may gain new values within v1; treat unknown values gracefully.
{
  "success": true,
  "data": [ { "id": 123, "product_name": "VDS 4", "status": "active", "recurring_amount": "24.00", "currency": "USD" } ],
  "meta": {
    "request_id": "7f3c9a2e-…",
    "pagination": { "limit": 10, "offset": 0, "total": 1, "has_more": false }
  }
}

Retries and idempotency

Write endpoints accept an Idempotency-Key header (1-64 characters: letters, digits, '.', '_', ':' or '-'). Retrying with the same key within 24 hours returns the original response with Idempotent-Replayed: true instead of repeating the action. Reusing a key with a different body returns 422 idempotency_key_reused. After a timeout (504) the action may still complete: retry with the same key rather than a new one.

Endpoints

EndpointScopeDescription
GET /meanyThe calling key: scopes, restrictions, expiry and account.
GET /departmentsanyDepartment keys for opening tickets.
GET /servicesservices:readYour services, active first.
GET /services/{id}services:readOne service, including whether it has a managed server.
GET /services/{id}/serverservices:readServer overview: hardware, addresses, OS and available operations.
GET /services/{id}/server/statusservices:readLive power state and resource usage.
POST /services/{id}/server/powerservers:powerStart, stop, restart or power off a server.
GET /invoicesinvoices:readYour invoices, newest first.
GET /invoices/{id}invoices:readOne invoice with its lines and official document status.
GET /ticketstickets:readYour support tickets.
GET /tickets/{id}tickets:readOne ticket with its messages.
POST /ticketstickets:writeOpen a support ticket.
POST /tickets/{id}/repliestickets:writeReply to a ticket (reopens a closed ticket).
GET /bgp/asnsbgp:readYour ASNs and their verification.
GET /bgp/sessionsbgp:readYour BGP sessions.
GET /bgp/prefixesbgp:readYour prefixes with approval, RPKI/IRR and upstream state.
GET /domainsdomains:readYour domains (read-only; transfer codes are never returned).
GET /metrics/energyenergy:readMonthly energy consumption per meter.
GET /metrics/energy/seriesenergy:readEnergy consumption as an hourly, daily or monthly series.
GET /metrics/energy/liveenergy:readLive power draw per cabinet and feed imbalance alerts.

Examples

List the first ten services:

curl https://api.zenix.net.tr/v1/services?limit=10 \
  -H "Authorization: Bearer $ZENIX_API_KEY"

Restart a server, safe to retry:

curl -X POST https://api.zenix.net.tr/v1/services/123/server/power \
  -H "Authorization: Bearer $ZENIX_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: restart-123-20261020" \
  -d '{"action":"restart"}'

Errors

Every error has a stable machine-readable code. Messages are fixed English text and may change; build your logic on the code.

{
  "success": false,
  "error": { "code": "insufficient_scope", "message": "…", "details": { "required_scope": "servers:power" } },
  "meta": { "request_id": "7f3c9a2e-…" }
}
HTTPCodeMessage
400invalid_pathThe request path is not valid.
400invalid_jsonThe request body is not valid UTF-8 JSON.
400invalid_idempotency_keyIdempotency-Key must be 1-64 characters: letters, digits, '.', '_', ':' or '-', starting with a letter or digit.
400invalid_requestThe request could not be processed.
401missing_api_keyMissing API key. Send it as 'Authorization: Bearer <key>'.
401invalid_api_keyThe API key is invalid, expired or revoked.
403insufficient_scopeThe API key does not have the scope required for this endpoint.
403service_scope_restrictedThis API key is limited to specific services and cannot access account-wide data.
403ip_not_allowedRequests from this IP address are not allowed for this API key.
404not_foundThe requested resource was not found.
404service_not_foundService not found.
404server_not_foundThis service has no managed server.
404invoice_not_foundInvoice not found.
404ticket_not_foundTicket not found.
404cabinet_not_foundCabinet not found.
405method_not_allowedThe HTTP method is not allowed for this endpoint.
409server_busyAnother operation is in progress on this server.
409server_not_readyThe server is not ready yet.
409service_not_activeThe service is not active.
409server_management_unavailablePower and status operations are not available for this server.
409idempotency_key_in_useA request with this Idempotency-Key is still being processed. Retry shortly with the same key.
413payload_too_largeThe request body is too large.
415unsupported_media_typeThe request body must be application/json.
422validation_failedThe request contains invalid parameters.
422idempotency_key_reusedThis Idempotency-Key was already used with a different request.
429rate_limit_exceededToo many requests. Retry after the time in the Retry-After header.
429server_rate_limitedToo many server operations right now. Retry after the time in the Retry-After header.
500internal_errorAn internal error occurred.
502server_operation_failedThe server operation could not be completed.
502upstream_errorThe service returned an invalid response.
503api_disabledThe API is temporarily disabled.
503service_unavailableThe service is temporarily unavailable.
503server_operations_unavailableServer operations are temporarily unavailable.
504upstream_timeoutThe request timed out. The operation may still complete; retry with the same Idempotency-Key.

Versioning

Within v1, fields and enum values may be added, so ignore fields you do not know. Breaking changes are published under a new version path.