Official API documentation · from openapi.yaml
The ServerBike Reseller Public API (/api/v1) is used by resellers to buy wholesale VPS services, deliver them to
their own customers and operate them. A reseller may use the packaged WHMCS modules or any backend of its own
(PHP, Python, Node.js, Go, a billing panel, an automation system); WHMCS on the reseller side is optional.
Contract version 1.1.1 (Bridge 0.1.8 maintenance): 28 routes, 17 GET and 11 POST. Routes added in 1.1.0 are
marked x-since: 1.1.0. Existing response shapes are unchanged; new information is published on new read routes
only, because existing clients decode responses strictly.
Authentication. Every request is signed with BRIDGE-HMAC-SHA256-V1 (see AUTHENTICATION.md): four headers,
one value each, computed over the exact method, raw path, raw query and body bytes sent. Requests are accepted
only from the reseller's registered public egress addresses (IPv4 and/or IPv6). Calls are server-to-server; never
place the reseller secret in a browser.
Envelopes. Success is HTTP 200 with {"data": {...}}. Errors are {"error": {"code", "message", "details"}}
with an X-Request-Id header. Errors that refer to a business operation carry details.operation_uuid.
Responses are Cache-Control: no-store, Content-Type: application/json, identity-encoded.
Retries. A transport failure, a timeout, a non-JSON body or an edge/proxy error after a POST is NOT proof that
the request was not delivered. Look up the original operation_uuid; never resend a mutation with a new one until
the original is proven terminal. See RETRY_AND_ERRORS.md.
Authentication
GET
/api/v1/auth/verify
Prove the credential, signature and source address.
operationId verifyAuth · tags Authentication · x-rate-family auth_probe
Responses
200Credential accepted.application/json
Type: object · no extra members
Catalog and account
GET
/api/v1/catalog
Products, terms, wholesale prices, images and capabilities offered to this reseller.
operationId getCatalog · tags Catalog and account · x-rate-family read
Prices are ServerBike's effective wholesale price for this reseller (fixed override, else percentage discount, else the native price) in the reseller's currency. available and capabilities describe the catalogue; every purchase is admitted again (allowance, mapping, launch scope, credit, limits). list_price, when present, is ServerBike's own public price before reseller rules (information for retail pricing; never charged).
Parameters
Responses
200One page of the catalogue.application/json
Type: object · no extra members
GET
/api/v1/account/commercial
Commercial eligibility and credit balance.
operationId getCommercialAccount · tags Catalog and account · x-rate-family read
Responses
200Account state from ServerBike.application/json
Type: object · no extra members
Business operations
POST
/api/v1/purchases
Buy one wholesale VPS (debits credit once; fulfillment follows).
operationId purchase · tags Business operations · x-rate-family mutation
Persist operation_uuid and the exact body BEFORE sending. A commit proves the debit and the commercial service, not a running server: follow service_uuid through runtime-state and access. On any transport ambiguity, poll GET /operations/{operation_uuid}; never send a second purchase with a new UUID until the first is proven rejected.
Request body
application/json · required
Type: object · no extra members
external_product_refRefrequiredrequested_image_refRefrequired
Responses
200Committed. service_uuid and fulfillment_status are present when fulfillment was scheduled in the same call.application/json
Type: object · no extra members
POST
/api/v1/renewals
Renew one service for its current term (debits credit once).
operationId renew · tags Business operations · x-rate-family mutation
Refused (409 BUSINESS_CONFLICT) when ServerBike renews the service automatically (see GET /services/{service_uuid}/commercial → renewal.authority), while a financial hold applies, or while another commercial operation of the service is unresolved. The new paid-through date is reported by GET /operations/{operation_uuid}/settlement.
Request body
application/json · required
Type: object · no extra members
commercial_service_refRefrequired
Responses
200Committed.application/json
Type: object · no extra members
POST
/api/v1/commercial-suspensions
Commercially suspend a service (the platform applies the operational hold).
operationId suspend · tags Business operations · x-rate-family mutation
Request body
Request body: Lifecycle
Responses
POST
/api/v1/commercial-unsuspensions
Release a commercial suspension.
operationId unsuspend · tags Business operations · x-rate-family mutation
Request body
Request body: Lifecycle
Responses
POST
/api/v1/commercial-terminations
Terminate a service commercially (provider cleanup follows; watch runtime-state).
operationId terminate · tags Business operations · x-rate-family mutation
Request body
Request body: Lifecycle
Responses
GET
/api/v1/operations/{operation_uuid}
Durable outcome of a purchase, renewal or lifecycle operation of this reseller.
operationId lookupOperation · tags Business operations · x-rate-family polling
not_found (HTTP 200) means no operation of this reseller has this UUID yet; after a lost response keep polling with backoff and never treat it alone as permission to mint a new UUID. pending is not terminal. Runtime operations (power, reinstall, password) have their own lookup routes.
Parameters
Responses
200Lookup result.application/json
Type: object
Financial reconciliation
GET
/api/v1/operations/{operation_uuid}/settlement
Authoritative financial settlement of one operation (recorded amounts, currency, paid-through).
operationId getSettlement · tags Financial reconciliation · x-rate-family read · x-since 1.1.0
Figures are ServerBike's recorded business transactions (never a current catalogue price). transactions lists the debit(s) of the operation and any refund recorded against them. paid_through is set only for a committed renewal (ServerBike's recorded new paid-through date); for the current paid-through date of a service use GET /services/{service_uuid}/commercial. plan_change carries the escrow of a plan change. Read-only.
Parameters
Responses
200Settlement.application/json
Type: object · no extra members
GET
/api/v1/services/{service_uuid}/commercial
Current commercial state, paid-through date, renewal authority, capabilities and upgrade targets.
operationId getServiceCommercial · tags Financial reconciliation, Plan change · x-rate-family read · x-since 1.1.0
paid_through is ServerBike's current next-due date. renewal.authority says who renews: reseller_api (you call POST /renewals) or serverbike_automatic (ServerBike renews; API renewals are refused). plan_change.targets are candidates priced exactly as admission would price them, each with the platform's current qualification; this is a preflight only — it reserves nothing and promises nothing; admission decides again.
Parameters
Responses
200Commercial summary.application/json
Type: object · no extra members
Services
GET
/api/v1/services
Services of this reseller (Bridge projection).
operationId listServices · tags Services · x-rate-family read
Parameters
Responses
200One page.application/json
Type: object · no extra members
GET
/api/v1/services/{service_uuid}
One service of this reseller.
operationId getService · tags Services · x-rate-family read
Parameters
Responses
200Service.application/json
Type: object · no extra members
GET
/api/v1/services/{service_uuid}/operational-status
Live power status (fresh provider read; observational).
operationId getOperationalStatus · tags Services · x-rate-family read
Parameters
Responses
200Status.application/json
Type: object · no extra members
GET
/api/v1/services/{service_uuid}/runtime-state
Provisioning/termination progress, power state and metrics (CPU, memory, disk, traffic).
operationId getRuntimeState · tags Services · x-rate-family read
Parameters
Responses
200Runtime state. Provider outages are reported as unavailable with a reason, not as errors.application/json
Type: object · no extra members
GET
/api/v1/services/{service_uuid}/activity
Latest 30 customer-visible events of the service (not a financial ledger).
operationId getActivity · tags Services · x-rate-family read
Parameters
Responses
200Activity, newest first.application/json
Type: object · no extra members
Delivery
GET
/api/v1/services/{service_uuid}/access
Legacy delivery projection (addresses, login, credential state).
operationId getAccess · tags Delivery · x-rate-family read
Frozen 1.0 shape (strict existing clients). login_username is lower case and ssh_port is the single login port: for a Windows image it reports administrator and 3389 (Remote Desktop). New integrations should use GET /services/{service_uuid}/guest-access, which names the protocol and the operating-system family.
Parameters
Responses
200Delivery projection.application/json
Type: object · no extra members
GET
/api/v1/services/{service_uuid}/guest-access
Image-aware login (SSH or Remote Desktop), addresses, and the initial credential's state and recovery.
operationId getGuestAccess · tags Delivery · x-rate-family read · x-since 1.1.0
login is null until delivery or when the effective image is unresolved or lacks verified login metadata. A reinstall target becomes the effective image only after verified completion. An unresolved password replacement suppresses reveal and returns null recovery. After a verified replacement, an unused initial credential becomes unavailable. password_change directs the client to POST /api/v1/services/{service_uuid}/password when the product grants vps.changepassword, or to reinstall when permitted. A consumed reveal can never be repeated, including after a lost response.
Parameters
Responses
200Guest access.application/json
Type: object · no extra members
POST
/api/v1/services/{service_uuid}/access/initial-credential
One-time reveal of the initial password (atomic; never repeatable).
operationId revealInitialCredential · tags Delivery · x-rate-family mutation
Exactly one caller ever receives revealed. A lost response consumes the reveal: the next answer is already_revealed. Recover with an authorized password change. Store nothing; never log the body. Body limit 64 bytes.
Parameters
Request body
application/json · required
Type: object · no extra members
Responses
200Reveal result.application/json
Type: object · no extra members
Runtime operations
POST
/api/v1/services/{service_uuid}/power/{action}
Start, stop (graceful), restart (stop then start) or power off (hard).
operationId power · tags Runtime operations · x-rate-family mutation
Requires product capability vps.<action>. One runtime action at a time per service. The platform's worker continues and settles the action; poll GET .../power/operations/{operation_uuid} (observational). Reusing the same operation_uuid returns the same operation. Body limit 1024 bytes.
Parameters
Request body
application/json · required
Type: object · no extra members
operation_uuidUuidrequired
Responses
GET
/api/v1/services/{service_uuid}/power/operations/{operation_uuid}
Observe a power operation (never sends anything).
operationId getPowerOperation · tags Runtime operations · x-rate-family read
Parameters
Responses
POST
/api/v1/services/{service_uuid}/reinstall
Reinstall an offered image with a new password (destructive).
operationId reinstall · tags Runtime operations · x-rate-family mutation
Requires vps.reinstall; refused while a plan change is staged. Body limit 2048 bytes. The password is never stored or echoed.
Parameters
Request body
application/json · required
Type: object · no extra members
operation_uuidUuidrequired
Responses
GET
/api/v1/services/{service_uuid}/reinstall/operations/{operation_uuid}
Observe a reinstall (settles only on provider task proof).
operationId getReinstallOperation · tags Runtime operations · x-rate-family read
Parameters
Responses
POST
/api/v1/services/{service_uuid}/password
Change the guest administrator password (root on Linux, Administrator on Windows).
operationId changePassword · tags Runtime operations · x-rate-family mutation
Requires vps.changepassword; at most 5 per service per UTC day. When the provider can only apply the password at the next full power cycle, the platform performs one graceful stop-and-start itself (status applying), or reports power_cycle_required when it cannot. Body limit 2048 bytes.
Parameters
Request body
application/json · required
Type: object · no extra members
operation_uuidUuidrequired
Responses
GET
/api/v1/services/{service_uuid}/password/operations/{operation_uuid}
Observe a password change (never sends anything).
operationId getPasswordOperation · tags Runtime operations · x-rate-family read
Parameters
Responses
Console
POST
/api/v1/services/{service_uuid}/console-sessions
Issue a one-use console ticket for a browser at an approved Origin.
operationId openConsole · tags Console · x-rate-family mutation
The browser connects to wss://<api host><console_path> within 60 s, once, from exactly origin. Each reconnect needs a new ticket. Requires product capability vps.console and an approved Origin (the reseller's registered hostname, or an origin ServerBike added). Body limit 512 bytes.
Parameters
Request body
application/json · required
Type: object · no extra members
Responses
200Ticket.application/json
Type: object · no extra members
Plan change
POST
/api/v1/commercial-changes
Upgrade to another plan, applied by the customer's own Stop (or Power Off) then Start.
operationId changePlan · tags Plan change · x-rate-family mutation
Deferred plan change: ServerBike holds the non-prorated same-term wholesale difference in escrow, the platform stages the target with the provider, the customer's own power cycle applies it, the platform verifies the running resources and ServerBike captures (or releases) the held amount exactly once. The platform never powers the VPS off or on for this. Track the phase with GET /services/{service_uuid}/plan-changes/{operation_uuid} and money with GET /operations/{operation_uuid}/settlement. Eligible targets: GET /services/{service_uuid}/commercial. Plan change is unavailable while ServerBike has it switched off or no target is qualified.
Request body
application/json · required
Type: object · no extra members
commercial_service_refRefrequiredtarget_external_product_refRefrequiredtarget_requested_image_refRefrequired
Responses
200Deferred (status: pending) or, for an immediate change, the lifecycle commit.application/json
Type: object
GET
/api/v1/services/{service_uuid}/plan-changes/{operation_uuid}
Phase of a plan change, customer activation readiness and settlement state.
operationId getPlanChange · tags Plan change · x-rate-family polling · x-since 1.1.0
Derived from the platform's recorded evidence only (no provider call). Ask the customer to Stop (or Power Off) and then Start only while activation_ready is true; customer_power_cycle_permitted is false while another power action of the service is still open. operator_review_required means ServerBike operators decide; nothing is automatic. Amounts: GET /operations/{operation_uuid}/settlement.
Parameters
Responses
200Plan change phase.application/json
Type: object · no extra members
Components
Security schemes
ServiceUuid parameter
Uuid · in path · required yes
OperationUuid parameter
Uuid · in path · required yes
Lifecycle request body
application/json · required
Type: object · no extra members
Responses
InvalidRequest
Malformed request (path identifier, query, body, media type, size). Decided before ownership.application/json
Type: Error
AuthenticationFailed
Signature, timestamp, nonce (replay), credential or source address refused. Never retry with the same signing material.application/json
Type: Error
NotFound
Unknown, foreign or unsupported (collapsed: never reveals existence).application/json
Type: Error
RateLimited
Rate limited. Wait Retry-After seconds, then retry with fresh signing material.Headers: Retry-After
application/json
Type: Error
UpstreamUnavailable
A ServerBike dependency (commercial authority or provisioning platform) cannot answer now. A read may be retried later.application/json
Type: Error
InternalError
Unexpected server error. After a POST, treat as ambiguous and look the operation up.application/json
Type: Error
ServiceSuspended
SERVICE_SUSPENDED: the service is commercially held.application/json
Type: Error
ServiceConflict
SERVICE_SUSPENDED, BUSINESS_CONFLICT (another action open, wrong state, staged change) or IDEMPOTENCY_CONFLICT (UUID reused for a different intent).application/json
Type: Error
BusinessConflict
BUSINESS_CONFLICT or IDEMPOTENCY_CONFLICT; details.operation_uuid names the operation.application/json
Type: Error
BusinessRejection
Definite business refusal (nothing charged): PRODUCT_UNAVAILABLE, RESELLER_INELIGIBLE, INSUFFICIENT_CREDIT or NOT_FOUND.application/json
Type: Error
MutationUnavailable
UPSTREAM_UNAVAILABLE (proven not sent: the same intent may be retried with the same operation_uuid and
fresh signing material) or OUTCOME_UNKNOWN (may have been committed: poll GET /operations/{operation_uuid}
after Retry-After; never resend under a new UUID).Headers: Retry-After
application/json
Type: Error
LifecycleCommitted
Committed at ServerBike.application/json
Type: object · no extra members
PowerOperation
Power operation state.application/json
Type: object · no extra members
ReinstallOperation
Reinstall state.application/json
Type: object · no extra members
PasswordOperation
Password change state.application/json
Type: object · no extra members
Schemas
Uuid
Type: string · pattern ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Canonical lowercase UUID.
OperationUuidV4
Type: string · pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
Caller-generated random lowercase UUID v4; the durable identity of a business operation.
Ref
Type: string · pattern ^[A-Za-z0-9._:-]{1,128}$
TermRef
Type: string · pattern ^[A-Za-z0-9._:-]{1,128}$
Opaque term reference exactly as the catalogue returns it, e.g. term:monthly.
BillingPeriod
Type: enum · one of monthly, quarterly, semiannually, annually, biennially, triennially
Timestamp
Type: string · pattern ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$
RFC 3339 UTC, seconds precision.
Money
Type: object · no extra members
amountstringrequiredpattern ^\d{1,14}\.\d{2}$
Fixed-point decimal string; never a float.
currencystringrequiredpattern ^[A-Z]{3}$
SignedMoney
Type: object · no extra members
amountstringrequiredpattern ^-?\d{1,14}\.\d{2}$
Signed: negative = net debit of the reseller's credit.
currencystringrequiredpattern ^[A-Z]{3}$
GuestPassword
Type: string · minLength 16; maxLength 128
16-128 UTF-8 bytes, no ASCII control bytes. Never logged, stored or echoed.
Error
Type: object · no extra members
CatalogProduct
Type: object · no extra members
external_product_refRefrequireddisplay_namestringrequired
availablebooleanrequired
termsarray of objectrequired
Array items:
wholesale_priceMoneyrequired
imagesarray of objectrequired
Array items:
capabilitiesarray of enumrequired
OperationLookup
Type: object or object or object or object or object or object
OperationType
Type: enum · one of purchase, renewal, commercial_suspend, commercial_unsuspend, commercial_terminate, commercial_change
LifecycleCommit
Type: object · no extra members
operation_uuidUuidrequiredoutcomeconstrequiredalways committed
commercial_service_refRefrequiredcommercial_statusenumrequiredone of active, suspended, terminated
service_uuidUuid or nullrequiredbusiness_transaction_refnullrequired
ServiceSummary
Type: object · no extra members
commercial_statusstringrequired
commercial_status_sourceconstrequiredalways bridge_projection
operational_statusstringrequired
commercial_service_refstring | nullrequired
RuntimeStatus
Type: enum · one of pending, new, in_flight, command_acknowledged, unknown, unknown_sent_outcome, complete, failed_definitely_not_sent, failed_provider_rejected, reconciliation_required
Only complete is success. failed_* are terminal and nothing changed. reconciliation_required may still settle from evidence; escalate when it persists.
RuntimeState
Type: object · no extra members
fulfillment_statusstringrequired
operational_statusenumrequiredone of running, stopped, suspended, unavailable, queued, authorization_pending, authorization_refused, provisioning, installing, provisioning_failed, failed_definitely_not_sent, reconciliation_required, terminating, terminated
status_reasonstring | nullrequired
service_not_active, executor_unavailable, authorization_unavailable, rate_limited, provider_unavailable, status_unresolved
cachedbooleanrequired
metrics_statusenumrequiredone of available, unavailable, unsupported
metricsnull or objectrequired
LegacyAccess
Type: object · no extra members
delivery_statusenumrequiredone of pending, ready, network_unavailable, legacy
primary_ipv4string | nullrequired
additional_ipv4array of stringrequired
ipv6array of stringrequired
ssh_portinteger | nullrequired
login_usernamestring | nullrequiredpattern ^[a-z_][a-z0-9_-]{0,31}$
initial_credentialenumrequiredone of available, revealed, unavailable
GuestAccess
Type: object · no extra members
delivery_statusenumrequiredone of pending, ready, network_unavailable, legacy
os_familyenumrequiredone of linux, windows, unknown
loginnull or objectrequired
addressesobjectrequiredno extra members
primary_ipv4string | nullrequired
additional_ipv4array of stringrequired
ipv6array of stringrequired
initial_credentialobjectrequiredno extra members
stateenumrequiredone of available, revealed, unavailable, not_ready
recoveryenumrequiredone of reveal, password_change, null
Settlement
Type: object · no extra members
operation_uuidUuidrequiredstatusenumrequiredone of committed, pending, rejected
settlement_statusenumrequiredone of settled, pending, not_charged, not_applicable, held, captured, released, under_review
settled: purchase/renewal debit recorded. held/captured/released/under_review: plan change escrow. not_charged: rejected. not_applicable: suspension, unsuspension, termination.
commercial_service_refstring | nullrequired
service_uuidUuid or nullrequiredbusiness_transaction_refstring | nullrequired
currencystring | nullrequired
transactionsarray of objectrequired
Array items:
business_transaction_refRefrequiredkindenumrequiredone of debit, credit
transaction_typeenumrequiredone of purchase, renewal, commercial_change, compensation
external_product_refstring | nullrequired
Product in effect for this operation.
term_refstring | nullrequired
image_refstring | nullrequired
Committed renewal only: ServerBike's recorded new paid-through date.
plan_changenull or objectrequired
ServiceCommercial
Type: object · no extra members
commercial_service_refRefrequiredcommercial_statusenumrequiredone of active, suspended, terminated
external_product_refRefrequiredcapabilitiesarray of stringrequired
renewalobjectrequiredno extra members
authorityenumrequiredone of reseller_api, serverbike_automatic
billing_statestring | nullrequired
financial_holdbooleanrequired
reseller_holdbooleanrequired
admin_holdbooleanrequired
plan_changeobjectrequiredno extra members
availablebooleanrequired
blocking_reasonstring | nullrequired
PLAN_CHANGE_DISABLED, SERVICE_NOT_ACTIVE, OPEN_CHANGE, CUSTOMER_POWER_CYCLE_NOT_PERMITTED, SERVICE_NOT_REALIZED, NO_QUALIFIED_TARGET
open_operation_uuidUuid or nullrequiredtargetsarray of objectrequired
Array items:
external_product_refRefrequireddisplay_namestringrequired
wholesale_priceMoneyrequiredwholesale_differenceMoneyrequiredqualifiedbooleanrequired
unavailable_reasonstring | nullrequired
PAIR_NOT_CERTIFIED, PLAN_STAGE_NOT_CERTIFIED, SERVICE_BINDING_UNQUALIFIED, INVENTORY_NOT_CURRENT, PROVIDER_UNQUALIFIED
PlanChange
Type: object · no extra members
operation_uuidUuidrequiredoperation_typeconstrequiredalways commercial_change
phaseenumrequiredone of awaiting_admission, waiting_for_stage, staging, verifying_stage, activation_ready, applying, verifying_application, settlement_pending, operator_review, completed, released, rejected, in_progress
terminalbooleanrequired
outcomeenumrequiredone of applied, released, rejected, null
activation_readybooleanrequired
next_customer_actionenumrequiredone of stop_then_start, null
customer_power_cycle_permittedbooleanrequired
operator_review_requiredbooleanrequired
settlement_statusenumrequiredone of pending_admission, reserved, capture_pending, captured, release_pending, released, under_review, not_reserved