Geliştirici API’si
Sunucularınızı, hostingi, alan adlarını, faturalandırmayı ve destek taleplerini programatik olarak yönetin. Tüm uç noktalar kapsam denetimli bir API anahtarıyla korunur.
https://api.sunucu.com/v1Authorization: Bearer snc_…AI bağlantısı (MCP)
Claude ve diğer MCP destekli araçları doğrudan hesabınıza bağlayın. API anahtarınızı taşıyıcı (Bearer) olarak kullanır; tüm araçlar anahtarın kapsamlarıyla sınırlıdır.
https://api.sunucu.com/mcpclaude mcp add --transport http sunucu https://api.sunucu.com/mcp \ --header "Authorization: Bearer snc_…"
37 araç: sunucular, hosting, alan adları, faturalandırma, destek ve webhook’lar. API anahtarı oluşturun →
OAuth destekleyen istemciler anahtar yapıştırmadan bağlanabilir — tarayıcıda onaylarsınız (RFC 8628 cihaz kodu akışı).
Yerel/stdio çalıştırma: SUNUCU_API_KEY=snc_… npx -y @otwa/sunucu-mcp
Uç noktalar
Account
/v1/accountaccount:readReturns the authenticated account profile.
Servers
/v1/serversservers:readList every server on the account.
/v1/servers/:idservers:readServer detail (backbone-scrubbed — no upstream provider, no provisioning logs).
/v1/servers/:id/statsservers:readLive CPU / memory / network / disk usage.
/v1/servers/:id/snapshotsservers:readDisk snapshots (restore points) for the server.
/v1/servers/:id/power/:actionservers:writePower the server start, stop, or reboot. `:action` ∈ {start,stop,reboot}.
/v1/servers/:id/snapshotsservers:writeTake a disk snapshot. Honours an optional Idempotency-Key header.
{ "name": "pre-upgrade", "description": "before kernel bump" }/v1/servers/:id/snapshots/:snapshotIdservers:writeRemove a snapshot (non-destructive to the live disk).
/v1/servers/:id/reinstallservers:destroyDESTRUCTIVE — wipe the disk and rebuild from an OS template. Honours Idempotency-Key.
{ "osTemplate": "ubuntu-22.04", "os": "ubuntu" }/v1/servers/:id/snapshots/:snapshotId/revertservers:destroyDESTRUCTIVE — roll the live disk back to a snapshot.
/v1/servers/:idservers:destroyDESTRUCTIVE — permanently terminate the server.
Hosting
/v1/hostinghosting:readList web-hosting accounts.
/v1/hosting/:idhosting:readHosting account detail (connection info, backbone-scrubbed).
/v1/hosting/:id/custom-domainhosting:writeAttach a custom domain to a hosting account.
{ "domain": "example.com" }/v1/hosting/:id/custom-domain/verifyhosting:writeRe-check DNS and attach the custom domain once it points to us.
/v1/hosting/:id/custom-domainhosting:writeDetach the custom domain from the hosting account.
Domains
/v1/domainsdomains:readList registered domains.
/v1/domains/:iddomains:readDomain detail.
/v1/domains/:iddomains:writeUpdate auto-renew, transfer lock, WHOIS privacy, or nameservers.
{ "auto_renew": true, "transfer_lock": true, "nameservers": ["ns1.example.com","ns2.example.com"] }Billing
/v1/billing/invoicesbilling:readPaginated invoice list. Query: page, limit.
/v1/billing/invoices/:idbilling:readSingle invoice with line items.
/v1/billing/walletbilling:readPrepaid wallet balance and state.
/v1/billing/wallet/transactionsbilling:readRecent wallet transactions. Query: limit.
Support tickets
/v1/ticketstickets:readList support tickets.
/v1/tickets/:idtickets:readTicket detail with the message thread.
/v1/ticketstickets:writeOpen a support ticket. Honours Idempotency-Key.
{ "subject": "Need help", "message": "…", "department": "technical", "priority": "medium" }/v1/tickets/:id/replytickets:writePost a customer reply on a ticket.
{ "body": "Thanks, that worked." }/v1/tickets/:id/closetickets:writeClose the ticket.
Webhooks
/v1/webhookswebhooks:readList webhook subscriptions.
/v1/webhookswebhooks:writeSubscribe a URL to events. Secret returned ONCE.
{ "url": "https://example.com/hooks", "events": ["*"], "description": "prod" }/v1/webhooks/:idwebhooks:readWebhook subscription detail (secret masked).
/v1/webhooks/:idwebhooks:writeChange url, events, description, or pause/resume (isActive).
/v1/webhooks/:idwebhooks:writeDelete a subscription.
/v1/webhooks/:id/rotate-secretwebhooks:writeIssue a fresh signing secret (returned ONCE). Old secret stops immediately.
/v1/webhooks/:id/deliverieswebhooks:readRecent delivery attempts. Query: limit.
/v1/webhooks/:id/deliveries/:deliveryId/redeliverwebhooks:writeRe-queue a past delivery for another attempt.
Webhooks
Bir olay gerçekleştiğinde URL’nize imzalı bir POST gönderilir. İmza HMAC-SHA256’dır: X-Sunucu-Signature: t=<ts>,v1=HMAC(secret, "<ts>." + body). Başarısız teslimler üstel geri çekilmeyle yeniden denenir (1dk → 6sa).
server.createdA server finished provisioning. Payload: serverId, status, label.
server.power.changedA power action ran. Payload: serverId, action (start/stop/reboot).
server.reinstalledA reinstall ran. Payload: serverId, os, osTemplate.
server.terminatedA server was terminated. Payload: serverId.
server.suspendedA server was suspended (e.g. expiry). Payload: serverId, reason.
hosting.createdA web-hosting account finished provisioning. Payload: hostingId, domain, status.
invoice.createdA new invoice was issued (any source — order, renewal, admin). Payload: invoiceId, invoiceNumber, status, totalUsdCents, currency.
invoice.paidAn invoice transitioned to paid (card, PayPal, crypto, or wallet). Payload: invoiceId, invoiceNumber, totalUsdCents, currency.
wallet.deposit.receivedA wallet top-up was credited. Payload: amountUsdCents, gateway, transactionId.
domain.registeredA domain registration completed (post-payment). Payload: domainId, domain, periodYears, expiresAt.
ticket.createdA support ticket was opened. Payload: ticketId, ticketNumber, subject, status, priority.
ticket.repliedSupport staff replied to your ticket. Payload: ticketId, ticketNumber, subject, status.
Hata kodları
400401403404429500Değişiklik günlüğü
- newTwo more webhook events:
invoice.created(fires for any new invoice — order, renewal, or admin) anddomain.registered(a registration completed after payment). The catalogue is now 13 events. - improvedConnect-AI (MCP) wizard on the API Keys page — pick your client (Claude Code / Desktop / Cursor / VS Code) and copy a ready-made config.
- newOAuth 2.0 device-code flow (RFC 8628). Connect AI tools by browser-approval instead of pasting a key: the client opens sunucu.com/oauth/device, you approve the requested scopes, and it receives a scoped
snc_at_access token (+ single-usesnc_rt_refresh, 90-day). Endpoints under/oauth/*with AS metadata at/.well-known/oauth-authorization-server. Revoke connected apps anytime from the API Keys page.
- newModel Context Protocol (MCP) server — connect Claude and other AI tools directly to your account at
https://api.sunucu.com/mcp(Streamable HTTP) using yoursnc_API key as a Bearer token. 37 tools across servers, hosting, domains, billing, tickets and webhooks, scope-gated by the key.
- newPer-key rate limiting — 120 requests/minute per API key, with
X-RateLimit-Limit/X-RateLimit-Remaining/X-RateLimit-Resetheaders on every response andRetry-Afteron a 429. - newFour more webhook events:
server.suspended,hosting.created,invoice.paid(fires for card / PayPal / crypto / wallet payments alike), andwallet.deposit.received.
- newWebhooks — subscribe a URL to account events and receive signed (HMAC-SHA256) POSTs. Eight endpoints under
/v1/webhooksbehind the newwebhooks:read/webhooks:writescopes: list, create, get, update (incl. pause/resume), delete, rotate-secret, delivery log, and redeliver. Failed deliveries retry with exponential backoff (1m→6h). - newWebhook events: server.created, server.power.changed, server.reinstalled, server.terminated, ticket.created, ticket.replied.
- newWrite endpoints. servers:write — power start/stop/reboot, password reset, create/delete snapshots. servers:destroy (opt-in, not in defaults) — reinstall, snapshot revert, terminate. hosting:write — set/verify/remove custom domain. domains:write — update auto-renew / lock / WHOIS / nameservers. tickets:write — open, reply, close.
- improvedIdempotency-Key header on snapshot-create, reinstall, and ticket-create dedups retried requests for 24h.
- newPublic API launch — read-only endpoints for account, servers (incl. live stats & snapshots), hosting, domains, billing (invoices & wallet) and support tickets. Authenticate with an
snc_…API key minted from the dashboard.