← BLOG

What is a deployment API?

A deployment API lets software submit an application version, configure it, start or promote it, and read the resulting status without a person operating a hosting dashboard.

HOW IT WORKS · 20 AUGUST 2026 · 5 MIN READ

A deployment API is a programmatic way to send an application version to a target environment, apply configuration, start or promote it, and observe success or failure. It replaces clicks in a hosting panel with authenticated requests from a CI system, internal tool, or SaaS backend.

The term is ambiguous. Some deployment APIs record that a release should happen, while another system performs it. Others accept source files or an image and run the workload themselves. Check which contract a product means before designing around the name.

Three APIs often share the same label

API TYPEWHAT IT CONTROLSTYPICAL CALLER
Deployment record APIA release request, environment, status, and linksCI system coordinating another deployer
Hosting deployment APIArtifact upload, runtime, configuration, process, URL, and lifecycleA product that publishes customer apps
Infrastructure APIMachines, networks, load balancers, and storage primitivesA platform engineering or operations team

GitHub's Deployments API is an example of the first type. It creates deployment objects and statuses that external systems can act on. Firebase Hosting's REST flow is closer to the second type for static content because it creates a version, uploads files, and releases that version to a site.

A complete deployment is a state machine

  1. 01
    Authenticate the callerUse a server credential with only the scopes this integration needs.
  2. 02
    Create an immutable versionIdentify the source bundle, image digest, or uploaded artifact so retries refer to the same bytes.
  3. 03
    Apply runtime configurationChoose the entry point, environment values, memory, and destination without placing secrets in the artifact.
  4. 04
    Build and startReturn a deployment identifier even if installation and startup continue asynchronously.
  5. 05
    Observe the resultExpose states, logs, errors, health, and the final URL in a machine-readable response.
  6. 06
    Promote or roll backMove traffic to a known version and keep a path back when the new process fails.

The contract matters more than the POST endpoint

CAPABILITYWHY IT MATTERS
IdempotencyA timed-out retry must not create a second app or second bill
Large artifact uploadSource bundles should not be forced through one JSON request body
Scoped credentialsA deploy key rarely needs permission to delete production apps
Tenant isolationA SaaS must map its customer identifier to separate hosted resources
Status and logsThe caller needs enough evidence to explain a failed publish action
RollbackA known version should be recoverable without rebuilding it
Domain lifecyclePublishing often includes DNS verification and certificate state
Deletion recoveryAutomation mistakes should not destroy customer work immediately
Usage and billing dataThe platform must reconcile hosted resources with customer plans

When to build on an API instead of a dashboard

Use a deployment API when publish is part of your product, when many similar apps must be provisioned, or when a CI pipeline must produce the same result every time. A dashboard is enough for occasional manual releases. Direct infrastructure APIs make sense when custom networking, compliance controls, or unusual runtimes justify owning the orchestration layer.

What Spocket exposes to a SaaS backend

Spocket's Platform API is a hosting deployment API. A backend can create an app and deploy its first version in one call, upload larger zip bundles through a signed URL, group apps by the caller's customer reference, read status and logs, control power, and manage custom domains.

Credentials have separate read, write, delete, and domain scopes. Idempotency keys protect create requests from duplicate retries. Deleting stops the app and billing immediately, while the underlying app remains recoverable for seven days.

The API runs on the Fleet plan, which includes 20 apps. Additional running apps cost $2.45 per month each at the current published rate. It supports Spocket's Node and Python hosting shape, not arbitrary virtual machines or a managed database. Read /documentation/platform-api for the request contract or /platform-hosting for the product decision.

Need somewhere to put it?

Spocket runs apps, workers and scrapers that have to stay awake. Deploy from Claude or Cursor by asking, from $3/mo. First app is free for 7 days, no card.

Explore the Platform APIRead the quickstart
Spocket
BlogDocsTermsPrivacyHome