What they are
@vertracloud/sdk-api (JavaScript/TypeScript), vertracloud-api (Python) and
github.com/vertracloud/sdk-api-go (Go) are thin typed clients over the
public API: one method per route, the same API key scopes, and
nothing beyond that โ no cache, no automatic retry, no state of its own. Use them instead of
hand-rolling fetch/requests/net/http when you want types and errors already structured.
Installation
Authentication
All three clients take the API key at construction โ the same key created under Settings โ API keys in the dashboard, with the scopes your code will use (see Scopes).baseUrl/timeoutMs,
base_url/timeout, rest.WithBaseURL/rest.WithTimeout); the default already points to
https://api.vertracloud.app. In Go, every call takes context.Context first and per-call
options at the end โ for example, rest.WithWorkspaceID(id) to act on a workspace resource.
Examples by domain
Applications
restart also takes optional reinstall_dependencies and force_build flags (for example { force_build: true } in JavaScript); a restart that sets either one runs a build and counts against the planโs deploys-per-hour limit.
Creating an application answers right away with status: "building"; the build continues in the background.
Wait for it to finish with the helper for your language. It returns the application once it is up and
raises an error if the build ended down (the error code is the applicationโs last_build_error, such as INSTALL_OUT_OF_MEMORY, or APP_DOWN when none; read the logs for the detail) or the wait ran out.
Releases and rollback
Listing releases and reading a log needapps:read. The preview needs apps:envs and returns only variable
names, never values. A rollback needs apps:write, plus apps:envs to restore variables, and is available on every plan. See the guide for what a rollback restores.
Databases
Snapshots
Thescope ("applications" or "databases") is required on every snapshot call โ the same
resource ID could be an app or a database, and the API doesnโt guess.
Account
Workspaces
Billing and redemption
orders.create fails with BILLING_DETAILS_INCOMPLETE. Read them with
billing.details (client.Billing.Details in Go) and save them with billing.updateDetails
(update_details in Python, client.Billing.UpdateDetails in Go), using keys with the
billing:read and billing:write scopes.
To redeem a promo code, use billing.redeem (client.billing.redeem(code) in JavaScript and
Python, client.Billing.Redeem(ctx, code) in Go), with a key that has the redeem:write scope.
Web Analytics
apps:read. They take the period (start, end), the filters of each dimension and compare. performance and requests fail with PLAN_DOES_NOT_SUPPORT_WEB_ANALYTICS_PERFORMANCE and PLAN_DOES_NOT_SUPPORT_WEB_ANALYTICS_REQUESTS when the plan does not include them; a period before the planโs history fails with ANALYTICS_RANGE_EXCEEDS_PLAN and a busy moment with ANALYTICS_BUSY (the typed error exposes the wait in seconds).
Blob Storage
File storage has its own SDK,@vertracloud/blob, for Node, browsers and edge runtimes (npm install @vertracloud/blob). In Python and Go it is a resource of the same client: client.blob and client.Blob. See JavaScript SDK and Python and Go SDKs.
Streaming (apps.realtime)
GET /v1/apps/{id}/realtime is the only route in the catalog that streams live events (logs and
system notes). JavaScript exposes an async generator; Python, an iterable stream object; Go, an
iterator (Next/Event/Err) โ none of them reconnect on their own if the connection drops.
Typed errors
Every response outside the 2xx range becomes a structured error, always withcode (and
details, when the API sends it) accessible โ never a loose string to parse. In JavaScript and
Python, the exception class indicates the HTTP status; in Go, every API error is a single
*rest.APIError, and the status is checked through methods.
JavaScript
Python
Go
toString()/__repr__/Error(), or error
serialization โ retry_after (in seconds) comes from details.retry_after in the error body or
the Retry-After header on 429 responses. See
Rate Limiting for per-route limits.
What you canโt do with an API key
Some management actions are only available in the dashboard, and are therefore not exposed by the SDKs:
For AI agent automation over files, logs, apps and deploys, see the MCP server โ it uses
the same API key, with the same scope model.